JP3388246B2 - Remote I / O system for programmable controller - Google Patents

Remote I / O system for programmable controller

Info

Publication number
JP3388246B2
JP3388246B2 JP24354292A JP24354292A JP3388246B2 JP 3388246 B2 JP3388246 B2 JP 3388246B2 JP 24354292 A JP24354292 A JP 24354292A JP 24354292 A JP24354292 A JP 24354292A JP 3388246 B2 JP3388246 B2 JP 3388246B2
Authority
JP
Japan
Prior art keywords
input
change flag
output
data
output data
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.)
Expired - Fee Related
Application number
JP24354292A
Other languages
Japanese (ja)
Other versions
JPH0695718A (en
Inventor
靖男 宗田
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.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP24354292A priority Critical patent/JP3388246B2/en
Publication of JPH0695718A publication Critical patent/JPH0695718A/en
Application granted granted Critical
Publication of JP3388246B2 publication Critical patent/JP3388246B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)
  • Selective Calling Equipment (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、プログラマブル・コン
トローラ(以下、PCという)に接続される親局と、当
該親局に接続される子局とからなるPCのリモートI/
Oシステムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a remote I / O of a PC comprising a master station connected to a programmable controller (hereinafter referred to as a PC) and a slave station connected to the master station.
Regarding the O system.

【0002】[0002]

【従来の技術】工場等において分散された複数台の装置
を1台のPCで制御する場合、当該PCから各装置へ数
10本以上の入出力配線をする必要があるため、配線工
事が複雑になったり、布設工事が増大する等の問題が生
じる。この問題を解決するため省配線を目的として考案
されたのが、例えば図8に示すように構成したPCのリ
モートI/Oシステムである。
2. Description of the Related Art When controlling a plurality of devices dispersed in a factory or the like with a single PC, it is necessary to connect several tens of input / output wires from the PC to each device, which makes wiring work complicated. And problems such as increased installation work will occur. In order to solve this problem, a PC remote I / O system configured as shown in FIG. 8 was devised for the purpose of wire saving.

【0003】PCのリモートI/Oシステムは、CPU
ユニット(以下、PC本体という)1や入出力ユニット
(I/Oユニット)1a,1b等と同様にPCに組込ま
れ、PC本体1等にCPUバスを介して直接接続される
親局2と、この親局2と同軸ケーブルや光ファイバ等の
通信ケーブル4を介して接続される1台あるいは複数台
子局3とから構成される。
The remote I / O system of a PC is a CPU
A master station 2 that is built into a PC in the same manner as the unit (hereinafter referred to as the PC main body) 1 and the input / output units (I / O units) 1a and 1b, and is directly connected to the PC main body 1 and the like via a CPU bus The master station 2 and one or a plurality of slave stations 3 connected via a communication cable 4 such as a coaxial cable or an optical fiber.

【0004】各子局3は、通常、データバスを介して複
数台の入出力ユニット3a,3bが接続されており、各
入出力ユニット3a,3bにモータやスイッチ(S
W)、センサ等の被制御機器が接続され、PC本体1が
遠隔の非制御機器を制御できるように構成されている。
[0004] Each slave station 3 is usually a plurality of input-output unit 3a via the data bus, 3b are connected, each input-output units 3a, 3b to the motor and switches (S
W), a controlled device such as a sensor are connected, and the PC body 1 is configured to control a remote non-controlled device.

【0005】このように構成されたPCのリモートI/
Oシステムでは、PC本体1が親局2を介し子局3上の
入出力ユニット3a,3bを制御する場合、子局3上の
入力データを親局2を介しPC本体1に、PC本体1の
出力データを親局2を介し子局3上の出力ユニット3b
に出力する必要がある。
The remote I / O of the PC configured as described above
The O systems, input and output units 3a on the remote station 3 PC main body 1 via the master station 2, when controlling 3b, and the input data on the slave station 3 to the PC 1 via the master station 2, the PC 1 the output unit 3b on the slave station 3 via the parent station 2 the output data of the
Need to output to.

【0006】ここで、PC本体1と本システムとの間の
データ通信方法は、PC本体の命令語中のリモート入出
力命令の実行により命令実行と通信処理を同期して行う
方法と、定時またはエンドリフレッシュのタイミングの
非同期に行う方法とがあリ、これをリモートリフレッシ
ュ処理という。
Here, the data communication method between the PC body 1 and the present system includes a method for executing instruction execution and communication processing in synchronization with execution of a remote input / output instruction in a command word of the PC body, and a fixed time or There is a method of asynchronously performing the end refresh timing, which is called remote refresh processing.

【0007】また、親局と子局との間のデータ送受信
は、通常、親局によるポーリング/セレクション、すな
わち各子局にノード番号の順で出力データを設定したポ
ーリングフレームを送り、ポーリングフレームを受信し
子局が入力データをレスポンスフレームに設定して親
局に返送することにより行われる。
Further, data transmission and reception between the master station and the slave station is normally polling / selection by the master station, i.e. sends a polling frame to set the output data in the order of the node number to each slave station, the polling frame This is performed by the received slave station setting the input data in the response frame and returning it to the master station.

【0008】[0008]

【発明が解決しようとする課題】ところで、このような
従来のリモートI/Oシステムでは、各子局へ順次ポー
リングフレームを送信し、各子局毎に出力データを送信
すると共に入力データを受信するようにしたため、ポー
リングサイクルタイムが大きくなり、親局と子局との間
で高速にデータ交換できず、PC本体の命令実行時間へ
影響を与えると共に、子局に接続されたI/Oユニット
にはPC本体上のI/Oユニットと同様にアクセスでき
ない、という問題がある。
[SUMMARY OF THE INVENTION Incidentally, in such a conventional remote I / O system, sequentially transmits the polling frame to each slave station, receives input data and transmits the output data for each slave station As a result, the polling cycle time increases, data cannot be exchanged at high speed between the master station and the slave station, which affects the instruction execution time of the PC main unit and the I / O unit connected to the slave station. Has the problem that it cannot be accessed like the I / O unit on the PC body.

【0009】そこで、本発明は上記問題を解決すべくな
されたもので、ポーリングサイクルタイムを小さくして
親局と子局との間のデータ交換を高速にできるPCのリ
モートI/Oシステムを提供することを目的とする。
Therefore, the present invention has been made to solve the above problems, and provides a remote I / O system for a PC which can shorten the polling cycle time and speed up data exchange between a master station and a slave station. The purpose is to do.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明では、被制御機器を制御するプログラマブル
・コントローラに直接接続される親局と、当該親局と通
信ケーブルを介して接続されると共に複数の入力ユニッ
トが接続される子局とからなり、上記親局はポーリング
/セレクション方式によって上記プログラマブル・コン
トローラからの出力データを各子局へ送信すると共に、
各子局が入力ユニットを介し取り込んだ入力データを受
信して、上記プログラマブル・コントローラが入出力デ
ータをリフレッシュできるようにしたプログラマブル・
コントローラのリモートI/Oシステムにおいて、上記
親局は、上記プログラマブル・コントローラから子局へ
送信すべき出力データを記憶する出力データメモリと、
上記出力データメモリに記憶された出力データと、前回
のポーリング時に当該子局へ送信した出力データとを比
較して、データの値が変化している場合には出力変化フ
ラグを設定する出力変化フラグ設定手段と、上記出力変
化フラグ設定手段によって出力変化フラグが設定された
か否かを判断して、出力変化フラグが設定されている
合には出力データメモリに記憶された出力データをポー
リングフレームに設定して送信する一方、出力変化フラ
グが設定されていない場合には出力データをポーリング
フレームに設定せずに送信するポーリング手段とを具備
する一方、上記子局は、上記入力ユニットを介し取り込
んだ入力データを記憶する入力データメモリと、上記入
力データメモリに記憶された入力データと、前回のポー
リング時に返送した入力データとを比較して、データの
値が変化している場合には入力変化フラグを設定する入
力変化フラグ設定手段と、上記入力変化フラグ設定手段
によって入力変化フラグが設定されたか否かを判断し
て、入力変化フラグが設定されている場合には上記入力
データメモリに記憶された入力データをレスポンスフレ
ームに設定して返送する一方、入力変化フラグが設定さ
れていない場合には入力データをレスポンスフレームに
設定せずに返送するレスポンス手段とを具備することを
特徴とする。
In order to achieve the above object, the present invention provides a programmable controller for controlling a controlled device.
A master station directly connected to the controller and a slave station connected to the master station via a communication cable and to which a plurality of input units are connected. The master station is programmable by polling / selection method. Con
While sending the output data from the tracker to each slave station,
A programmable controller that allows each slave station to receive input data captured via the input unit and to enable the programmable controller to refresh the input / output data.
In the remote I / O system of the controller , the master station has an output data memory for storing output data to be transmitted from the programmable controller to the slave station,
The output change flag that sets the output change flag when the output data stored in the output data memory is compared with the output data sent to the slave station at the previous polling and the value of the data has changed. setting means, it is determined whether or not the output change flag is set by the output change flag setting means, the output change flag output data into play <br/> if it is set that is stored in the output data memory Is set in the polling frame and transmitted, and when the output change flag is not set, the polling means transmits the output data without setting it in the polling frame. Input data memory that stores the input data captured via the The input change flag setting means for setting the input change flag when the value of the data is changing, and whether or not the input change flag is set by the input change flag setting means. it is determined, while returning set the input data stored in said input data memory in response frame if the input change flag is set, when the input change flag is not set the input data It is characterized by comprising a response means for returning without setting in a response frame.

【0011】[0011]

【作用】本発明では、親局では、出力データメモリに記
憶されたPC本体から今回子局へ送信すべき出力データ
と、記憶しておいた前回のポーリング時に送信した出力
データとを比較して、データの値が変化している場合に
のみ当該出力データをポーリングフレームに設定して送
信して、データの値が変化してない場合には当該出力デ
ータをポーリングフレームに設定せずに送信する。
In the present invention, the master station compares the output data, which is stored in the output data memory and should be transmitted to the slave station this time, with the stored output data transmitted at the previous polling. , If the data value has changed, set the output data in the polling frame and send it. If the data value has not changed, send the output data without setting it in the polling frame. .

【0012】子局では、入力ユニットを介し取り込み入
力データメモリに記憶した入力データと、記憶しておい
た前回のポーリング時に返送した入力データとを比較し
て、データの値が変化している場合にのみ当該入力デー
タをレスポンスフレームに設定して返送し、データの値
が変化してない場合には当該入力データをレスポンスフ
レームに設定せずに返送する。
In the slave station , when the input data stored through the input unit and stored in the input data memory is compared with the stored input data returned at the previous polling, and the value of the data has changed. Only, the input data is set in the response frame and returned, and when the data value does not change, the input data is returned without being set in the response frame.

【0013】[0013]

【実施例】以下、本発明に係るPCのリモートI/Oシ
ステムの一実施例を図面に基づいて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a PC remote I / O system according to the present invention will be described below with reference to the drawings.

【0014】図1は、本実施例のPCのリモートI/O
システムの構成を示している。
FIG. 1 shows the remote I / O of the PC of this embodiment.
The system configuration is shown.

【0015】本システムは、PC本体1や入出力ユニッ
ト等と同様にPCに組込まれ(図8参照)、PC本体1
等にCPUバスを介して直接接続される親局2と、この
親局2と同軸通信ケーブルや光ファイバ等の通信ケーブ
ル4を介して接続される1台あるいは複数台(この図で
は便宜上1台しか図示しない)の子局3とから構成され
る。
This system is built into a PC in the same manner as the PC body 1 and the input / output unit (see FIG. 8).
And the like, and one or a plurality of units connected to the master station 2 via a communication cable 4 such as a coaxial communication cable or an optical fiber (one unit for convenience in this figure). composed of slave station 3 which the only shown).

【0016】PC本体1は、PCに直接組込まれた入出
力ユニット(図8参照)や、本システムに接続された入
出力ユニット3a,3bを介してモータ等の機械や装置
を制御するように構成されており、この図では本システ
ムとの間の通信、すなわちリモートリフレッシュを実行
するMPU11のみを示している。
The PC main body 1 controls a machine or device such as a motor through an input / output unit (see FIG. 8) directly incorporated in the PC and input / output units 3a and 3b connected to the present system. In this figure, only the MPU 11 that executes communication with the system, that is, remote refresh is shown.

【0017】親局2は、PC本体1とCPUバスを介し
データの送受信を行うと共に、出力変化フラグ設定手段
およびポーリング手段として通信ケーブル4を介し子局
3とのポーリング/セレクションによる通信制御を行う
MPU21と、PC本体1との間で出力データおよび入
力データの受け渡しを行う共有RAM23と、送受信バ
ッファ(図示せず)を内蔵して子局3との通信を行う通
信LSI22とを有する。なお、A0は親局2がPC本
体1へ入出力データの書込み及び読出しを要求するリモ
ートリフレッシュ要求信号、A1は共有RAM22への
アクセスが完了した際にPC本体1から親局2へ送信さ
れるリモートリフレッシュ完了信号である。
The master station 2 transmits / receives data to / from the PC body 1 via the CPU bus, and controls communication by polling / selection with the slave station 3 via the communication cable 4 as output change flag setting means and polling means. The MPU 21 has a shared RAM 23 that exchanges output data and input data with the PC body 1, and a communication LSI 22 that has a transmission / reception buffer (not shown) and that communicates with the slave station 3. A0 is a remote refresh request signal for requesting the master station 2 to write and read input / output data to the PC body 1, and A1 is transmitted from the PC body 1 to the master station 2 when the access to the shared RAM 22 is completed. This is a remote refresh completion signal.

【0018】子局3は、通信ケーブル4を介し入力変化
フラグ設定手段およびレスポンス手段として親局2との
通信および入出力ユニット3a,3bとのデータ送受信
を制御するMPU31と、送受信バッファ(図示せず)
を内蔵して親局2と通信を行う通信LSI32と、入力
ユニット3aを介し入力する入力パルスの値を取り込ん
で入力データとして記憶する入力データメモリ33とを
有する。
The slave station 3 functions as an input change flag setting means and a response means via the communication cable 4 to control communication with the master station 2 and data transmission / reception with the input / output units 3a and 3b, and a transmission / reception buffer (not shown). No)
It has a communication LSI 32 that has a built-in device and communicates with the master station 2, and an input data memory 33 that captures the value of an input pulse input via the input unit 3a and stores it as input data.

【0019】図2は、親局2と子局3との間で送受信さ
れるポーリングフレームあるいはレスポンスフレームの
詳細な構造を示している。
FIG. 2 shows a detailed structure of a polling frame or a response frame transmitted / received between the master station 2 and the slave station 3.

【0020】この通信フレームは、例えば1バイト程度
のプリアンプル(P)、シンクロナス・キャラクタ(S
YN)、アドレス(ADRS)および制御フィールド
(CNF)や、2バイト程度のフレームチェックシーケ
ンス(FCS)に対し、数10〜1000バイト程度の
データ(DATA)により構成されている。そして、ポ
ーリングフレームの場合には、制御フィールド(CN
F)に子局に対し出力データの取り込みを指示する送信
コマンドと、レスポンスに入力データのセットを指示す
る受信コマンドがセットされる。
This communication frame includes, for example, a preamble (P) of about 1 byte and a synchronous character (S).
YN), address (ADRS), control field (CNF), and frame check sequence (FCS) of about 2 bytes, and data (DATA) of about several tens to 1000 bytes. Then, in the case of the polling frame, the control field (CN
In F), a transmission command for instructing the slave station to fetch output data and a reception command for instructing setting of input data are set in the response.

【0021】図3(a),(b)は、各々、入力変化フ
ラグおよび出力変化フラグの設定手順を示している。
3 (a) and 3 (b) show the setting procedure of the input change flag and the output change flag, respectively.

【0022】(a)は子局3のMPU31における入力
変化フラグを設定の例を示しており、MPU31は、親
局2からポーリングフレームを受信する度に、今回の入
力データ“00101101”と、自己が記憶しておい
た前回のポーリング時に返送した入力データ“0000
1101”とを比較して、前回と今回とでデータの値が
異なる、すなわち入力データが変化している場合には、
入力変化フラグを“1”にセットする一方、入力データ
が変化してない場合には入力変化フラグを“0”にし
て、これをレジスタ等に保持しておく。
(A) shows an example of setting the input change flag in the MPU 31 of the slave station 3. The MPU 31 receives the polling frame from the master station 2 and the input data "00101101" of this time and self Input data “0000” returned by the previous polling stored in
1101 ", and when the data value is different between the previous time and this time, that is, when the input data is changed,
While the input change flag is set to "1", if the input data has not changed, the input change flag is set to "0" and held in a register or the like.

【0023】なお、これと同様に親局2のMPU21で
も、(b)に示すように、今回のポーリング時に子局
に送信すべき出力データ“10010101”と、自己
が記憶しておいた前回のポーリング時に当該子局3へ送
信した出力データ“11010101”とを比較して、
出力データが変化している場合には、出力変化フラグを
“1”にセットする一方、出力データが変化してない場
合には出力変化フラグを“0”にしてレジスタに保持し
ておく。
[0023] It should be noted that, even MPU21 of the parent station 2 In the same manner, as shown in (b), slave station 3 during this time of polling
The output data "10010101" to be transmitted, itself compares the output data "11010101" which is transmitted to the slave station 3 during the previous polling the stored,
When the output data has changed, the output change flag is set to "1", while when the output data has not changed, the output change flag is set to "0" and held in the register.

【0024】次に、このように構成された本システムの
動作を説明する。
Next, the operation of the present system thus constructed will be described.

【0025】図4に、親局2におけるポーリング/セレ
クション通信処理の手順を示す。
FIG. 4 shows the procedure of polling / selection communication processing in the master station 2.

【0026】この図では、親局2と3台の子局A〜Cと
の間の通信処理を示しており、特に子局Aとの通信処理
(ステップ100)を詳細に示している。
[0026] In this figure shows the communication process between the master station 2 and the three slave stations A through C, shows particularly communicate with the slave station A (step 100) in greater detail.

【0027】まず、この処理では、子局Aとの所定の通
信開始処理を行い(ステップ110)、前述のレジスタ
等に記憶された当該子局Aへの出力データの変化を示す
出力変化フラグを判断し(ステップ120)、出力変化
フラグが“1”にセットされている場合には(ステップ
120“Yes”)、今回のポーリング時に当該子局Aへ
送信すべき出力データが、前回ポーリング時に当該子局
Aへ送信した出力データと異なっていることを示してい
るため、図2に示すように、ポーリングフレームの制御
フィールド(CNF)に送信コマンドおよび受信コマン
ドをセットすると共に、ポーリングフレームに当該出力
データをセットして子局Aへ送信する(ステップ13
0)。
Firstly, in this process, performs predetermined communication start process of the slave station A (step 110), the output change flag indicating the change of the output data to the slave station A which is stored in the aforementioned register or the like determination (step 120), if the output change flag is set to "1" (step 120 "Yes"), the output data to be transmitted to the slave station a during the current polling, the at the previous poll Since it indicates that the output data is different from the output data transmitted to the slave station A, as shown in FIG. 2, the transmission command and the reception command are set in the control field (CNF) of the polling frame, and the output concerned is set in the polling frame. Set data and send to slave station A (step 13)
0).

【0028】一方、出力変化フラグが“0”の場合には
(ステップ120“No”)、今回子局Aへ送信すべき
出力データが前回ポーリング時に当該子局Aへ送信した
出力データと異なっていないことを示しているため、当
該出力データをポーリングフレームにセットせずに、こ
のポーリングフレームの制御フィールド(CNF)に受
信コマンドのみを設定して送信する(ステップ14
0)。
On the other hand, when the output change flag is "0" (step 120 "No"), the output data to be transmitted to the slave station A this time is different from the output data transmitted to the slave station A at the time of the previous polling. Since the output data is not set, the output data is not set in the polling frame, but only the reception command is set in the control field (CNF) of this polling frame and transmitted (step 14).
0).

【0029】このため、親局2では、子局Aへ送信すべ
き出力データが前回送信した出力データと較べて変化し
てない場合には、当該出力データを送信しないため、そ
のデータの分だけポーリングフレームが短くなり、ポー
リングタイムが短縮化される。
Therefore, in the master station 2, when the output data to be transmitted to the slave station A is not different from the output data transmitted last time, since the output data is not transmitted, only that data is transmitted. The polling frame is shortened and the polling time is shortened.

【0030】ところで、子局Aでは、ここでは図示して
ないが、入力データを取り込んで記憶すると共に、その
入力データと、前回のポーリング時に返送した入力デー
タとを比較して、その比較結果により入力変化フラグを
セットしている。
At the slave station A, although not shown here, the input data is fetched and stored, and the input data is compared with the input data returned at the previous polling. Input change flag is set.

【0031】そして、親局2からのポーリングフレーム
を受信すると、まずは制御フィールド(CNF)の送信
コマンドがある場合にはその送信コマンドに従って出力
データを取り込む一方、送信コマンドがない場合には出
力データの取り込みを行わない。
When the polling frame from the master station 2 is received, first, if there is a transmission command in the control field (CNF), the output data is taken in according to the transmission command, while if there is no transmission command, the output data is output. Do not import.

【0032】また、制御フィールド(CNF)の受信コ
マンドに従ってレジスタ等に記憶された入力変化フラグ
を判断し、入力変化フラグに“1”がセットされている
場合、すなわち現在の入力データと前回ポーリング時に
返送した入力データとが異なっている場合には、子局
は入力データをレスポンスフレームにセットして親局2
へ返送する。これに対し、入力変化フラグが“0”の場
合には、子局Aは、入力データをセットせずにレスポン
スフレームを親局2へ返送する。
Further, when the input change flag stored in the register or the like is judged according to the received command of the control field (CNF) and "1" is set in the input change flag, that is, the current input data and the previous polling time are set. If the input data returned is different, the slave station A
Sets the input data in the response frame and the master station 2
Return to. On the other hand, when the input change flag is “0”, the slave station A returns the response frame to the master station 2 without setting the input data.

【0033】このため、親局2では、子局Aで入力変化
フラグが“1”にセットされている場合には(ステップ
150“Yes”)、子局Aからレスポンスフレームが返
送されてきた際にレスポンスと入力データとを受信する
一方(ステップ160)、子局Aで入力変化フラグが
“1”にセットされてない場合には(ステップ150
“No”)、子局Aからレスポンスフレームが返送され
てきた際にレスポンスのみを受信して(ステップ17
0)、続いて子局Aとの通信処理を終了する(ステップ
180)。
[0033] Therefore, the master station 2, when the input change flag at the slave station A is set to "1" (step 0.99 "Yes"), when the response frame has been sent back from the slave station A While receiving the response and the input data (step 160), if the input change flag is not set to "1" in the slave station A (step 150).
"No"), only the response is received when the response frame is returned from the slave station A (step 17).
0), followed by terminating the communication process with the slave station A (step 180).

【0034】従って、子局Aでは親局2へ返送すべき入
力データが前回ポーリング時に返送した入力データと較
べて変化してない場合には、当該入力データを返送しな
いため、そのデータの分だけレスポンスフレームが短く
なり、ポーリングタイムも短縮化される。
Therefore, in the slave station A, when the input data to be returned to the master station 2 is not different from the input data returned at the time of the previous polling, the input data is not returned, and therefore only that data is returned. The response frame is shortened and the polling time is also shortened.

【0035】そして、子局Aとの通信処理の終了後は、
順次他の2台の子局B,Cとも子局Aの場合と同様に通
信処理を行い(ステップ200、300)、それが終了
したら再度子局Aとの通信処理(ステップ100)に戻
る。
After completion of the communication processing with the slave station A,
Successively the other two slave stations B, C also performs the same communication processing as in the case of the slave station A (step 200, 300), it returns to the communication process again slave station A when finished (step 100).

【0036】次に、本システムによって通信サイクル時
間が従来方式と較べてどれ位短縮化されるかを、親局2
と、3台の子局A〜Cとの間の通信を一例にして説明す
る。まず、図5に、各子局A〜Cについての出力変化フ
ラグおよび入力変化フラグの条件を示す。つまり、子局
Aについては親局2から送信される出力データが有り、
且つ、親局2へ返送すべき入力データも有り、子局Bに
ついてはそのような入出力データがなく、子局Cについ
ては親局へ返送すべき入力データのみがある、という条
件を示している。
Next, how much the communication cycle time is shortened by the present system as compared with the conventional system will be described.
And communication between the three slave stations A to C will be described as an example. First, FIG. 5 shows the condition of the output change flag and an input change flag for each slave station A through C. That is, for the slave station A, there is output data transmitted from the master station 2,
In addition, there is also input data to be returned to the master station 2, there is no such input / output data for the slave station B, and there is only input data to be returned to the master station for the slave station C. There is.

【0037】このような条件のもとで、本システムによ
ってデータ通信が実行された場合、通信されるフレーム
および1通信サイクル時間は、図6に示すようになる。
なお、同図および次に説明する図7では、コマンドおよ
びデータ以外の命令にかかるプリアンプル(P)やシン
クロナス・キャラクタ(SYN)等のレスポンスを省略
して示している。
When data communication is executed by this system under such conditions, the frame to be communicated and one communication cycle time are as shown in FIG.
In FIG. 7 and FIG. 7, which will be described next, responses such as preamble (P) and synchronous character (SYN) related to commands other than commands and data are omitted.

【0038】つまり、まず、親局2と子局Aとの間で通
信されるフレームは、出力変化フラグおよび入力変化フ
ラグが“1”にセットされているため(図5参照)、送
信コマンド、出力(OUT)データ、受信コマンド、お
よび入力(IN)コマンドからなる。ここで、それらの
フレームを合わせた通信時間をTaとする。
That is, first, in the frame communicated between the master station 2 and the slave station A, since the output change flag and the input change flag are set to "1" (see FIG. 5), the transmission command, It consists of output (OUT) data, a received command, and an input (IN) command. Here, the communication time in which those frames are combined is Ta.

【0039】また、子局Bとの間で通信されるフレーム
は、出力変化フラグおよび入力変化フラグがともに
“0”のままのため(図5参照)、親局からは受信コマ
ンドのみが送信され、出力データも送信されず、かつ、
入力データも返送されてこないため、受信コマンドのみ
となる。よって、子局Bにかかる通信時間は、受信コマ
ンドのみの通信時間Tbとなる。
In the frame communicated with the slave station B, since both the output change flag and the input change flag remain "0" (see FIG. 5), only the receive command is transmitted from the master station. , No output data is sent, and
Since the input data is not returned, only the receive command is available. Therefore, the communication time required for the slave station B is the communication time Tb for only the received command.

【0040】さらに、子局Cとの間で通信されるフレー
ムは、出力変化フラグに“1”がセットされてなく、入
力変化フラグに“1”がセットされているため(図5参
照)、親局からは受信コマンドのみがポーリングフレー
ムにセットされて送信され、レスポンスフレームに入力
データがセットされて返送されてくる。よって、子局
にかかる通信時間は受信コマンドと入力データとを合わ
せた時間Tcとなる。
Further, in the frame communicated with the slave station C, the output change flag is not set to "1" and the input change flag is set to "1" (see FIG. 5). From the master station, only the received command is set in the polling frame and transmitted, and the input data is set in the response frame and returned. Therefore, child station 3
The communication time required for is the total time Tc of the received command and the input data.

【0041】これに対し、このような条件(図5参照)
で従来のリモートI/Oシステムにより通信した場合に
は、図7に示すようになる。つまり、従来のシステムに
よれば、各子局A〜Cでは出力変化フラグおよび入力変
化フラグの値にかかわらず、各々、送信コマンド、出力
データ、受信コマンド、および入力データのフレームが
送信される。
On the other hand, such a condition (see FIG. 5)
When communication is performed by the conventional remote I / O system, the result is as shown in FIG. That is, according to the conventional system, regardless of the value of each the slave station A~C output change flag and an input change flag, respectively, transmission command, output data, receive commands, and the frame of the input data is transmitted.

【0042】従って、本システムによる1通信サイクル
時間T=Ta+Tb+Tcと、従来のシステムによる1
通信サイクル時間T' =Ta' (Ta)+Tb' +T
c' とを比較すれば明らかになるように、本システムで
は、子局へ送信すべき出力データが前回ポーリング時の
出力データと変わらない場合、および親局へ返送すべき
入力データが前回ポーリング時の入力データと変わらな
い場合には、図2で説明したように通信フレーム中の大
部分を占める数10〜数1000バイトの出力データお
よび入力データが送信されないため、その分だけ通信フ
レームが短くなり、ポーリングサイクルタイム、すなわ
ち通信サイクルタイムが短縮化されることになる。
Therefore, one communication cycle time T = Ta + Tb + Tc according to the present system and 1 according to the conventional system.
Communication cycle time T '= Ta' (Ta) + Tb '+ T
As can be seen by comparing with c ', in this system, when the output data to be transmitted to the slave station is the same as the output data at the time of the previous poll, and the input data to be returned to the master station is at the time of the previous poll. If the input data is the same as the input data of No. 2, the output data and the input data of several tens to several 1000 bytes, which occupy most of the communication frame, are not transmitted as described with reference to FIG. The polling cycle time, that is, the communication cycle time is shortened.

【0043】[0043]

【発明の効果】以上説明したように、本発明では、親局
において子局へ送信すべき出力データが当該子局におけ
る前回ポーリング時の出力データと較べて変化してない
場合には当該出力データが送信されず、また子局におい
て親局へ返送すべき入力データが当該子局における前回
ポーリング時の入力データと較べて変化してない場合に
は当該入力データが返送されないようにしたため、その
出力データおよび入力データの分だけ通信フレームが短
くなり、親局と子局との通信サイクルタイムが短縮化さ
れる。
As described in the foregoing, in the present invention, the output data to be transmitted to the slave station is not changed as compared to the output data at the time put <br/> Ru previous polling to the slave station in the master station the output data is not sent when also the if the input data to be sent back slave station odor <br/> Te to the master station is not changed as compared to the input data at the time of the previous poll in the slave station Since the input data is not returned, the communication frame is shortened by the output data and the input data, and the communication cycle time between the master station and the slave station is shortened.

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

【図1】本発明に係るPCのリモートI/Oシステムの
一実施例を示す説明図。
FIG. 1 is an explanatory diagram showing an embodiment of a remote I / O system for a PC according to the present invention.

【図2】通信フレームの詳細な構造を示す説明図。FIG. 2 is an explanatory diagram showing a detailed structure of a communication frame.

【図3】(a),(b)各々、入力および出力変化フラ
グの設定手順を示す説明図。
FIG. 3A and FIG. 3B are explanatory views showing a procedure for setting input and output change flags, respectively.

【図4】親局における通信処理の手順を示すフローチャ
ート。
FIG. 4 is a flowchart showing a procedure of communication processing in a master station.

【図5】各子局A〜Cについて入力および出力変化フラ
グの条件を示す説明図。
Figure 5 is an explanatory view showing the condition of the input and output change flag for each slave station A through C.

【図6】本システムによって通信されるフレームを簡略
化して示す説明図。
FIG. 6 is an explanatory view showing in simplified form a frame communicated by the present system.

【図7】従来のPCのリモートI/Oシステムによって
通信されるフレームを簡略化して示す説明図。
FIG. 7 is an explanatory diagram showing in simplified form a frame communicated by a remote I / O system of a conventional PC.

【図8】従来のPCのリモートI/Oシステムの構成を
示す説明図。
FIG. 8 is an explanatory diagram showing the configuration of a conventional PC remote I / O system.

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

1 PC本体 2 親局 3 子局 3a 入力ユニット 4 通信ケーブル 21 MPU(出力変化フラグ設定手段、ポーリング送
信手段) 23 共有RAM(出力データメモリ) 31 MPU(入力変化フラグ設定手段、レスポンス返
送手段) 33 入力データメモリ A〜C 子局
1 PC body 2 parent stations ThreeSlave station 3a Input unit 4 communication cable 21 MPU (output change flag setting means, polling transmission
(Credit means) 23 Shared RAM (output data memory) 31 MPU (input change flag setting means, response return
Sending means) 33 Input data memory A to CSlave station

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 被制御機器を制御するプログラマブル・
コントローラに直接接続される親局と、当該親局と通信
ケーブルを介して接続されると共に複数の入力ユニット
が接続される子局とからなり、上記親局はポーリング/
セレクション方式によって上記プログラマブル・コント
ローラからの出力データを各子局へ送信すると共に、各
子局が入力ユニットを介し取り込んだ入力データを受信
して、上記プログラマブル・コントローラが入出力デー
タをリフレッシュできるようにしたプログラマブル・コ
ントローラのリモートI/Oシステムにおいて、 上記親局は、 上記プログラマブル・コントローラから子局へ送信すべ
き出力データを記憶する出力データメモリと、 上記出力データメモリに記憶された出力データと、前回
のポーリング時に当該子局へ送信した出力データとを比
較して、データの値が変化している場合には出力変化フ
ラグを設定する出力変化フラグ設定手段と、 上記出力変化フラグ設定手段によって出力変化フラグが
設定されたか否かを判断して、出力変化フラグが設定さ
れている場合には出力データメモリに記憶された出力デ
ータをポーリングフレームに設定して送信する一方、出
力変化フラグが設定されていない場合には出力データを
ポーリングフレームに設定せずに送信するポーリング手
段とを具備する一方、 上記子局は、 上記入力ユニットを介し取り込んだ入力データを記憶す
る入力データメモリと、 上記入力データメモリに記憶された入力データと、前回
のポーリング時に返送した入力データとを比較して、デ
ータの値が変化している場合には入力変化フラグを設定
する入力変化フラグ設定手段と、 上記入力変化フラグ設定手段によって入力変化フラグが
設定されたか否かを判断して、入力変化フラグが設定さ
れている場合には上記入力データメモリに記憶された入
力データをレスポンスフレームに設定して返送する一
方、入力変化フラグが設定されていない場合には入力デ
ータをレスポンスフレームに設定せずに返送するレスポ
ンス手段とを具備する、 ことを特徴とするプログラマブル・コントローラのリモ
ートI/Oシステム。
1. A programmable controller for controlling a controlled device.
It is composed of a master station directly connected to the controller and a slave station connected to the master station via a communication cable and to which a plurality of input units are connected.
Depending on the selection method, the programmable controller
It transmits the output data from the roller to the respective slave stations, and receives input data each slave station taken via an input unit, a programmable controller that the programmable controller has to be able to refresh the input and output data remote In the I / O system, the master station stores the output data to be transmitted from the programmable controller to the slave station, the output data memory stored in the output data memory, and the slave station at the time of the previous polling. The output change flag is set by comparing the output data sent to the station with the output change flag setting means for setting the output change flag if the value of the data is changing, and whether the output change flag is set by the output change flag setting means. to determine whether the output data if the output change flag is set While the output data stored in the memory is set in the polling frame and is transmitted, the output data is not set in the polling frame and is transmitted when the output change flag is not set. The slave station compares the input data memory that stores the input data fetched via the input unit, the input data stored in the input data memory, and the input data returned at the previous polling, and the data value Is changing, the input change flag is set by the input change flag setting means for setting the input change flag, and whether or not the input change flag is set by the input change flag setting means . In this case, the input data stored in the input data memory is set in the response frame and returned, while the input data is input. A remote I / O system of a programmable controller, comprising: a response unit that returns input data without setting it in a response frame when a change flag is not set.
【請求項2】 被制御機器を制御するプログラマブル・
コントローラに接続可能で、かつ、ポーリング/セレク
ション方式によって該プログラマブル・コントローラか
らの出力データを子局へ送信し、この子局が入力ユニッ
トを介し取り込んだ入力データを受信する親局であっ
て、上記プログラマブル・コントローラ から子局へ送信すべ
き出力データを記憶する出力データメモリと、 上記出力データメモリに記憶された出力データと、前回
のポーリング時に子局へ送信した出力データとを比較し
て、データの値が変化している場合には出力変化フラグ
を設定する出力変化フラグ設定手段と、 上記出力変化フラグ設定手段によって出力変化フラグが
設定されたか否かを判断して、出力変化フラグが設定さ
れている場合には出力データメモリに記憶された出力デ
ータをポーリングフレームに設定して送信する一方、出
力変化フラグが設定されていない場合には出力データを
ポーリングフレームに設定せずに送信するポーリング手
段とを具備することを特徴とするプログラマブル・コン
トローラのリモートI/Oシステムの親局。
2. A programmable device for controlling a controlled device
Connectable to controller and polling / selecting
The programmable controller
Output data from these units to the slave unit, and this slave unit
A master station that receives the input data captured via the remote controller, the output data memory that stores the output data to be transmitted from the programmable controller to the slave station, the output data stored in the output data memory, and the previous The output change flag setting means for comparing the output data transmitted to the slave station at the time of polling and setting the output change flag when the value of the data has changed, and the output change flag setting means for setting the output change flag by the output change flag setting means. There it is determined whether or not a set, whereas if the output change flag is set and transmits the set output data stored in the output data memory to the polling frame, the output change flag is not set In this case, a polling means for transmitting output data without setting it in a polling frame is provided. Master station of the remote I / O system of Ramaburu controller.
JP24354292A 1992-09-11 1992-09-11 Remote I / O system for programmable controller Expired - Fee Related JP3388246B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24354292A JP3388246B2 (en) 1992-09-11 1992-09-11 Remote I / O system for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24354292A JP3388246B2 (en) 1992-09-11 1992-09-11 Remote I / O system for programmable controller

Publications (2)

Publication Number Publication Date
JPH0695718A JPH0695718A (en) 1994-04-08
JP3388246B2 true JP3388246B2 (en) 2003-03-17

Family

ID=17105431

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24354292A Expired - Fee Related JP3388246B2 (en) 1992-09-11 1992-09-11 Remote I / O system for programmable controller

Country Status (1)

Country Link
JP (1) JP3388246B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5864032B1 (en) * 2014-03-17 2016-02-17 三菱電機株式会社 Programmable logic controller
WO2020137593A1 (en) * 2018-12-25 2020-07-02 株式会社クボタ Equipment monitoring device, equipment monitoring method, and equipment monitoring program

Also Published As

Publication number Publication date
JPH0695718A (en) 1994-04-08

Similar Documents

Publication Publication Date Title
JP3797491B2 (en) Data interface and high-speed communication system using the same
CN115941102A (en) Method for synchronous communication between controllers by connecting MCU and FPGA through SPI
JP3388246B2 (en) Remote I / O system for programmable controller
US6668205B1 (en) Control method of factory automation system, recording medium recording a program therefor and central processor of factory automation system
JP3402332B2 (en) Remote I / O system for programmable controller
JP3669302B2 (en) Programmable controller
JPS5833970B2 (en) Inter-processor communication method
JP2920441B2 (en) Process data processing system and processing method
JPS63138837A (en) Communication system for on-vehicle controller
JP3659481B2 (en) Display system for PLC and data communication method between PLC and display
JP2767824B2 (en) Programmable controller system
JP2724572B2 (en) Token passing LAN device
JP2743780B2 (en) Distributed processing equipment
JP3312347B2 (en) Remote I / O system for programmable controller
JPH09326779A (en) Communication controller and communication control system
JP2576236B2 (en) Communication method of programmable controller
JP2001094626A (en) Data transfer system and data transfer method
JPH0683223B2 (en) Programmable controller link unit
JP2775630B2 (en) Link system for programmable controller
JP3095276B2 (en) Sequence controller
JP3615306B2 (en) Storage device access system
JPH1031617A (en) Programmable controller
JPH08221106A (en) Programmable controller
JPH07120329B2 (en) Bus controller
JPH0837520A (en) Multiplex signal transmitter

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021213

LAPS Cancellation because of no payment of annual fees