JPH0695718A - Remote i/o system for programmable controller - Google Patents

Remote i/o system for programmable controller

Info

Publication number
JPH0695718A
JPH0695718A JP24354292A JP24354292A JPH0695718A JP H0695718 A JPH0695718 A JP H0695718A JP 24354292 A JP24354292 A JP 24354292A JP 24354292 A JP24354292 A JP 24354292A JP H0695718 A JPH0695718 A JP H0695718A
Authority
JP
Japan
Prior art keywords
input
data
output
change flag
polling
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.)
Granted
Application number
JP24354292A
Other languages
Japanese (ja)
Other versions
JP3388246B2 (en
Inventor
Yasuo Muneda
靖男 宗田
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
Omron Tateisi Electronics Co
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, Omron Tateisi Electronics Co 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

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

Abstract

PURPOSE:To shorten the polling cycle time and to increase the data exchange speed between a master station and a slave station. CONSTITUTION:When output data to be transmitted to a slave station 3 is not changed from output data for preceding polling, a master station does not set a transmission command neither output data to a polling frame and sets only a reception command to transmit the polling frame to the slave station 3. The slave station 3 receives this polling frame; and when input data which have been fetched through an input unit 3a and should be returned to the master station 2, is not changed from input data for preceding polling, the slave station 3 does not set input data and returns a response frame.

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 small 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 incorporated in a PC in the same manner as the unit (hereinafter referred to as a 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 small 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が
遠隔の非制御機器を制御できるように構成されている。
Each small station 3 is usually connected to a plurality of input / output units 3a and 3b via a data bus, and a motor and a switch (S) are connected to each input / output unit 3a and 3b.
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
In the O system, when the PC main body 1 controls the input / output units 3a and 3b on the small station 3 via the master station 2, the input data on the small station 3 is transferred to the PC main body 1 via the master station 2 to the PC main body 1 Output data of the output unit 3b on the small station 3 via the master station 2
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】また、親局と小局との間のデータ送受信
は、通常、親局によるポーリング/セレクション、すな
わち各小局にノード番号の順で出力データを設定したポ
ーリングフレームを送り、ポーリングフレームを受信し
た小局が入力データをレスポンスフレームに設定して親
局に返送することにより行われる。
Data transmission / reception between a master station and a small station is usually performed by polling / selection by the master station, that is, a polling frame in which output data is set in the order of node numbers is sent to each small station, and the polling frame is transmitted. This is performed by the receiving small station setting the input data in the response frame and returning it to the parent station.

【0008】[0008]

【発明が解決しようとする課題】ところで、このような
従来のリモートI/Oシステムでは、各小局へ順次ポー
リングフレームを送信し、各小局毎に出力データを送信
すると共に入力データを受信するようにしたため、ポー
リングサイクルタイムが大きくなり、親局と小局との間
で高速にデータ交換できず、PC本体の命令実行時間へ
影響を与えると共に、小局に接続されたI/Oユニット
にはPC本体上のI/Oユニットと同様にアクセスでき
ない、という問題がある。
By the way, in such a conventional remote I / O system, a polling frame is sequentially transmitted to each small station, output data is transmitted for each small station, and input data is received. As a result, the polling cycle time becomes long, data cannot be exchanged at high speed between the master station and the small station, which affects the instruction execution time of the PC main unit and the I / O unit connected to the small 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 problem, 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 small station. The purpose is to do.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するた
め、本発明では、PC本体に直接接続される親局と、当
該親局と通信ケーブルを介して接続されると共に複数の
入力ユニットが接続される小局とからなり、上記親局は
ポーリング/セレクション方式によって上記PC本体か
らの出力データを各小局へ送信すると共に、各小局が入
力ユニットを介し取り込んだ入力データを受信して、上
記PC本体が入出力データをリフレッシュできるように
したプログラマブル・コントローラのリモートI/Oシ
ステムにおいて、上記親局は、上記PC本体から小局へ
送信すべき出力データを記憶する出力データメモリと、
上記出力データメモリに記憶された出力データと、前回
のポーリング時に当該小局へ送信した出力データとを比
較して、データの値が変化している場合には出力変化フ
ラグを設定する出力変化フラグ設定手段と、上記出力変
化フラグ設定手段によって出力変化フラグが設定された
か否かを判断して、出力変化フラグが設定されてない場
合には出力データメモリに記憶された出力データをポー
リングフレームに設定して送信する一方、出力変化フラ
グが設定されている場合には出力データをポーリングフ
レームに設定せずに送信するポーリング手段とを具備す
る一方、上記小局は、上記入力ユニットを介し取り込ん
だ入力データを記憶する入力データメモリと、上記入力
データメモリに記憶された入力データと、前回のポーリ
ング時に返送した入力データとを比較して、データの値
が変化している場合には入力変化フラグを設定する入力
変化フラグ設定手段と、上記入力変化フラグ設定手段に
よって入力変化フラグが設定されたか否かを判断して、
入力変化フラグが設定されてない場合には上記入力デー
タメモリに記憶された入力データをレスポンスフレーム
に設定して返送する一方、入力変化フラグが設定されて
いる場合には入力データをレスポンスフレームに設定せ
ずに返送するレスポンス手段とを具備することを特徴と
する。
To achieve the above object, according to the present invention, a master station directly connected to a PC main body, a master station connected to the master station via a communication cable, and a plurality of input units are connected. The master station transmits the output data from the PC body to each small station by the polling / selection method, and receives the input data captured by each small station via the input unit. In a remote I / O system of a programmable controller in which the PC body can refresh input / output data, the master station has an output data memory for storing output data to be transmitted from the PC body to a small station,
Output change flag that compares the output data stored in the output data memory with the output data sent to the small station at the time of the previous polling, and sets the output change flag if the data value has changed. The output change flag is set by the setting means and the output change flag setting means, and if the output change flag is not set, the output data stored in the output data memory is set in the polling frame. On the other hand, when the output change flag is set, the polling means for transmitting the output data without setting it in the polling frame is provided, while the small station inputs the data received through the input unit. Input data memory to store data, input data stored in the above input data memory, and returned at the last polling The input data is compared with the force data, and if the value of the data is changing, it is determined whether or not the input change flag is set by the input change flag setting means for setting the input change flag and the input change flag setting means. do it,
When the input change flag is not set, the input data stored in the input data memory is set in the response frame and returned, while when the input change flag is set, the input data is set in the response frame. It is characterized by comprising a response means for returning without doing.

【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 from the PC body to the small 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】小局では、入力ユニットを介し取り込み入
力データメモリに記憶した入力データと、記憶しておい
た前回のポーリング時に返送した入力データとを比較し
て、データの値が変化している場合にのみ当該入力デー
タをレスポンスフレームに設定して返送し、データの値
が変化してない場合には当該入力データをレスポンスフ
レームに設定せずに返送する。
At the small station, if 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, 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). (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との間で出力データおよび入
力データの受け渡しを行う共有RAM22と、送受信バ
ッファ(図示せず)を内蔵して小局3との通信を行う通
信LSI23とを有する。なお、Aoは親局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 small station 3 via the communication cable 4 as output change flag setting means and polling means. The MPU 21 has a shared RAM 22 that exchanges output data and input data with the PC body 1, and a communication LSI 23 that incorporates a transmission / reception buffer (not shown) and that communicates with the small station 3. Incidentally, Ao 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 small 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 small 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 small station to fetch the output data and a reception command for instructing the setting of the 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 small station 3. The MPU 31 receives the polling frame from the master station 2 and the input data "00101101" of this time, and 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)に示すように、今回のポーリング時に小局3
に送信すべき出力データ“10010101”と、自己
が記憶しておいた前回のポーリング時に当該小局3へ送
信した出力データ“11010101”とを比較して、
出力データが変化している場合には、出力変化フラグを
“1”にセットする一方、出力データが変化してない場
合には出力変化フラグを“0”にしてレジスタに保持し
ておく。
In the same way as above, the MPU 21 of the master station 2, as shown in FIG.
The output data “10010101” to be transmitted to the small station 3 is compared with the output data “11010101” stored in the previous station stored at the time of the previous polling.
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)を詳細に示している。
In this figure, the communication process between the master station 2 and the three small stations A to C is shown, and particularly the communication process with the small station A (step 100) is shown in detail.

【0027】まず、この処理では、小局Aとの所定の通
信開始処理を行い(ステップ110)、前述のレジスタ
等に記憶された当該小局Aへの出力データの変化を示す
出力変化フラグを判断し(ステップ120)、出力変化
フラグが“1”にセットされている場合には(ステップ
120“Yes”)、今回のポーリング時に当該小局Aへ
送信すべき出力データが、前回ポーリング時に当該小局
Aへ送信した出力データと異なっていることを示してい
るため、図2に示すように、ポーリングフレームの制御
フィールド(CNF)に送信コマンドおよび受信コマン
ドをセットすると共に、ポーリングフレームに当該出力
データをセットして小局Aへ送信する(ステップ13
0)。
First, in this process, a predetermined communication start process with the small station A is performed (step 110), and an output change flag indicating a change in the output data to the small station A stored in the above-mentioned register or the like is set. If it is determined (step 120) and the output change flag is set to "1" (step 120 "Yes"), the output data to be transmitted to the small station A at the time of this polling is the same at the time of the previous polling. Since it indicates that the output data is different from the output data transmitted to the small 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 is sent to the polling frame. Data is set and transmitted to the small station A (step 13)
0).

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

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

【0030】ところで、小局Aでは、ここでは図示して
ないが、入力データを取り込んで記憶すると共に、その
入力データと、前回のポーリング時に返送した入力デー
タとを比較して、その比較結果により入力変化フラグを
セットしている。
Although not shown here, the small station A fetches and stores the input data, compares the input data with the input data returned at the previous polling, and shows the comparison result. 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”がセットされている
場合、すなわち現在の入力データと前回ポーリング時に
返送した入力データとが異なっている場合には、小局A
は入力データをレスポンスフレームにセットして親局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, substation 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 small 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)。
For this reason, in the master station 2, when the input change flag is set to "1" in the small station A (step 150 "Yes"), when a response frame is returned from the small station A. While receiving the response and the input data (step 160), if the input change flag is not set to "1" in the small station A (step 150).
"No"), only the response is received when the response frame is returned from the small station A (step 17).
0), followed by terminating the communication process with the small station A (step 180).

【0034】従って、小局Aでは親局2へ返送すべき入
力データが前回ポーリング時に返送した入力データと較
べて変化してない場合には、当該入力データを返送しな
いため、そのデータの分だけレスポンスフレームが短く
なり、ポーリングタイムも短縮化される。
Therefore, in the small station A, if 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 the communication processing with the small station A is completed,
The other two small stations B and C perform communication processing in the same manner as in the case of small station A (steps 200 and 300), and when the processing is completed, return to communication processing with small station A (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 small stations A to C will be described as an example. First, FIG. 5 shows the conditions of the output change flag and the input change flag for each of the small stations A to C. That is, for the small station A, there is output data transmitted from the master station 2,
Moreover, the condition that there is input data to be returned to the master station 2, such input / output data for the small station B, and only input data to be returned to the master station for the small station C is shown. 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 small 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 small 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 for the small station B is the communication time Tb for only the received command.

【0040】さらに、小局Cとの間で通信されるフレー
ムは、出力変化フラグに“1”がセットされてなく、入
力変化フラグに“1”がセットされているため(図5参
照)、親局からは受信コマンドのみがポーリングフレー
ムにセットされて送信され、レスポンスフレームに入力
データがセットされて返送されてくる。よって、小局3
にかかる通信時間は受信コマンドと入力データとを合わ
せた時間Tcとなる。
Further, in the frame communicated with the small 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, small 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, each of the small stations A to C transmits the frame of the transmission command, the output data, the reception command, and the input data regardless of the values of the output change flag and the input change flag.

【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 is clear from comparison with c ', in this system, when the output data to be transmitted to the small station is the same as the output data at the time of the previous polling, and the input data to be returned to the master station is at the time of the previous polling. 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 above, according to the present invention, when the output data to be transmitted to the small station at the master station is not different from the output data at the previous polling time at the small station, the output data is changed. Is not sent, and if the input data to be returned to the parent station in the small station is not different from the input data at the previous polling in the small station, the input data is not sent back. The communication frame is shortened by the amount of data and input data, and the communication cycle time between the master station and the small 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について入力および出力変化フラ
グの条件を示す説明図。
FIG. 5 is an explanatory diagram showing conditions of input and output change flags for each of the small stations A to 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 Main Body 2 Master Station 3 Small Station 3a Input Unit 4 Communication Cable 21 MPU (Output Change Flag Setting Means, Polling Sending Means) 23 Shared RAM (Output Data Memory) 31 MPU (Input Change Flag Setting Means, Response Returning Means) 33 Input data memory A to C Small station

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 PC本体に直接接続される親局と、当該
親局と通信ケーブルを介して接続されると共に複数の入
力ユニットが接続される小局とからなり、上記親局はポ
ーリング/セレクション方式によって上記PC本体から
の出力データを各小局へ送信すると共に、各小局が入力
ユニットを介し取り込んだ入力データを受信して、上記
PC本体が入出力データをリフレッシュできるようにし
たプログラマブル・コントローラのリモートI/Oシス
テムにおいて、 上記親局は、 上記PC本体から小局へ送信すべき出力データを記憶す
る出力データメモリと、 上記出力データメモリに記憶された出力データと、前回
のポーリング時に当該小局へ送信した出力データとを比
較して、データの値が変化している場合には出力変化フ
ラグを設定する出力変化フラグ設定手段と、 上記出力変化フラグ設定手段によって出力変化フラグが
設定されたか否かを判断して、出力変化フラグが設定さ
れてない場合には出力データメモリに記憶された出力デ
ータをポーリングフレームに設定して送信する一方、出
力変化フラグが設定されている場合には出力データをポ
ーリングフレームに設定せずに送信するポーリング手段
とを具備する一方、 上記小局は、 上記入力ユニットを介し取り込んだ入力データを記憶す
る入力データメモリと、 上記入力データメモリに記憶された入力データと、前回
のポーリング時に返送した入力データとを比較して、デ
ータの値が変化している場合には入力変化フラグを設定
する入力変化フラグ設定手段と、 上記入力変化フラグ設定手段によって入力変化フラグが
設定されたか否かを判断して、入力変化フラグが設定さ
れてない場合には上記入力データメモリに記憶された入
力データをレスポンスフレームに設定して返送する一
方、入力変化フラグが設定されている場合には入力デー
タをレスポンスフレームに設定せずに返送するレスポン
ス手段とを具備する、ことを特徴とするプログラマブル
・コントローラのモートI/Oシステム。
1. A master station which is directly connected to a PC main body, and a small station which is connected to the master station via a communication cable and to which a plurality of input units are connected. The master station is polling / selection. According to the method, the output data from the PC main body is transmitted to each small station, and each small station receives the input data taken in through the input unit so that the PC main body can refresh the input / output data. In the remote I / O system of the controller, the master station stores the output data to be transmitted from the PC body to the small station, the output data memory that stores the output data, the output data stored in the output data memory, and the previous polling time Output that compares the output data sent to the small station and sets the output change flag if the data value changes The change flag setting means and the output change flag setting means determine whether or not the output change flag is set. If the output change flag is not set, the output data stored in the output data memory is polled. While the polling means is provided for transmitting the output data without setting it in the polling frame when the output change flag is set, while the small station captures data via the input unit. The input data memory that stores the input data, the input data stored in the input data memory, and the input data returned at the previous polling are compared, and if the data value changes, the input change The input change flag setting means for setting a flag and the input change flag setting means for setting the input change flag If the input change flag is not set, the input data stored in the input data memory is set in the response frame and returned, while if the input change flag is set, And a response means for returning the input data without setting it in a response frame, the mote I / O system of the programmable 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 true JPH0695718A (en) 1994-04-08
JP3388246B2 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015140910A1 (en) * 2014-03-17 2015-09-24 三菱電機株式会社 Programmable logic controller
JPWO2020137593A1 (en) * 2018-12-25 2021-09-27 株式会社クボタ Equipment monitoring equipment, equipment monitoring methods, and equipment monitoring programs

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015140910A1 (en) * 2014-03-17 2015-09-24 三菱電機株式会社 Programmable logic controller
KR20160011237A (en) 2014-03-17 2016-01-29 미쓰비시덴키 가부시키가이샤 Programmable logic controller
JP5864032B1 (en) * 2014-03-17 2016-02-17 三菱電機株式会社 Programmable logic controller
CN105408824A (en) * 2014-03-17 2016-03-16 三菱电机株式会社 Programmable logic controller
US20160170398A1 (en) * 2014-03-17 2016-06-16 Mitsubishi Electric Corporation Programmable logic controller
CN105408824B (en) * 2014-03-17 2017-07-04 三菱电机株式会社 Programmable logic controller (PLC)
US9921564B2 (en) 2014-03-17 2018-03-20 Mitsubishi Electric Corporation Programmable logic controller
JPWO2020137593A1 (en) * 2018-12-25 2021-09-27 株式会社クボタ Equipment monitoring equipment, equipment monitoring methods, and equipment monitoring programs

Also Published As

Publication number Publication date
JP3388246B2 (en) 2003-03-17

Similar Documents

Publication Publication Date Title
CN111541595B (en) 1553B bus data communication method and system
JP3343036B2 (en) Programmable controller network system
JP3388246B2 (en) Remote I / O system for programmable controller
JP3651573B2 (en) Control method for factory automation system, central controller for factory automation system
JP3402332B2 (en) Remote I / O system for programmable controller
CN212486527U (en) Slave station conversion device based on MODBUS protocol
JPS5833970B2 (en) Inter-processor communication method
JPH05257852A (en) Process data processing system and processing method
JP2003029809A (en) Cpu unit and programmable controller
JP2767824B2 (en) Programmable controller system
JP2001282312A (en) Display system for plc and data communication method between display and data
JP2000299895A (en) Driver interface system
JPH0439684B2 (en)
JP2724572B2 (en) Token passing LAN device
JPH0732397B2 (en) Electronic device with data transmission function
JP2001320390A (en) Device and method for controlling serial bus
JPS634216B2 (en)
KR100584583B1 (en) Apparatus and method controlling a serial bus
JP2775630B2 (en) Link system for programmable controller
JP3095276B2 (en) Sequence controller
JPH0683223B2 (en) Programmable controller link unit
JP3876574B2 (en) Motor control equipment
JP3312347B2 (en) Remote I / O system for programmable controller
KR20230119306A (en) Memory access method
JPH0435764B2 (en)

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