JPH06138916A - Data transfer system for i/o module - Google Patents

Data transfer system for i/o module

Info

Publication number
JPH06138916A
JPH06138916A JP28790392A JP28790392A JPH06138916A JP H06138916 A JPH06138916 A JP H06138916A JP 28790392 A JP28790392 A JP 28790392A JP 28790392 A JP28790392 A JP 28790392A JP H06138916 A JPH06138916 A JP H06138916A
Authority
JP
Japan
Prior art keywords
data
module
output
input
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP28790392A
Other languages
Japanese (ja)
Inventor
Takashi Yamauchi
孝 山内
Yukio Shibata
幸雄 柴田
Masahiro Koyanagi
雅寛 小柳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fanuc Corp
Original Assignee
Fanuc Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fanuc Corp filed Critical Fanuc Corp
Priority to JP28790392A priority Critical patent/JPH06138916A/en
Publication of JPH06138916A publication Critical patent/JPH06138916A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To transmit and receive the data surely and at a high speed with no transmission of the assignment data required at the time of power application. CONSTITUTION:An address order setting part 56 divides the I/O modules into the groups of input modules and output modules. Then the part 56 sets the address order in each group in the order of numbers of slots connected to the modules. Based on this address order, the I/O modules, i.e., an input module 52a, an input module 52e and an input module 52h are stored in the storage areas of an input data memory 54a in the order of smaller numbers of their connected slots. In the same way, the output data are stored in an output data memory 54b in the order of an output module 52b and then an output module 52g.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はPC(プログラマブル・
コントローラ)に接続されるI/Oモジュールのデータ
転送方式に関し、特にI/Oユニットに実装されるI/
Oモジュールのデータ転送方式に関する。
The present invention relates to a PC (programmable
Data transfer method of an I / O module connected to a controller), particularly an I / O module mounted in an I / O unit
The present invention relates to a data transfer method of an O module.

【0002】[0002]

【従来の技術】従来、PC(プログラマブル・コントロ
ーラ)では、PC本体とI/Oユニットとを別々に構成
し、I/OユニットにI/Oモジュールを実装する形式
のものがある。これはI/Oユニットを制御対象付近に
置き、入出力信号をI/Oユニットに集めてPC本体と
接続することにより、入出力信号の接続を容易にするた
めである。
2. Description of the Related Art Conventionally, there is a type of PC (programmable controller) in which a PC main body and an I / O unit are separately configured and an I / O module is mounted on the I / O unit. This is because the I / O unit is placed in the vicinity of the controlled object, and the input / output signals are collected in the I / O unit and connected to the PC body to facilitate the connection of the input / output signals.

【0003】I/Oモジュールには、入出力信号を処理
するモジュール、あるいはアナログ値をディジタル値に
変換するD/A変換器等がある。これらのI/Oモジュ
ールは、入出力信号あるいは点数等によって多数の種類
が用意されており、制御対象に応じたPCシステムを構
成することができる。
The I / O module includes a module that processes an input / output signal, a D / A converter that converts an analog value into a digital value, and the like. Many types of these I / O modules are prepared according to input / output signals, points, etc., and a PC system according to a control target can be configured.

【0004】ところで、I/Oモジュールには多数の種
類があるため、種類を誤るとPCが正常に動作しない。
このため、従来は、PCと各I/Oモジュールとの間で
送受されるデータのアドレスの対応を図るため、予め各
モジュールのアドレスの割り付けを行っている。この割
り付けデータは、PC側のメモリに格納されており、P
Cの電源投入時等に各I/Oユニットに送られる。各I
/Oユニットは、この割り付けデータに基づいてPC側
とI/Oモジュール側との対応を図り、両者間のデータ
の送受信を行っている。
By the way, since there are many types of I / O modules, if the type is wrong, the PC will not operate normally.
Therefore, conventionally, the addresses of the respective modules are assigned in advance in order to correspond the addresses of the data transmitted and received between the PC and the respective I / O modules. This allocation data is stored in the memory on the PC side, and P
It is sent to each I / O unit when the power of C is turned on. Each I
The / O unit tries to correspond the PC side and the I / O module side based on this allocation data, and transmits / receives data between them.

【0005】[0005]

【発明が解決しようとする課題】しかし、PCの電源投
入時に、一部のI/Oユニットの電源が投入されていな
いと、そのI/Oユニットに関しては後から電源が投入
されたとしてもデータの送受信が正常に行われなくなる
という問題点があった。
However, if some of the I / O units are not turned on when the PC is turned on, the data of the I / O units may be turned on later even if they are turned on. There was a problem that the sending and receiving of would not be performed normally.

【0006】これを防止する方法として、I/Oユニッ
トの電源投入を常時監視し、電源投入がある度にそのI
/Oユニットに割り付け情報を送信するようにすること
も考えられるが、データの伝送速度の低下を招くという
問題点がある。
As a method for preventing this, the power-on of the I / O unit is constantly monitored, and the I / O unit is monitored every time it is powered on.
Although it is conceivable to transmit the allocation information to the / O unit, there is a problem in that the data transmission rate is reduced.

【0007】本発明はこのような点に鑑みてなされたも
のであり、電源投入時の割り付けデータの送信を必要と
せずに、高速にかつ確実にデータの送受信を行うことの
できるI/Oモジュールのデータ転送方式を提供するこ
とを目的とする。
The present invention has been made in view of the above circumstances, and an I / O module capable of high-speed and reliable data transmission / reception without the need to transmit allocation data when the power is turned on. It is intended to provide a data transfer method of.

【0008】[0008]

【課題を解決するための手段】本発明では上記課題を解
決するために、I/Oユニットを介してPC(プログラ
マブル・コントローラ)に接続されるI/Oモジュール
のデータ転送方式において、前記I/Oユニットの各ス
ロットに接続されるI/Oモジュールが入力用モジュー
ルであるか出力用モジュールであるかを識別して識別信
号を出力する識別信号出力手段と、前記識別信号を受け
取ることにより前記スロットに接続された前記I/Oモ
ジュールを前記入力用モジュールと前記出力用モジュー
ルとにグループ分けし、前記グループ内でアドレス順位
を設定するアドレス順位設定手段と、前記入力用モジュ
ールから前記PC側に送る入力データと、前記PC側か
ら前記出力用モジュール側に送る出力データとをそれぞ
れ前記アドレス順位設定手段によって設定されたアドレ
ス順位に従って配列し保持するデータ保持手段と、前記
データ保持手段と前記各I/Oモジュールとの間で前記
入力データおよび前記出力データの遣り取りを行う制御
手段と、を有すること特徴とするI/Oモジュールのデ
ータ転送方式が提供される。
In order to solve the above problems, the present invention provides a data transfer system for an I / O module connected to a PC (programmable controller) via an I / O unit, wherein Identification signal output means for identifying whether the I / O module connected to each slot of the O unit is an input module or an output module and outputting an identification signal, and the slot by receiving the identification signal. The I / O module connected to the above is divided into the input module and the output module, and the address order setting means for setting the address order within the group, and the input module is sent from the input module to the PC side. The input data and the output data sent from the PC side to the output module side are arranged in the order of the addresses. Data holding means arranged and held in accordance with the address order set by the setting means, and control means for exchanging the input data and the output data between the data holding means and each of the I / O modules are provided. A data transfer method for an I / O module is provided.

【0009】[0009]

【作用】I/OモジュールがI/Oユニットの各スロッ
トに接続されると、入力用モジュールであるか出力用モ
ジュールであるかを識別信号出力手段が識別して識別信
号を出力する。アドレス順位設定手段は、識別信号を受
け取ることによりスロットに接続されたI/Oモジュー
ルを入力用モジュールと出力用モジュールとにグループ
分けし、そのグループ内でアドレス順位を設定する。デ
ータ保持手段は、入力用モジュールからPC側に送る入
力データと、PC側から出力用モジュール側に送る出力
データとをそれぞれアドレス順位設定手段によって設定
されたアドレス順位に従って配列し保持する。そして、
制御手段は、データ保持手段と各I/Oモジュールとの
間で入力データおよび出力データの遣り取りを行う。
When the I / O module is connected to each slot of the I / O unit, the discrimination signal output means discriminates between the input module and the output module and outputs the discrimination signal. The address order setting means divides the I / O module connected to the slot into an input module and an output module by receiving the identification signal, and sets the address order within the group. The data holding means arranges and holds input data sent from the input module to the PC side and output data sent from the PC side to the output module side according to the address order set by the address order setting means. And
The control means exchanges input data and output data between the data holding means and each I / O module.

【0010】これにより、PC側で設定された割り付け
データと、I/OユニットへのI/Oモジュールの取り
付け状態が対応していれば、PC側からI/Oユニット
に対して割り付けデータを送信しなくても、確実にデー
タの送受信が行われる。
As a result, if the allocation data set on the PC side corresponds to the installation state of the I / O module on the I / O unit, the allocation data is sent from the PC side to the I / O unit. Even if it does not, data is transmitted and received reliably.

【0011】[0011]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図2は本発明のデータ転送方式が行われる数値
制御システムの概略構成を示すブロック図である。数値
制御装置(CNC)10には、PMC(プログラマブル
・マシン・コントローラ)20が内蔵されている。この
PMC20には、通信ライン60を介して複数のI/O
ユニット501,502,・・・50Nが接続されてい
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a block diagram showing a schematic configuration of a numerical control system in which the data transfer system of the present invention is performed. A numerical control device (CNC) 10 has a PMC (programmable machine controller) 20 built therein. This PMC 20 has a plurality of I / Os via a communication line 60.
Units 501, 502, ... 50N are connected.

【0012】各I/Oユニット501〜50Nには、そ
れぞれPMC20によって制御される機械601,60
2,・・・60Nが接続されている。各機械601〜6
0Nからの入力データは、それぞれI/Oユニット50
1〜50N、および通信ライン60を介してPMC20
に送られる。一方、PMC20からの出力データは、逆
の経路を通して機械601〜60Nに送られる。
Each of the I / O units 501 to 50N has a machine 601 or 60 controlled by the PMC 20.
2, ... 60N are connected. Each machine 601-6
Input data from 0N is I / O unit 50
1 to 50 N and PMC 20 via communication line 60
Sent to. On the other hand, the output data from the PMC 20 is sent to the machines 601 to 60N through the reverse path.

【0013】図3は数値制御装置(CNC)10全体の
ハードウエアのブロック図である。PMC(プログラマ
ブル・マシン・コントローラ)20は数値制御装置(C
NC)10に内蔵されている。プロセッサ11は数値制
御装置(CNC)10全体の制御の中心となるプロセッ
サであり、バス19を介して、ROM13に格納された
システムプログラムを読み出し、このシステムプログラ
ムに従って、数値制御装置(CNC)10全体の制御を
実行する。
FIG. 3 is a block diagram of the hardware of the numerical controller (CNC) 10 as a whole. PMC (Programmable Machine Controller) 20 is a numerical controller (C
NC) 10. The processor 11 is a central processor for controlling the entire numerical controller (CNC) 10, reads a system program stored in the ROM 13 via a bus 19, and according to the system program, the entire numerical controller (CNC) 10 is read. Control of.

【0014】共有RAM12はCNC10とPMC20
とのデータの授受を行うためのRAMであり、この共有
RAM12を経由して、互いにデータの授受を行う。ま
た、同時に双方からのアクセスに必要なデータを格納す
る。
The shared RAM 12 is composed of the CNC 10 and the PMC 20.
RAM for exchanging data with each other, and exchanging data with each other via this shared RAM 12. At the same time, it stores the data required for access from both sides.

【0015】RAM14には一時的な計算データ、表示
データ等が格納される。CMOS15は不揮発性メモリ
として構成され、工具補正量、ピッチ誤差補正量、加工
プログラム及びパラメータ等が格納される。CMOSは
図示されていないバッテリでバックアップされ、数値制
御装置(CNC)10の電源がオフされても不揮発性メ
モリとなっているので、それらのデータはそのまま保持
される。また、CMOS15にはPMC20側に必要な
パラメータ等も格納されている。
The RAM 14 stores temporary calculation data, display data and the like. The CMOS 15 is configured as a non-volatile memory and stores a tool correction amount, a pitch error correction amount, a machining program, parameters and the like. The CMOS is backed up by a battery (not shown) and is a non-volatile memory even when the power supply of the numerical control device (CNC) 10 is turned off, so that the data is retained as it is. The CMOS 15 also stores parameters and the like required on the PMC 20 side.

【0016】グラフィック制御回路16は各軸の現在位
置、アラーム、パラメータ、画像データ、後述のI/O
ユニットアドレス等のディジタルデータを画像信号に変
換して出力する。この画像信号はCRT/MDIユニッ
ト30の表示装置31に送られ、表示装置31に表示さ
れる。PMC20側のパラメータ、ラダーダイヤグラム
等も表示装置31に表示することができる。このときの
データはPMC20から共有RAM12を経由して送ら
れてくる。
The graphic control circuit 16 includes a current position of each axis, an alarm, a parameter, image data, and an I / O described later.
Digital data such as unit address is converted into an image signal and output. This image signal is sent to the display device 31 of the CRT / MDI unit 30 and displayed on the display device 31. Parameters on the PMC 20 side, ladder diagrams, etc. can also be displayed on the display device 31. The data at this time is sent from the PMC 20 via the shared RAM 12.

【0017】インタフェース17はCRT/MDIユニ
ット30内のキーボード32からのデータを受けて、プ
ロセッサ11に渡す。また、PMC20側へのデータも
キーボード32から入力することができ、そのデータは
共有RAM12を経由して、PMC20側へ送られる。
The interface 17 receives data from the keyboard 32 in the CRT / MDI unit 30 and transfers it to the processor 11. Also, data to the PMC 20 side can be input from the keyboard 32, and the data is sent to the PMC 20 side via the shared RAM 12.

【0018】インタフェース18は外部機器用のインタ
フェースであり、紙テープリーダ、紙テープパンチャ
ー、紙テープリーダ・パンチャー、プリンタ等の外部機
器40が接続される。紙テープリーダからは加工プログ
ラムが読み込まれ、また、数値制御装置(CNC)10
内で編集された加工プログラムを紙テープパンチャーに
出力することができる。
The interface 18 is an interface for an external device, and is connected to an external device 40 such as a paper tape reader, a paper tape puncher, a paper tape reader / puncher, a printer or the like. The processing program is read from the paper tape reader and the numerical controller (CNC) 10
It is possible to output the editing program edited in the paper tape puncher.

【0019】プロセッサ11と共有RAM12、ROM
13等の要素はバス19によって結合されている。な
お、図ではサーボモータ等を制御する軸制御回路、サー
ボアンプ、スピンドル制御回路、スピンドルアンプ、手
動パルス発生器インタフェース等は省略してある。
Processor 11, shared RAM 12, ROM
Elements such as 13 are connected by a bus 19. In the figure, an axis control circuit for controlling a servo motor, a servo amplifier, a spindle control circuit, a spindle amplifier, a manual pulse generator interface, etc. are omitted.

【0020】PMC(プログラマブル・マシン・コント
ローラ)20にはPMC用のプロセッサ21があり、プ
ロセッサ21はバス25によって、共有RAM12と接
続され、共有RAM12はCNC10のバス19に結合
されている。
A PMC (Programmable Machine Controller) 20 has a processor 21 for PMC, the processor 21 is connected to a shared RAM 12 by a bus 25, and the shared RAM 12 is coupled to a bus 19 of a CNC 10.

【0021】また、バス25にはROM22が結合され
ている。ROM22は、EPROMからなり、PMC2
0を制御するための管理プログラムとシーケンス・プロ
グラムが格納されている。シーケンス・プログラムは一
般にラダー言語で作成されるが、パスカル等の高級言語
で作成される場合もある。後述のI/Oモジュールのア
ドレスに関するデータは、シーケンス・プログラムをR
OMに書き込む時、一緒に書き込まれる。
A ROM 22 is connected to the bus 25. ROM22 consists of EPROM, PMC2
A management program and a sequence program for controlling 0 are stored. The sequence program is generally written in a ladder language, but may be written in a high-level language such as Pascal. For the data related to the addresses of I / O modules, which will be described later, use the sequence program R
When written to OM, they are written together.

【0022】また、ROM22に代えて、ROMカセッ
ト用インタフェースを設け、ROMカセットにシーケン
ス・プログラム及びI/Oモジュールのアドレスデータ
を格納して、ROMカセット用インタフェースに接続す
る場合もある。このようにすることにより、簡単にシー
ケンス・プログラムをレベルアップしたり、シーケンス
・プログラムおよびI/Oモジュールのアドレスデータ
を変更することができる。
In some cases, instead of the ROM 22, a ROM cassette interface is provided, and the ROM cassette stores the sequence program and the address data of the I / O module and is connected to the ROM cassette interface. By doing so, it is possible to easily raise the level of the sequence program and change the address data of the sequence program and the I / O module.

【0023】さらに、バス25にはRAM23が結合さ
れており、RAM23には入出力信号が格納され、シー
ケンス・プログラムの実行に従って、その内容は書き換
えられていく。
Further, a RAM 23 is coupled to the bus 25, an input / output signal is stored in the RAM 23, and its contents are rewritten as the sequence program is executed.

【0024】I/O制御回路24は、バス25に接続さ
れ、RAM23に格納された出力データをシリアル信号
に変換し、通信ライン60を介してI/Oユニット50
1〜50Nに送る。また、I/Oユニット501〜50
Nからのシリアルな入力データをパラレル信号に変換し
てバス25に、入力モジュールのアドレスとともに送
る。その信号はプロセッサ21によって、RAM23に
格納される。
The I / O control circuit 24 is connected to the bus 25, converts the output data stored in the RAM 23 into a serial signal, and the I / O unit 50 through the communication line 60.
Send to 1-50N. In addition, I / O units 501 to 50
The serial input data from N is converted into a parallel signal and sent to the bus 25 together with the address of the input module. The signal is stored in the RAM 23 by the processor 21.

【0025】プロセッサ21はCNC10から共有RA
M12を経由して、M機能指令、T機能指令等の指令信
号を受け、一旦RAM23に格納し、その指令をROM
22に格納されたシーケンス・プログラムに従って処理
し、I/O制御回路24を経由して、I/Oユニット5
01〜50Nに出力する。この出力データによって、I
/Oユニット501〜50Nに接続された機械601〜
60N側の油圧機器、空圧機器、電磁機器等が制御され
る。
The processor 21 receives the shared RA from the CNC 10.
A command signal such as an M function command or a T function command is received via M12, temporarily stored in the RAM 23, and the command is stored in the ROM.
22 according to the sequence program stored in the I / O unit 5 via the I / O control circuit 24.
Output to 01 to 50N. With this output data, I
Machines 601-connected to the / O units 501-50N
The hydraulic equipment, pneumatic equipment, electromagnetic equipment, etc. on the 60N side are controlled.

【0026】また、プロセッサ21は機械601〜60
N側のリミットスイッチ信号、機械操作盤の操作スイッ
チの信号等の入力データを受けて、この入力データを一
旦RAM23に格納する。PMC20で処理する必要の
ない入力信号は共有RAM12を経由してプロセッサ1
1に送られる。その他の信号はシーケンス・プログラム
で処理し、一部の信号はCNC側へ、他の信号は出力デ
ータとして、I/O制御回路24を経由して、I/Oユ
ニット501〜50N側へ出力される。
Further, the processor 21 includes the machines 601 to 60.
Upon receiving input data such as the N-side limit switch signal and the signal from the operation switch of the machine operation panel, the input data is temporarily stored in the RAM 23. Input signals that do not need to be processed by the PMC 20 pass through the shared RAM 12 to the processor 1
Sent to 1. Other signals are processed by the sequence program, some signals are output to the CNC side, and other signals are output as output data to the I / O units 501 to 50N side via the I / O control circuit 24. It

【0027】一方、シーケンス・プログラムには、各軸
の移動等を制御する命令を含めることができる。これら
の指令はプロセッサ21によって読み出されると、共有
RAM12を経由してプロセッサ11に送られ、サーボ
モータを制御する。同様にして、スピンドルモータ等も
PMC20側からの指令で制御することもできる。
On the other hand, the sequence program can include instructions for controlling the movement of each axis. When these instructions are read by the processor 21, they are sent to the processor 11 via the shared RAM 12 to control the servo motor. Similarly, the spindle motor and the like can also be controlled by a command from the PMC 20 side.

【0028】また、ROM22に格納されたシーケンス
・プログラム、I/Oモジュールの配置やモジュールの
種類等の割り付けデータ、RAM23に格納された入出
力信号はCRT/MDIユニット30の表示装置31に
表示することができる。
The sequence program stored in the ROM 22, the allocation data such as the layout of I / O modules and the types of modules, and the input / output signals stored in the RAM 23 are displayed on the display device 31 of the CRT / MDI unit 30. be able to.

【0029】さらに、ROM22のシーケンス・プログ
ラムは共有RAM12、バス19を経由して、インタフ
ェース18に接続されたプリンタにプリントアウトする
ことができる。
Further, the sequence program of the ROM 22 can be printed out to the printer connected to the interface 18 via the shared RAM 12 and the bus 19.

【0030】さらに、インタフェース18にプログラム
作成装置を結合し、プログラム作成装置で作成されたシ
ーケンス・プログラム等をRAM23に転送し、RAM
23のシーケンス・プログラムでPMC20を動作させ
ることもできる。
Further, a program creating device is connected to the interface 18, the sequence program created by the program creating device is transferred to the RAM 23, and the RAM
It is also possible to operate the PMC 20 with a sequence program of 23.

【0031】図4はI/Oユニットの内部構成を示すブ
ロック図である。I/Oユニット501には、スロット
部51が設けられている。このスロット部51は、8個
のスロットSLOT1〜SLOT8を有しており、これ
らスロットSLOT1〜SLOT8には、それぞれI/
Oモジュール52a〜52hが接続される。また、I/
Oモジュール52a〜52hには、それぞれ8点づつの
機械が接続される。したがって、各スロットSLOT1
〜SLOT8とI/Oモジュール52a〜52hとの間
のデータの授受は、1バイト単位で行われる。ただし、
ここでは、モジュールが接続されるのはスロットSLO
T1、スロットSLOT2、スロットSLOT5、スロ
ットSLOT7、およびスロットSLOT8のみとす
る。
FIG. 4 is a block diagram showing the internal structure of the I / O unit. The I / O unit 501 is provided with a slot portion 51. The slot portion 51 has eight slots SLOT1 to SLOT8, and these slots SLOT1 to SLOT8 respectively have I / O.
The O modules 52a to 52h are connected. Also, I /
Machines each having eight points are connected to the O modules 52a to 52h. Therefore, each slot SLOT1
Data transfer between the ~ SLOT 8 and the I / O modules 52a to 52h is performed in 1-byte units. However,
Here, the module is connected to the slot SLO.
Only T1, slot SLOT2, slot SLOT5, slot SLOT7, and slot SLOT8 are set.

【0032】また、スロットSLOT1、スロットSL
OT5、およびスロットSLOT8には入力モジュール
が、一方、スロットSLOT2およびスロットSLOT
7には出力モジュールが接続される。これら各スロット
とモジュールの接続関係は、PMC20のROM22に
予め設定されている。
In addition, the slot SLOT1 and the slot SL
OT5 and slot SLOT8 have input modules, while slot SLOT2 and slot SLOT
An output module is connected to 7. The connection relationship between each of these slots and modules is preset in the ROM 22 of the PMC 20.

【0033】I/Oモジュール52a〜52hには、ス
ロット部51に接続されたか否か知らせる接続データT
Xと、入力モジュールか出力モジュールかを知らせる切
換データOXとが格納されている。接続データTXは、
各I/Oモジュール52a〜52hがスロット部51に
接続されたときに「L(ロー)」信号となってアドレス
順位設定部56に送られる。切換データOXは、出力モ
ジュールであれば「H(ハイ)」信号、入力モジュール
であれば「L(ロー)」信号がそれぞれのモジュールか
ら出力され、アドレス順位設定部56に送られる。
The I / O modules 52a to 52h are provided with a connection data T which informs whether or not the I / O modules 52a to 52h are connected to the slot section 51.
X and switching data OX indicating whether it is an input module or an output module are stored. The connection data TX is
When each of the I / O modules 52a to 52h is connected to the slot section 51, an "L (low)" signal is sent to the address rank setting section 56. As the switching data OX, an “H (high)” signal is output from each module if it is an output module, and an “L (low)” signal is output from each module if it is an input module, and sent to the address order setting unit 56.

【0034】アドレス順位設定部56は、接続データT
Xおよび切換データOXを受け取ることにより、スロッ
トSLOT1〜SLOT8に対するI/Oモジュールの
接続状態と、その種類を確認し、バッファ53に切換信
号BSを送る。バッファ53は、アドレス順位設定部5
6からの切換信号BSに応じて、スロットSLOT1〜
SLOT8をそれぞれ入力用、出力用のスロットに切り
換える。
The address order setting unit 56 uses the connection data T
By receiving X and the switching data OX, the connection state of the I / O module with respect to the slots SLOT1 to SLOT8 and its type are confirmed, and the switching signal BS is sent to the buffer 53. The buffer 53 includes the address rank setting unit 5
According to the switching signal BS from 6, the slots SLOT1 ...
The SLOT 8 is switched to an input slot and an output slot, respectively.

【0035】また、アドレス順位設定部56は、切換デ
ータOXに基づいて、接続されているI/Oモジュール
を入力モジュールのグループと出力モジュールのグルー
プとに分け、さらに、接続されているスロットの番号の
小さいものから順に小さいアドレス順位を設定する。
The address order setting unit 56 divides the connected I / O modules into a group of input modules and a group of output modules based on the switching data OX, and further, the number of the connected slot. The smaller address order is set in ascending order.

【0036】すなわち、図4の例でいえば、入力モジュ
ールのグループとして入力モジュール52a、入力モジ
ュール52e、および入力モジュール52hの順にアド
レス順位を設定する。一方、出力モジュールのグループ
として出力モジュール52b、出力モジュール52gの
順にアドレス順位を設定する。このアドレス順位の設定
が終了すると、アドレス順位設定部56は、その内容を
アドレス順位設定データADとしてデータ通信部54お
よびI/Oデータ制御部55に送る。
That is, in the example of FIG. 4, the address order is set in the order of the input module 52a, the input module 52e, and the input module 52h as a group of input modules. On the other hand, the address order is set as the output module group in the order of the output module 52b and the output module 52g. When the setting of the address rank is completed, the address rank setting unit 56 sends the contents to the data communication unit 54 and the I / O data control unit 55 as the address rank setting data AD.

【0037】データ通信部54には、CNC10側から
出力モジュール52bおよび52gに対して送られる出
力データが通信ライン60を介して入力される。また、
データ通信部54は、入力モジュール52a、52e、
および52hからの入力データを通信ライン60を介し
てCNC10側に送る。
Output data sent from the CNC 10 side to the output modules 52b and 52g are input to the data communication unit 54 via the communication line 60. Also,
The data communication unit 54 includes input modules 52a, 52e,
And the input data from 52h are sent to the CNC 10 side via the communication line 60.

【0038】データ通信部54には、後述する入力デー
タ保持メモリ54aと、出力データ保持メモリ54bと
が設けられている。データ通信部54は、アドレス順位
設定部56からのアドレス順位設定データADに基づい
て、入力データを入力データ保持メモリ54aに、出力
データを出力データ保持メモリ54bにそれぞれ設定さ
れたアドレス順に格納する。
The data communication section 54 is provided with an input data holding memory 54a and an output data holding memory 54b which will be described later. The data communication unit 54 stores the input data in the input data holding memory 54a and the output data in the output data holding memory 54b in the order of the addresses, based on the address order setting data AD from the address order setting unit 56.

【0039】I/Oデータ制御部55は、アドレス順位
設定部56からのアドレス順位設定データADに基づい
て、データ通信部54の出力データ保持メモリ54bか
ら出力データODをアドレス順位の設定順に読み出し、
各スロットSROT2,およびSROT7にそれぞれ対
応する出力データODをバッファ53を介して転送す
る。
The I / O data control unit 55 reads out the output data OD from the output data holding memory 54b of the data communication unit 54 based on the address order setting data AD from the address order setting unit 56, in the order of setting the address order,
The output data OD corresponding to each of the slots SROT2 and SROT7 is transferred via the buffer 53.

【0040】また、I/Oデータ制御部55は、バッフ
ァ53を介して各スロットSLOT1,SLOT5およ
びSLOT8からそれぞれ入力データIDを読み出し、
アドレス順位設定データADに基づいて、データ通信部
54の入力データ保持メモリ54aに入力データIDを
アドレス順位の設定順に転送する。
Further, the I / O data control section 55 reads the input data ID from each of the slots SLOT1, SLOT5 and SLOT8 via the buffer 53,
Based on the address order setting data AD, the input data ID is transferred to the input data holding memory 54a of the data communication unit 54 in the order of setting the address order.

【0041】図1は入出力データの遣り取りの概念図で
ある。入力データ保持メモリ54aおよび出力データ保
持メモリ54bには、それぞれ1バイト毎に格納領域が
設けられている。入力データ保持メモリ54aの1バイ
トめの領域にはスロットSLOT1に接続されている入
力モジュール52aの入力データが格納される。2バイ
トめの領域には、スロットSLOT5に接続されている
入力モジュール52eの入力データが、また、3バイト
めの領域には、スロットSLOT8に接続されている入
力モジュール52hの入力データが格納される。
FIG. 1 is a conceptual diagram of the exchange of input / output data. The input data holding memory 54a and the output data holding memory 54b each have a storage area for each byte. Input data of the input module 52a connected to the slot SLOT1 is stored in the first byte area of the input data holding memory 54a. Input data of the input module 52e connected to the slot SLOT5 is stored in the second byte area, and input data of the input module 52h connected to the slot SLOT8 is stored in the third byte area. .

【0042】すなわち、接続されているスロットの番号
の小さいものから順に、I/Oデータ制御部55によっ
て格納されて行く。ここで、1バイトめの領域に格納さ
れている入力データのアドレスを入力アドレスAとする
と、2バイトめの入力データのアドレスは、入力アドレ
スA+8となる。同様に、3バイトめの入力データのア
ドレスは、入力アドレスA+16となる。なお、ここで
は4バイトめ以降の領域には、入力データは格納されな
い。
That is, the I / O data control section 55 stores the slots in ascending order of number. Here, if the address of the input data stored in the first byte area is the input address A, the address of the second byte input data is the input address A + 8. Similarly, the address of the third byte of input data is the input address A + 16. It should be noted that, here, the input data is not stored in the area after the fourth byte.

【0043】一方、出力データ保持メモリ54bの1バ
イトめおよび2バイトめの各領域には、PMC20から
出力モジュール52bおよび52gに送られる出力デー
タが、スロットの番号順にそれぞれ格納されている。こ
こで、1バイトめの領域に格納されている出力データの
アドレスを出力アドレスBとすると、2バイトめの出力
データのアドレスは、出力アドレスB+8となる。な
お、ここでは、3バイトめ以降の領域には、入力データ
は格納されない。
On the other hand, the output data sent from the PMC 20 to the output modules 52b and 52g are stored in the 1st byte area and the 2nd byte area of the output data holding memory 54b in the order of slot numbers. Here, if the address of the output data stored in the area of the first byte is the output address B, the address of the output data of the second byte is the output address B + 8. Note that, here, the input data is not stored in the area after the third byte.

【0044】出力データ保持メモリ54bに格納された
出力データは、I/Oデータ制御部55によって、1バ
イトめ、2バイトめの順に読み出され、それぞれスロッ
トSLOT2、SLOT7に送られる。
The output data stored in the output data holding memory 54b is read by the I / O data control unit 55 in the order of the first byte and the second byte and sent to the slots SLOT2 and SLOT7, respectively.

【0045】図5はCNC10とデータ通信部54との
間で遣り取りされるデータコード例を示す図であり、
(A)はCNC10からデータ通信部54に送られる出
力データコードを示す図、(B)はデータ通信部54か
らCNC10に送られる入力データコードを示す図であ
る。出力データコード71は、スタートビット、ヘッダ
0、ヘッダ1、1バイトめ出力データ、2バイトめ出力
データ、およびストップビットから構成されている。
FIG. 5 is a diagram showing an example of data code exchanged between the CNC 10 and the data communication section 54.
(A) is a diagram showing an output data code sent from the CNC 10 to the data communication unit 54, and (B) is a diagram showing an input data code sent from the data communication unit 54 to the CNC 10. The output data code 71 is composed of a start bit, header 0, header 1, first byte output data, second byte output data, and stop bits.

【0046】スタートビットおよびストップビットは、
それぞれデータコードの開始と終了を示す部分である。
ヘッダ0は、データの送り先のI/Oユニット501〜
50Nの区別を示す部分であり、8ビットで構成されて
いる。ヘッダ1は、後に続くデータのバイト数を示す部
分であり、8ビットで構成されている。このヘッダ1の
後に実際の出力データが対応するスロット番号の小さい
順に付加されている。ここでは、出力モジュールは2個
なので、2バイト分の出力データが付加されている。
The start bit and stop bit are
Each is a part showing the start and end of the data code.
The header 0 is the I / O unit 501 to which the data is sent.
This is a portion indicating the distinction of 50N, and is composed of 8 bits. The header 1 is a portion indicating the number of bytes of the data that follows, and is composed of 8 bits. After this header 1, actual output data is added in ascending order of the corresponding slot number. Here, since there are two output modules, two bytes of output data are added.

【0047】一方、入力データコード72は、出力デー
タコード71と同様にスタートビット、ヘッダ0、ヘッ
ダ1、およびストップビットを有しており、ヘッダ1と
ストップビットとの間には、1バイトめ入力データ、2
バイトめ入力データ、および3バイトめ入力データが対
応するスロット番号の小さい順に付加されている。
On the other hand, the input data code 72, like the output data code 71, has a start bit, a header 0, a header 1 and a stop bit, and the first byte is between the header 1 and the stop bit. Input data, 2
The byte first input data and the third byte input data are added in ascending order of the corresponding slot numbers.

【0048】このように、本実施例では、I/Oモジュ
ールを入力用のモジュールと出力用のモジュールとにグ
ループ分けし、各グループ内で、モジュールが接続され
ているスロットの番号順にアドレス順位を設定するよう
にしたので、アドレス順位の設定順にシリアルにデータ
を繋げることにより、PMC20側(あるいはCNC1
0側)とI/Oユニット501との間で、容易にかつ確
実にデータの遣り取りを行うことができる。このため、
電源投入時等にPMC20側から割り付けデータを送信
したり、周期的に割り付けデータを送信したりする必要
がなくなる。したがって、一部のI/Oユニットの電源
投入のタイミングがずれてもシステム全体への影響を失
くすことができ、かつデータ伝送速度の低下を防止でき
る。
As described above, in this embodiment, the I / O modules are divided into the input modules and the output modules, and the address order is arranged in each group in the order of the numbers of the slots to which the modules are connected. Since the setting is made, by connecting the data serially in the order of setting the address order, the PMC20 side (or CNC1
(0 side) and the I / O unit 501 can easily and reliably exchange data. For this reason,
It is not necessary to transmit allocation data from the PMC 20 side or to transmit allocation data periodically when the power is turned on. Therefore, even if the power-on timing of some I / O units is deviated, the influence on the entire system can be lost, and a decrease in data transmission rate can be prevented.

【0049】なお、図4では、I/Oユニット501の
みの構成を示したが、他のI/Oユニット502〜50
Nについてもほぼ同じ構成であるので、説明を省略す
る。
Although FIG. 4 shows the configuration of only the I / O unit 501, other I / O units 502-50.
Since N has almost the same configuration, its description is omitted.

【0050】[0050]

【発明の効果】以上説明したように本発明では、I/O
モジュールを入力用モジュールと出力用モジュールとに
グループ分けし、各グループ内でアドレス順位を設定す
るようにしたので、アドレス順位の設定順にシリアルに
データを繋げることにより、PCとI/Oユニットとの
間で、容易にかつ確実にデータの遣り取りを行うことが
できる。このため、電源投入時等にPC側から割り付け
データを送信したり、周期的に割り付けデータを送信し
たりする必要がなくなる。したがって、一部のI/Oユ
ニットの電源投入のタイミングがずれてもシステム全体
への影響を失くすことができ、かつデータ伝送速度の低
下を防止できる。
As described above, according to the present invention, the I / O
The modules are divided into an input module and an output module, and the address order is set within each group. By connecting the data serially in the order of setting the address order, the PC and the I / O unit are connected. In between, data can be exchanged easily and reliably. Therefore, it is not necessary to transmit the allocation data from the PC side or to periodically transmit the allocation data when the power is turned on. Therefore, even if the power-on timing of some I / O units is deviated, the influence on the entire system can be lost, and a decrease in data transmission rate can be prevented.

【図面の簡単な説明】[Brief description of drawings]

【図1】入出力データの遣り取りの概念図である。FIG. 1 is a conceptual diagram of exchange of input / output data.

【図2】本発明のデータ転送方式が行われる数値制御シ
ステムの概略構成を示すブロック図である。
FIG. 2 is a block diagram showing a schematic configuration of a numerical control system in which the data transfer system of the present invention is performed.

【図3】数値制御装置(CNC)全体のハードウエアの
ブロック図である。
FIG. 3 is a block diagram of hardware of an entire numerical controller (CNC).

【図4】I/Oユニットの内部構成を示すブロック図で
ある。
FIG. 4 is a block diagram showing an internal configuration of an I / O unit.

【図5】CNCとデータ通信部との間で遣り取りされる
データコード例を示す図であり、(A)はCNCからデ
ータ通信部に送られる出力データコードを示す図、
(B)はデータ通信部からCNCに送られる入力データ
コードを示す図である。
FIG. 5 is a diagram showing an example of a data code exchanged between a CNC and a data communication unit, FIG. 5A is a diagram showing an output data code sent from the CNC to the data communication unit,
(B) is a diagram showing an input data code sent from the data communication unit to the CNC.

【符号の説明】[Explanation of symbols]

10 数値制御装置(CNC) 20 PMC 60 通信ライン 501〜50N I/Oユニット 601〜60N 機械 51 スロット部 52a〜52h I/Oモジュール 53 バッファ 54 データ通信部 55 I/Oデータ制御部 56 アドレス順位設定部 54a 入力データ保持メモリ 54b 出力データ保持メモリ 10 numerical control device (CNC) 20 PMC 60 communication line 501 to 50N I / O unit 601 to 60N machine 51 slot section 52a to 52h I / O module 53 buffer 54 data communication section 55 I / O data control section 56 address order setting Part 54a Input data holding memory 54b Output data holding memory

【手続補正書】[Procedure amendment]

【提出日】平成4年11月10日[Submission date] November 10, 1992

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】全文[Correction target item name] Full text

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【書類名】 明細書[Document name] Statement

【発明の名称】 I/Oモジュールのデータ転送方式Title of data transfer system of I / O module

【特許請求の範囲】[Claims]

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はPC(プログラマブル・
コントローラ)に接続されるI/Oモジュールのデータ
転送方式に関し、特にI/Oユニットに実装されるI/
Oモジュールのデータ転送方式に関する。
The present invention relates to a PC (programmable
Data transfer method of an I / O module connected to a controller), particularly an I / O module mounted in an I / O unit
The present invention relates to a data transfer method of an O module.

【0002】[0002]

【従来の技術】従来、PC(プログラマブル・コントロ
ーラ)では、PC本体とI/Oユニットとを別々に構成
し、I/OユニットにI/Oモジュールを実装する形式
のものがある。これはI/Oユニットを制御対象付近に
置き、入出力信号をI/Oユニットに集めてPC本体と
接続することにより、入出力信号の接続を容易にするた
めである。
2. Description of the Related Art Conventionally, there is a type of PC (programmable controller) in which a PC main body and an I / O unit are separately configured and an I / O module is mounted on the I / O unit. This is because the I / O unit is placed in the vicinity of the controlled object, and the input / output signals are collected in the I / O unit and connected to the PC body to facilitate the connection of the input / output signals.

【0003】I/Oモジュールには、入出力信号を処理
するモジュール、あるいはアナログ値をディジタル値に
変換するD/A変換器等がある。これらのI/Oモジュ
ールは、入出力信号あるいは点数等によって多数の種類
が用意されており、制御対象に応じたPCシステムを構
成することができる。
The I / O module includes a module that processes an input / output signal, a D / A converter that converts an analog value into a digital value, and the like. Many types of these I / O modules are prepared according to input / output signals, points, etc., and a PC system according to a control target can be configured.

【0004】ところで、I/Oモジュールには多数の種
類があるため、種類を誤るとPCが正常に動作しない。
このため、従来は、PCと各I/Oモジュールとの間で
送受されるデータのアドレスの対応を図るため、予め各
モジュールのアドレスの割り付けを行っている。この割
り付けデータは、PC側のメモリに格納されており、P
Cの電源投入時等に各I/Oユニットに送られる。各I
/Oユニットは、この割り付けデータに基づいてPC側
とI/Oモジュール側との対応を図り、両者間のデータ
の送受信を行っている。
By the way, since there are many types of I / O modules, if the type is wrong, the PC will not operate normally.
Therefore, conventionally, the addresses of the respective modules are assigned in advance in order to correspond the addresses of the data transmitted and received between the PC and the respective I / O modules. This allocation data is stored in the memory on the PC side, and P
It is sent to each I / O unit when the power of C is turned on. Each I
The / O unit tries to correspond the PC side and the I / O module side based on this allocation data, and transmits / receives data between them.

【0005】[0005]

【発明が解決しようとする課題】しかし、PCの電源投
入時に、一部のI/Oユニットの電源が投入されていな
いと、そのI/Oユニットに関しては後から電源が投入
されたとしてもデータの送受信が正常に行われなくなる
という問題点があった。
However, if some of the I / O units are not turned on when the PC is turned on, the data of the I / O units may be turned on later even if they are turned on. There was a problem that the sending and receiving of would not be performed normally.

【0006】これを防止する方法として、I/Oユニッ
トの電源投入を常時監視し、電源投入がある度にそのI
/Oユニットに割り付け情報を送信するようにすること
も考えられるが、データの伝送速度の低下を招くという
問題点がある。
As a method for preventing this, the power-on of the I / O unit is constantly monitored, and the I / O unit is monitored every time it is powered on.
Although it is conceivable to transmit the allocation information to the / O unit, there is a problem in that the data transmission rate is reduced.

【0007】本発明はこのような点に鑑みてなされたも
のであり、電源投入時の割り付けデータの送信を必要と
せずに、高速にかつ確実にデータの送受信を行うことの
できるI/Oモジュールのデータ転送方式を提供するこ
とを目的とする。
The present invention has been made in view of the above circumstances, and an I / O module capable of high-speed and reliable data transmission / reception without the need to transmit allocation data when the power is turned on. It is intended to provide a data transfer method of.

【0008】[0008]

【課題を解決するための手段】本発明では上記課題を解
決するために、I/Oユニットを介してPC(プログラ
マブル・コントローラ)に接続されるI/Oモジュール
のデータ転送方式において、前記I/Oユニットの各ス
ロットに接続されるI/Oモジュールが入力用モジュー
ルであるか出力用モジュールであるかを識別して識別信
号を出力する識別信号出力手段と、前記識別信号を受け
取ることにより前記スロットに接続された前記I/Oモ
ジュールを前記入力用モジュールと前記出力用モジュー
ルとにグループ分けし、前記グループ内でアドレス順位
を設定するアドレス順位設定手段と、前記入力用モジュ
ールから前記PC側に送る入力データと、前記PC側か
ら前記出力用モジュール側に送る出力データとをそれぞ
れ前記アドレス順位設定手段によって設定されたアドレ
ス順位に従って配列し保持するデータ保持手段と、前記
データ保持手段と前記各I/Oモジュールとの間で前記
入力データおよび前記出力データの遣り取りを行う制御
手段と、を有すること特徴とするI/Oモジュールの
データ転送方式が提供される。
In order to solve the above problems, the present invention provides a data transfer system for an I / O module connected to a PC (programmable controller) via an I / O unit, wherein Identification signal output means for identifying whether the I / O module connected to each slot of the O unit is an input module or an output module and outputting an identification signal, and the slot by receiving the identification signal. The I / O module connected to the above is divided into the input module and the output module, and the address order setting means for setting the address order within the group, and the input module is sent from the input module to the PC side. The input data and the output data sent from the PC side to the output module side are arranged in the order of the addresses. Data holding means arranged and held in accordance with the address order set by the setting means, and control means for exchanging the input data and the output data between the data holding means and each of the I / O modules are provided. data transfer method of the I / O module is provided, characterized in that.

【0009】[0009]

【作用】I/OモジュールがI/Oユニットの各スロッ
トに接続されると、入力用モジュールであるか出力用モ
ジュールであるかを識別信号出力手段が識別して識別信
号を出力する。アドレス順位設定手段は、識別信号を受
け取ることによりスロットに接続されたI/Oモジュー
ルを入力用モジュールと出力用モジュールとにグループ
分けし、そのグループ内でアドレス順位を設定する。デ
ータ保持手段は、入力用モジュールからPC側に送る入
力データと、PC側から出力用モジュール側に送る出力
データとをそれぞれアドレス順位設定手段によって設定
されたアドレス順位に従って配列し保持する。そして、
制御手段は、データ保持手段と各I/Oモジュールとの
間で入力データおよび出力データの遣り取りを行う。
When the I / O module is connected to each slot of the I / O unit, the discrimination signal output means discriminates between the input module and the output module and outputs the discrimination signal. The address order setting means divides the I / O module connected to the slot into an input module and an output module by receiving the identification signal, and sets the address order within the group. The data holding means arranges and holds input data sent from the input module to the PC side and output data sent from the PC side to the output module side according to the address order set by the address order setting means. And
The control means exchanges input data and output data between the data holding means and each I / O module.

【0010】これにより、PC側で設定された割り付け
データと、I/OユニットへのI/Oモジュールの取り
付け状態が対応していれば、PC側からI/Oユニット
に対して割り付けデータを送信しなくても、確実にデー
タの送受信が行われる。
As a result, if the allocation data set on the PC side corresponds to the installation state of the I / O module on the I / O unit, the allocation data is sent from the PC side to the I / O unit. Even if it does not, data is transmitted and received reliably.

【0011】[0011]

【実施例】以下、本発明の一実施例を図面に基づいて説
明する。図2は本発明のデータ転送方式が行われる数値
制御システムの概略構成を示すブロック図である。数値
制御装置(CNC)10には、PMC(プログラマブル
・マシン・コントローラ)20が内蔵されている。この
PMC20には、通信ライン60を介して複数のI/O
ユニット501,502,・・・50Nが接続されてい
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 2 is a block diagram showing a schematic configuration of a numerical control system in which the data transfer system of the present invention is performed. A numerical control device (CNC) 10 has a PMC (programmable machine controller) 20 built therein. This PMC 20 has a plurality of I / Os via a communication line 60.
Units 501, 502, ... 50N are connected.

【0012】各I/Oユニット501〜50Nには、そ
れぞれPMC20によって制御される機械601,60
2,・・・60Nが接続されている。各機械601〜6
0Nからの入力データは、それぞれI/Oユニット50
1〜50N、および通信ライン60を介してPMC20
に送られる。一方、PMC20からの出力データは、逆
の経路を通して機械601〜60Nに送られる。
Each of the I / O units 501 to 50N has a machine 601 or 60 controlled by the PMC 20.
2, ... 60N are connected. Each machine 601-6
Input data from 0N is I / O unit 50
1 to 50 N and PMC 20 via communication line 60
Sent to. On the other hand, the output data from the PMC 20 is sent to the machines 601 to 60N through the reverse path.

【0013】図3は数値制御装置(CNC)10全体の
ハードウエアのブロック図である。PMC(プログラマ
ブル・マシン・コントローラ)20は数値制御装置(C
NC)10に内蔵されている。プロセッサ11は数値制
御装置(CNC)10全体の制御の中心となるプロセッ
サであり、バス19を介して、ROM13に格納された
システムプログラムを読み出し、このシステムプログラ
ムに従って、数値制御装置(CNC)10全体の制御を
実行する。
FIG. 3 is a block diagram of the hardware of the numerical controller (CNC) 10 as a whole. PMC (Programmable Machine Controller) 20 is a numerical controller (C
NC) 10. The processor 11 is a central processor for controlling the entire numerical controller (CNC) 10, reads a system program stored in the ROM 13 via a bus 19, and according to the system program, the entire numerical controller (CNC) 10 is read. Control of.

【0014】共有RAM12はCNC10とPMC20
とのデータの授受を行うためのRAMであり、この共有
RAM12を経由して、互いにデータの授受を行う。ま
た、同時に双方からのアクセスに必要なデータを格納す
る。
The shared RAM 12 is composed of the CNC 10 and the PMC 20.
RAM for exchanging data with each other, and exchanging data with each other via this shared RAM 12. At the same time, it stores the data required for access from both sides.

【0015】RAM14には一時的な計算データ、表示
データ等が格納される。CMOS15は不揮発性メモリ
として構成され、工具補正量、ピッチ誤差補正量、加工
プログラム及びパラメータ等が格納される。CMOSは
図示されていないバッテリでバックアップされ、数値制
御装置(CNC)10の電源がオフされても不揮発性メ
モリとなっているので、それらのデータはそのまま保持
される。また、CMOS15にはPMC20側に必要な
パラメータ等も格納されている。
The RAM 14 stores temporary calculation data, display data and the like. The CMOS 15 is configured as a non-volatile memory and stores a tool correction amount, a pitch error correction amount, a machining program, parameters and the like. The CMOS is backed up by a battery (not shown) and is a non-volatile memory even when the power supply of the numerical control device (CNC) 10 is turned off, so that the data is retained as it is. The CMOS 15 also stores parameters and the like required on the PMC 20 side.

【0016】グラフィック制御回路16は各軸の現在位
置、アラーム、パラメータ、画像データ、後述のI/O
ユニットアドレス等のディジタルデータを画像信号に変
換して出力する。この画像信号はCRT/MDIユニッ
ト30の表示装置31に送られ、表示装置31に表示さ
れる。PMC20側のパラメータ、ラダーダイヤグラム
等も表示装置31に表示することができる。このときの
データはPMC20から共有RAM12を経由して送ら
れてくる。
The graphic control circuit 16 includes a current position of each axis, an alarm, a parameter, image data, and an I / O described later.
Digital data such as unit address is converted into an image signal and output. This image signal is sent to the display device 31 of the CRT / MDI unit 30 and displayed on the display device 31. Parameters on the PMC 20 side, ladder diagrams, etc. can also be displayed on the display device 31. The data at this time is sent from the PMC 20 via the shared RAM 12.

【0017】インタフェース17はCRT/MDIユニ
ット30内のキーボード32からのデータを受けて、プ
ロセッサ11に渡す。また、PMC20側へのデータも
キーボード32から入力することができ、そのデータは
共有RAM12を経由して、PMC20側へ送られる。
The interface 17 receives data from the keyboard 32 in the CRT / MDI unit 30 and transfers it to the processor 11. Also, data to the PMC 20 side can be input from the keyboard 32, and the data is sent to the PMC 20 side via the shared RAM 12.

【0018】インタフェース18は外部機器用のインタ
フェースであり、紙テープリーダ、紙テープパンチャ
ー、紙テープリーダ・パンチャー、プリンタ等の外部機
器40が接続される。紙テープリーダからは加工プログ
ラムが読み込まれ、また、数値制御装置(CNC)10
内で編集された加工プログラムを紙テープパンチャーに
出力することができる。
The interface 18 is an interface for an external device, and is connected to an external device 40 such as a paper tape reader, a paper tape puncher, a paper tape reader / puncher, a printer or the like. The processing program is read from the paper tape reader and the numerical controller (CNC) 10
It is possible to output the editing program edited in the paper tape puncher.

【0019】プロセッサ11と共有RAM12、ROM
13等の要素はバス19によって結合されている。な
お、図ではサーボモータ等を制御する軸制御回路、サー
ボアンプ、スピンドル制御回路、スピンドルアンプ、手
動パルス発生器インタフェース等は省略してある。
Processor 11, shared RAM 12, ROM
Elements such as 13 are connected by a bus 19. In the figure, an axis control circuit for controlling a servo motor, a servo amplifier, a spindle control circuit, a spindle amplifier, a manual pulse generator interface, etc. are omitted.

【0020】PC(プログラマブル・コントローラ)と
してのPMC(プログラマブル・マシン・コントロー
ラ)20にはPMC用のプロセッサ21があり、プロセ
ッサ21はバス25によって、共有RAM12と接続さ
れ、共有RAM12はCNC10のバス19に結合され
ている。
With a PC (programmable controller)
The PMC (Programmable Machine Controller) 20 has a processor 21 for PMC, and the processor 21 is connected to the shared RAM 12 by a bus 25, and the shared RAM 12 is coupled to the bus 19 of the CNC 10.

【0021】また、バス25にはROM22が結合され
ている。ROM22は、EPROMからなり、PMC2
0を制御するための管理プログラムとシーケンス・プロ
グラムが格納されている。シーケンス・プログラムは一
般にラダー言語で作成されるが、パスカル等の高級言語
で作成される場合もある。後述のI/Oモジュールのア
ドレスに関するデータは、シーケンス・プログラムをR
OMに書き込む時、一緒に書き込まれる。
A ROM 22 is connected to the bus 25. ROM22 consists of EPROM, PMC2
A management program and a sequence program for controlling 0 are stored. The sequence program is generally written in a ladder language, but may be written in a high-level language such as Pascal. For the data related to the addresses of I / O modules, which will be described later, use the sequence program R
When written to OM, they are written together.

【0022】また、ROM22に代えて、ROMカセッ
ト用インタフェースを設け、ROMカセットにシーケン
ス・プログラム及びI/Oモジュールのアドレスデータ
を格納して、ROMカセット用インタフェースに接続す
る場合もある。このようにすることにより、簡単にシー
ケンス・プログラムをレベルアップしたり、シーケンス
・プログラムおよびI/Oモジュールのアドレスデータ
を変更することができる。
In some cases, instead of the ROM 22, a ROM cassette interface is provided, and the ROM cassette stores the sequence program and the address data of the I / O module and is connected to the ROM cassette interface. By doing so, it is possible to easily raise the level of the sequence program and change the address data of the sequence program and the I / O module.

【0023】さらに、バス25にはRAM23が結合さ
れており、RAM23には入出力信号の内容が格納さ
れ、シーケンス・プログラムの実行に従って、その内容
は書き換えられていく。
Further, a RAM 23 is coupled to the bus 25, the contents of the input / output signals are stored in the RAM 23, and the contents are rewritten as the sequence program is executed.

【0024】I/O制御回路24は、バス25に接続さ
れ、RAM23に格納された出力データをシリアル信号
に変換し、通信ライン60を介してI/Oユニット50
1〜50Nに送る。また、I/Oユニット501〜50
Nからのシリアルな入力データをパラレル信号に変換し
てバス25に、入力モジュールのアドレスとともに送
る。その信号はプロセッサ21によって、RAM23に
格納される。
The I / O control circuit 24 is connected to the bus 25, converts the output data stored in the RAM 23 into a serial signal, and the I / O unit 50 through the communication line 60.
Send to 1-50N. In addition, I / O units 501 to 50
The serial input data from N is converted into a parallel signal and sent to the bus 25 together with the address of the input module. The signal is stored in the RAM 23 by the processor 21.

【0025】プロセッサ21はCNC10から共有RA
M12を経由して、M機能指令、T機能指令等の指令信
号を受け、一旦RAM23に格納し、その指令をROM
22に格納されたシーケンス・プログラムに従って処理
し、I/O制御回路24を経由して、I/Oユニット5
01〜50Nに出力する。この出力データによって、I
/Oユニット501〜50Nに接続された機械601〜
60N側の油圧機器、空圧機器、電磁機器等が制御され
る。
The processor 21 receives the shared RA from the CNC 10.
A command signal such as an M function command or a T function command is received via M12, temporarily stored in the RAM 23, and the command is stored in the ROM.
22 according to the sequence program stored in the I / O unit 5 via the I / O control circuit 24.
Output to 01 to 50N. With this output data, I
Machines 601-connected to the / O units 501-50N
The hydraulic equipment, pneumatic equipment, electromagnetic equipment, etc. on the 60N side are controlled.

【0026】また、プロセッサ21は機械601〜60
N側のリミットスイッチ信号、機械操作盤の操作スイッ
チの信号等の入力データを受けて、この入力データを一
旦RAM23に格納する。PMC20で処理する必要の
ない入力信号は共有RAM12を経由してプロセッサ1
1に送られる。その他の信号はシーケンス・プログラム
で処理し、CNC側へ送られたり、出力データとなった
りする。出力データはI/O制御回路24を経由して、
I/Oユニット501〜50N側へ出力される。
Further, the processor 21 includes the machines 601 to 60.
Upon receiving input data such as the N-side limit switch signal and the signal from the operation switch of the machine operation panel, the input data is temporarily stored in the RAM 23. Input signals that do not need to be processed by the PMC 20 pass through the shared RAM 12 to the processor 1
Sent to 1. Other signals are processed in the sequence program, or sent to the CNC side, it became output data
To The output data passes through the I / O control circuit 24,
It is output to the I / O units 501 to 50N side.

【0027】一方、シーケンス・プログラムには、各軸
の移動等を制御する命令を含めることができる。これら
の指令はプロセッサ21によって読み出されると、共有
RAM12を経由してプロセッサ11に送られ、サーボ
モータを制御する。同様にして、スピンドルモータ等も
PMC20側からの指令で制御することもできる。
On the other hand, the sequence program can include instructions for controlling the movement of each axis. When these instructions are read by the processor 21, they are sent to the processor 11 via the shared RAM 12 to control the servo motor. Similarly, the spindle motor and the like can also be controlled by a command from the PMC 20 side.

【0028】また、ROM22に格納されたシーケンス
・プログラム、I/Oモジュールの配置やモジュールの
種類等の割り付けデータ、RAM23に格納された入出
力信号はCRT/MDIユニット30の表示装置31に
表示することができる。
The sequence program stored in the ROM 22, the allocation data such as the layout of I / O modules and the types of modules, and the input / output signals stored in the RAM 23 are displayed on the display device 31 of the CRT / MDI unit 30. be able to.

【0029】さらに、ROM22のシーケンス・プログ
ラムは共有RAM12、バス19を経由して、インタフ
ェース18に接続されたプリンタにプリントアウトする
ことができる。
Further, the sequence program of the ROM 22 can be printed out to the printer connected to the interface 18 via the shared RAM 12 and the bus 19.

【0030】さらに、インタフェース18にプログラム
作成装置を結合し、プログラム作成装置で作成されたシ
ーケンス・プログラム等をRAM23に転送し、RAM
23のシーケンス・プログラムでPMC20を動作させ
ることもできる。
Further, a program creating device is connected to the interface 18, the sequence program created by the program creating device is transferred to the RAM 23, and the RAM
It is also possible to operate the PMC 20 with a sequence program of 23.

【0031】図4はI/Oユニットの内部構成を示すブ
ロック図である。I/Oユニット501には、スロット
部51が設けられている。このスロット部51は、8個
のスロットSLOT1〜SLOT8を有しており、これ
らスロットSLOT1〜SLOT8には、それぞれI/
Oモジュール52a〜52hが接続されるものとする
また、I/Oモジュール52a〜52hには、それぞれ
8点づつの入力または出力負荷を持っている機械が接続
されるものとする。したがって、各スロットSLOT1
〜SLOT8とI/Oモジュール52a〜52hとの間
のデータの授受は、1バイト単位で行われるものとす
。ただし、ここでは、モジュールが接続されるのはス
ロットSLOT1、スロットSLOT2、スロットSL
OT5、スロットSLOT7、およびスロットSLOT
8のみとする。
FIG. 4 is a block diagram showing the internal structure of the I / O unit. The I / O unit 501 is provided with a slot portion 51. The slot portion 51 has eight slots SLOT1 to SLOT8, and these slots SLOT1 to SLOT8 respectively have I / O.
Shall O module 52a~52h is connected.
The I / O modules 52a-52h, it is assumed that the machine has an input or output load of 8 points increments respectively connected. Therefore, each slot SLOT1
-Data transfer between the SLOT 8 and the I / O modules 52a to 52h is performed in 1-byte units .
It However, here, the modules are connected to the slot SLOT1, the slot SLOT2, and the slot SL.
OT5, slot SLOT7, and slot SLOT
Only 8

【0032】また、スロットSLOT1、スロットSL
OT5、およびスロットSLOT8には入力モジュール
が、一方、スロットSLOT2およびスロットSLOT
7には出力モジュールが接続される。
In addition, the slot SLOT1 and the slot SL
OT5 and slot SLOT8 have input modules, while slot SLOT2 and slot SLOT
An output module is connected to 7.

【0033】これらの、I/Oユニット501に接続さ
れる入力点数および出力点数、入力の先頭アドレス、出
力の先頭アドレスは、PMC20のROM22に予め設
定されている。
These are connected to the I / O unit 501.
Input and output points, input start address, output
The start address of the force is preset in the ROM 22 of the PMC 20.
It is fixed.

【0034】1台のI/Oユニット501の内部におい
て、スロット番号の小さいものから順に小さいアドレス
順位を設定するものとする。したがって、この原則を満
たす構成であれば、モジュールを実装するスロットは、
自由に変更することができる。
Inside the I / O unit 501
Address with the smallest slot number.
The rank shall be set. Therefore, this principle
If it is a configuration, the slot for mounting the module is
You can change it freely.

【0035】I/Oモジュール52a〜52hには、ス
ロット部51に接続されたか否か知らせる接続データT
Xと、入力モジュールか出力モジュールかを知らせる切
換データOXとが格納されている。接続データTXは、
各I/Oモジュール52a〜52hがスロット部51に
接続されたときに「L(ロー)」信号となってアドレス
順位設定部56に送られる。切換データOXは、出力モ
ジュールであれば「H(ハイ)」信号、入力モジュール
であれば「L(ロー)」信号がそれぞれのモジュールか
ら出力され、アドレス順位設定部56に送られる。
The I / O modules 52a to 52h are provided with connection data T for informing whether or not they are connected to the slot portion 51.
X and switching data OX indicating whether it is an input module or an output module are stored. The connection data TX is
When each of the I / O modules 52a to 52h is connected to the slot section 51, an "L (low)" signal is sent to the address rank setting section 56. As the switching data OX, an “H (high)” signal is output from each module if it is an output module, and an “L (low)” signal is output from each module if it is an input module, and sent to the address order setting unit 56.

【0036】アドレス順位設定部56は、接続データT
Xおよび切換データOXを受け取ることにより、スロッ
トSLOT1〜SLOT8に対するI/Oモジュールの
接続状態と、その種類を確認し、バッファ53に切換信
号BSを送る。バッファ53は、アドレス順位設定部5
6からの切換信号BSに応じて、スロットSLOT1〜
SLOT8をそれぞれ入力用、出力用のスロットに切り
換える。
The address order setting unit 56 uses the connection data T
By receiving X and the switching data OX, the connection state of the I / O module with respect to the slots SLOT1 to SLOT8 and its type are confirmed, and the switching signal BS is sent to the buffer 53. The buffer 53 includes the address rank setting unit 5
According to the switching signal BS from 6, the slots SLOT1 ...
The SLOT 8 is switched to an input slot and an output slot, respectively.

【0037】また、アドレス順位設定部56は、切換デ
ータOXに基づいて、接続されているI/Oモジュール
を入力モジュールのグループと出力モジュールのグルー
プとに分け、さらに、接続されているスロットの番号の
小さいものから順に小さいアドレス順位を設定する。
Further, the address order setting unit 56 divides the connected I / O modules into a group of input modules and a group of output modules based on the switching data OX, and further, the number of the connected slot. The smaller address order is set in ascending order.

【0038】すなわち、図4の例でいえば、入力モジュ
ールのグループとして入力モジュール52a、入力モジ
ュール52e、および入力モジュール52hの順にアド
レス順位を設定する。一方、出力モジュールのグループ
として出力モジュール52b、出力モジュール52gの
順にアドレス順位を設定する。
That is, in the example of FIG. 4, the address order is set in the order of the input module 52a, the input module 52e, and the input module 52h as a group of input modules. On the other hand, the address order is set as the output module group in the order of the output module 52b and the output module 52g.

【0039】このアドレス順位の設定が終了すると、ア
ドレス順位設定部56は、その内容をアドレス順位設定
データADとして、I/Oデータ制御部55に送る。同
時に、入力データ点数から、送信データバイト数データ
TDを生成してデータ通信部54に送る。
When the setting of this address order is completed,
The dress order setting unit 56 sets the contents of the address order.
The data AD is sent to the I / O data controller 55. same
Sometimes, from the input data points, the transmission data byte number data
The TD is generated and sent to the data communication unit 54.

【0040】データ通信部54には、CNC10側から
出力モジュール52bおよび52gに対して送られる出
力データが通信ライン60を介して入力される。また、
データ通信部54は、入力モジュール52a、52e、
および52hからの入力データを通信ライン60を介し
てCNC10側に送る。
Output data sent from the CNC 10 side to the output modules 52b and 52g are input to the data communication unit 54 via the communication line 60. Also,
The data communication unit 54 includes input modules 52a, 52e,
And the input data from 52h are sent to the CNC 10 side via the communication line 60.

【0041】データ通信部54には、後述する入力デー
タ保持メモリ54aと、出力データ保持メモリ54bと
が設けられている。I/Oデータ制御部55は、アドレ
ス順位設定部56からのアドレス順位設定データADに
基づいて、データ通信部54の出力データ保持メモリ5
4bから出力データODをアドレス順位の設定順に読み
出し、各スロットSOT2,およびSOT7にそれ
ぞれ対応する出力データODをバッファ53を介して転
送する。
The data communication section 54 is provided with an input data holding memory 54a and an output data holding memory 54b which will be described later. The I / O data control unit 55 outputs the output data holding memory 5 of the data communication unit 54 based on the address rank setting data AD from the address rank setting unit 56.
Reading the output data OD from 4b to set the order of address order, forwards each slot S L OT2, and S L OT7 output data OD corresponding to the through buffer 53.

【0042】また、I/Oデータ制御部55は、バッフ
ァ53を介して各スロットSLOT1,SLOT5およ
びSLOT8からそれぞれ入力データIDを読み出し、
アドレス順位設定データADに基づいて、データ通信部
54の入力データ保持メモリ54aに入力データIDを
アドレス順位の設定順に転送する。
Further, the I / O data control section 55 reads the input data IDs from the slots SLOT1, SLOT5 and SLOT8 via the buffer 53,
Based on the address order setting data AD, the input data ID is transferred to the input data holding memory 54a of the data communication unit 54 in the order of setting the address order.

【0043】図1は入出力データの遣り取りの概念図で
ある。入力データ保持メモリ54aおよび出力データ保
持メモリ54bには、それぞれ1バイト毎に格納領域が
設けられている。入力データ保持メモリ54aの1バイ
トめの領域にはスロットSLOT1に接続されている入
力モジュール52aの入力データが格納される。2バイ
トめの領域には、スロットSLOT5に接続されている
入力モジュール52eの入力データが、また、3バイト
めの領域には、スロットSLOT8に接続されている入
力モジュール52hの入力データが格納される。
FIG. 1 is a conceptual diagram of the exchange of input / output data. The input data holding memory 54a and the output data holding memory 54b each have a storage area for each byte. Input data of the input module 52a connected to the slot SLOT1 is stored in the first byte area of the input data holding memory 54a. Input data of the input module 52e connected to the slot SLOT5 is stored in the second byte area, and input data of the input module 52h connected to the slot SLOT8 is stored in the third byte area. .

【0044】すなわち、接続されているスロットの番号
の小さいものから順に、I/Oデータ制御部55によっ
て格納されて行く。ここで、1バイトめの領域に格納さ
れている入力データの先頭アドレスを入力アドレスAと
する(A〜A+7まで)と、2バイトめの入力データの
先頭アドレスは、入力アドレスA+8となる(A+8〜
A+15まで)。同様に、3バイトめの入力データの
アドレスは、入力アドレスA+16となる(A+16
〜A+23まで)。なお、ここでは4バイトめ以降の領
域には、入力データは格納されない。
That is, the I / O data control section 55 stores the slots in ascending order of number. Here, assuming that the start address of the input data stored in the first byte area is the input address A (from A to A + 7) , the second byte of the input data
The start address is the input address A + 8 (A + 8-
Up to A + 15) . Similarly, the input data of the 3rd byte ahead
The head address is the input address A + 16 (A + 16
Up to A + 23) . It should be noted that, here, the input data is not stored in the area after the fourth byte.

【0045】一方、出力データ保持メモリ54bの1バ
イトめおよび2バイトめの各領域には、PMC20から
出力モジュール52bおよび52gに送られる出力デー
タが、スロットの番号順にそれぞれ格納されている。こ
こで、1バイトめの領域に格納されている出力データの
先頭アドレスを出力アドレスBとする(B〜B+7ま
で)と、2バイトめの出力データの先頭アドレスは、出
力アドレスB+8となる(B+8〜B+15まで)。な
お、ここでは、3バイトめ以降の領域には、出力データ
は格納されない。
On the other hand, the output data sent from the PMC 20 to the output modules 52b and 52g are stored in the first byte area and the second byte area of the output data holding memory 54b in the order of slot numbers. Here, the output data stored in the first byte area
Let the start address be the output address B ( B to B + 7
Then, the start address of the output data of the second byte is the output address B + 8 (from B + 8 to B + 15) . Note that, here, output data is not stored in the area of the third byte and thereafter.

【0046】出力データ保持メモリ54bに格納された
出力データは、I/Oデータ制御部55によって、1バ
イトめ、2バイトめの順に読み出され、それぞれスロッ
トSLOT2、SLOT7に送られる。
The output data stored in the output data holding memory 54b is read by the I / O data control unit 55 in the order of the first byte and the second byte and sent to the slots SLOT2 and SLOT7, respectively.

【0047】図5はCNC10とデータ通信部54との
間で遣り取りされるデータコード例を示す図であり、
(A)はCNC10からデータ通信部54に送られる出
力データコードを示す図、(B)はデータ通信部54か
らCNC10に送られる入力データコードを示す図であ
る。出力データコード71は、スタートビット、ヘッダ
0、ヘッダ1、1バイトめ出力データ、2バイトめ出力
データ、およびストップビットから構成されている。
FIG. 5 is a diagram showing an example of data codes exchanged between the CNC 10 and the data communication section 54.
(A) is a diagram showing an output data code sent from the CNC 10 to the data communication unit 54, and (B) is a diagram showing an input data code sent from the data communication unit 54 to the CNC 10. The output data code 71 is composed of a start bit, header 0, header 1, first byte output data, second byte output data, and stop bits.

【0048】スタートビットおよびストップビットは、
それぞれデータコードの開始と終了を示す部分である。
ヘッダ0は、データの送り先のI/Oユニット501〜
50Nの区別を示す部分であり、8ビットで構成されて
いる。ヘッダ1は、後に続くデータのバイト数を示す部
分であり、8ビットで構成されている。このヘッダ1の
後に実際の出力データが対応するスロット番号の小さい
順に付加されている。ここでは、出力モジュールは2個
なので、2バイト分の出力データが付加されている。
The start bit and stop bit are
Each is a part showing the start and end of the data code.
The header 0 is the I / O unit 501 to which the data is sent.
This is a portion indicating the distinction of 50N, and is composed of 8 bits. The header 1 is a portion indicating the number of bytes of the data that follows, and is composed of 8 bits. After this header 1, actual output data is added in ascending order of the corresponding slot number. Here, since there are two output modules, two bytes of output data are added.

【0049】一方、入力データコード72は、出力デー
タコード71と同様にスタートビット、ヘッダ0、ヘッ
ダ1、およびストップビットを有しており、ヘッダ1と
ストップビットとの間には、1バイトめ入力データ、2
バイトめ入力データ、および3バイトめ入力データが対
応するスロット番号の小さい順に付加されている。
On the other hand, the input data code 72, like the output data code 71, has a start bit, a header 0, a header 1 and a stop bit, and the first byte is between the header 1 and the stop bit. Input data, 2
The byte first input data and the third byte input data are added in ascending order of the corresponding slot numbers.

【0050】このように、本実施例では、I/Oモジュ
ールを入力用のモジュールと出力用のモジュールとにグ
ループ分けし、各グループ内で、モジュールが接続され
ているスロットの番号順にアドレス順位を設定するよう
にしたので、アドレス順位の設定順にシリアルにデータ
を繋げることにより、PMC20側(あるいはCNC1
0側)とI/Oユニット501との間で、容易にかつ確
実にデータの遣り取りを行うことができる。このため、
電源投入時等にPMC20側から割り付けデータを送信
したり、周期的に割り付けデータを送信したりする必要
がなくなる。したがって、一部のI/Oユニットの電源
投入のタイミングがずれてもシステム全体への影響を失
くすことができ、かつデータ伝送速度の低下を防止でき
る。
As described above, in this embodiment, the I / O modules are divided into input modules and output modules, and within each group, the address order is arranged in the order of the slot numbers to which the modules are connected. Since the setting is made, by connecting the data serially in the order of setting the address order, the PMC20 side (or CNC1
(0 side) and the I / O unit 501 can easily and reliably exchange data. For this reason,
It is not necessary to transmit allocation data from the PMC 20 side or to transmit allocation data periodically when the power is turned on. Therefore, even if the power-on timing of some I / O units is deviated, the influence on the entire system can be lost, and a decrease in data transmission rate can be prevented.

【0051】なお、図4では、I/Oユニット501の
みの構成を示したが、他のI/Oユニット502〜50
Nについてもほぼ同じ構成であるので、説明を省略す
る。また、本実施例では、CNC10に内蔵型のPMC
20についての例を示したが、一般に独立型のPCであ
っても本発明を適用することができる。
Although FIG. 4 shows the configuration of only the I / O unit 501, other I / O units 502 to 50 are shown.
Since N has almost the same configuration, its description is omitted. Further, in this embodiment, the PMC built-in to the CNC 10 is used.
Although the example of 20 is shown, it is generally a stand-alone PC.
However, the present invention can be applied.

【0052】[0052]

【発明の効果】以上説明したように本発明では、I/O
モジュールを入力用モジュールと出力用モジュールとに
グループ分けし、各グループ内でアドレス順位を設定す
るようにしたので、アドレス順位の設定順にシリアルに
データを繋げることにより、PCとI/Oユニットとの
間で、容易にかつ確実にデータの遣り取りを行うことが
できる。このため、電源投入時等にPC側から割り付け
データを送信したり、周期的に割り付けデータを送信し
たりする必要がなくなる。したがって、一部のI/Oユ
ニットの電源投入のタイミングがずれてもシステム全体
への影響を失くすことができ、かつデータ伝送速度の低
下を防止できる。
As described above, according to the present invention, the I / O
The modules are divided into an input module and an output module, and the address order is set within each group. By connecting the data serially in the order of setting the address order, the PC and the I / O unit are connected. In between, data can be exchanged easily and reliably. Therefore, it is not necessary to transmit the allocation data from the PC side or to periodically transmit the allocation data when the power is turned on. Therefore, even if the power-on timing of some I / O units is deviated, the influence on the entire system can be lost, and a decrease in data transmission rate can be prevented.

【図面の簡単な説明】[Brief description of drawings]

【図1】入出力データの遣り取りの概念図である。FIG. 1 is a conceptual diagram of exchange of input / output data.

【図2】本発明のデータ転送方式が行われる数値制御シ
ステムの概略構成を示すブロック図である。
FIG. 2 is a block diagram showing a schematic configuration of a numerical control system in which the data transfer system of the present invention is performed.

【図3】数値制御装置(CNC)全体のハードウエアの
ブロック図である。
FIG. 3 is a block diagram of hardware of an entire numerical controller (CNC).

【図4】I/Oユニットの内部構成を示すブロック図で
ある。
FIG. 4 is a block diagram showing an internal configuration of an I / O unit.

【図5】CNCとデータ通信部との間で遣り取りされる
データコード例を示す図であり、(A)はCNCからデ
ータ通信部に送られる出力データコードを示す図、
(B)はデータ通信部からCNCに送られる入力データ
コードを示す図である。
FIG. 5 is a diagram showing an example of a data code exchanged between a CNC and a data communication unit, FIG. 5A is a diagram showing an output data code sent from the CNC to the data communication unit,
(B) is a diagram showing an input data code sent from the data communication unit to the CNC.

【符号の説明】 10 数値制御装置(CNC) 20 PMC 60 通信ライン 501〜50N I/Oユニット 601〜60N 機械 51 スロット部 52a〜52h I/Oモジュール 53 バッファ 54 データ通信部 55 I/Oデータ制御部 56 アドレス順位設定部 54a 入力データ保持メモリ 54b 出力データ保持メモリ[Explanation of Codes] 10 Numerical Control Unit (CNC) 20 PMC 60 Communication Line 501 to 50N I / O Unit 601 to 60N Machine 51 Slot Section 52a to 52h I / O Module 53 Buffer 54 Data Communication Section 55 I / O Data Control Unit 56 address order setting unit 54a input data holding memory 54b output data holding memory

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図1[Name of item to be corrected] Figure 1

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図1】 [Figure 1]

【手続補正3】[Procedure 3]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図4[Name of item to be corrected] Fig. 4

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図4】 [Figure 4]

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 I/Oユニットを介してPC(プログラ
マブル・コントローラ)に接続されるI/Oモジュール
のデータ転送方式において、 前記I/Oユニットの各スロットに接続されるI/Oモ
ジュールが入力用モジュールであるか出力用モジュール
であるかを識別して識別信号を出力する識別信号出力手
段と、 前記識別信号を受け取ることにより前記スロットに接続
された前記I/Oモジュールを前記入力用モジュールと
前記出力用モジュールとにグループ分けし、前記グルー
プ内でアドレス順位を設定するアドレス順位設定手段
と、 前記入力用モジュールから前記PC側に送る入力データ
と、前記PC側から前記出力用モジュール側に送る出力
データとをそれぞれ前記アドレス順位設定手段によって
設定されたアドレス順位に従って配列し保持するデータ
保持手段と、 前記データ保持手段と前記各I/Oモジュールとの間で
前記入力データおよび前記出力データの遣り取りを行う
制御手段と、 を有すること特徴とするI/Oモジュールのデータ転送
方式。
1. A data transfer method of an I / O module connected to a PC (programmable controller) through an I / O unit, wherein an I / O module connected to each slot of the I / O unit is input. Signal output means for identifying whether the module is an output module or an output module and outputting an identification signal, and the I / O module connected to the slot by receiving the identification signal as the input module Address order setting means for grouping into the output module and setting address order within the group, input data sent from the input module to the PC side, and sent from the PC side to the output module side The output data and the output data are distributed in accordance with the address order set by the address order setting means. A data holding means for arranging and holding the data, and a control means for exchanging the input data and the output data between the data holding means and each of the I / O modules. Data transfer method.
【請求項2】 前記アドレス順位設定手段は、前記I/
Oモジュールが接続される前記スロットの番号順に前記
アドレス順位を設定するように構成されていることを特
徴とする請求項1記載のI/Oモジュールのデータ転送
方式。
2. The address rank setting means is the I / O.
2. The data transfer method for an I / O module according to claim 1, wherein the address order is set in order of the number of the slot to which the O module is connected.
【請求項3】 前記識別信号出力手段は、前記各I/O
モジュール内に設けられていることを特徴とする請求項
1記載のI/Oモジュールのデータ転送方式。
3. The identification signal output means is provided for each of the I / Os.
2. The data transfer method for an I / O module according to claim 1, wherein the data transfer method is provided in the module.
【請求項4】 前記データ保持手段は、前記入力データ
および前記出力データを1バイト単位で配列保持するよ
うに構成されていることを特徴とする請求項1記載のI
/Oモジュールのデータ転送方式。
4. The I according to claim 1, wherein the data holding unit is configured to hold the input data and the output data in 1-byte units.
/ O module data transfer method.
JP28790392A 1992-10-26 1992-10-26 Data transfer system for i/o module Pending JPH06138916A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28790392A JPH06138916A (en) 1992-10-26 1992-10-26 Data transfer system for i/o module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28790392A JPH06138916A (en) 1992-10-26 1992-10-26 Data transfer system for i/o module

Publications (1)

Publication Number Publication Date
JPH06138916A true JPH06138916A (en) 1994-05-20

Family

ID=17723217

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28790392A Pending JPH06138916A (en) 1992-10-26 1992-10-26 Data transfer system for i/o module

Country Status (1)

Country Link
JP (1) JPH06138916A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6725283B2 (en) 2001-11-30 2004-04-20 Mitsubishi Denki Kabushiki Kaisha Programmable controller
EP2000868A1 (en) 2007-05-25 2008-12-10 Fanuc Ltd Method of acquiring status information of I/O units

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6725283B2 (en) 2001-11-30 2004-04-20 Mitsubishi Denki Kabushiki Kaisha Programmable controller
DE10229887B4 (en) * 2001-11-30 2014-09-18 Mitsubishi Denki K.K. Programmable control device
EP2000868A1 (en) 2007-05-25 2008-12-10 Fanuc Ltd Method of acquiring status information of I/O units

Similar Documents

Publication Publication Date Title
US6442444B2 (en) Method and device for managing equipment connected to controller of production machine
EP0084573A1 (en) Industrial robot control system
US4396987A (en) Machine tool and robot control apparatus
EP0312717B1 (en) Control system of an industrial robot
JP2016018445A (en) Control system including controller for controlling machine having multiple axes
EP1460503A1 (en) Numerical controller
US4628442A (en) Centralized peripheral interface with a numerical control unit
EP0521164B1 (en) Method of restarting operation of punch press machine and numerically controlled device
EP0089193A2 (en) Method and apparatus for displaying ladder diagrams
EP0025666B1 (en) Numerical controlling method and system
EP0965895B1 (en) Control System with a input/output card interface
US4096563A (en) Machine tool control system and method
JPH06138916A (en) Data transfer system for i/o module
EP1435551B1 (en) Numerical controller comprising programmable logic controller (PLC)
JPH0580815A (en) Message display system for pc
EP0092312B1 (en) Method and apparatus for displaying ladder diagrams
EP0103813B1 (en) Memory system and method for access in the same
US5331540A (en) Symbol definition system and method a programmable machine controller
US5224031A (en) Signal transfer system of programmable controller
EP0417297A1 (en) Numeric controller for transfer line
EP0368337B1 (en) Industrial machine control device
JPS63311403A (en) Processing system for input/output signal of pc
EP0425688A1 (en) Method of editing program for program controller
EP0089194A2 (en) Method and apparatus for displaying ladder diagrams
JPS61114313A (en) Machine controller