JPH0777931A - Programable controller - Google Patents

Programable controller

Info

Publication number
JPH0777931A
JPH0777931A JP22594493A JP22594493A JPH0777931A JP H0777931 A JPH0777931 A JP H0777931A JP 22594493 A JP22594493 A JP 22594493A JP 22594493 A JP22594493 A JP 22594493A JP H0777931 A JPH0777931 A JP H0777931A
Authority
JP
Japan
Prior art keywords
data
transfer
storage means
data storage
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.)
Granted
Application number
JP22594493A
Other languages
Japanese (ja)
Other versions
JP3348177B2 (en
Inventor
Makoto Kaai
信 河相
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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=16837346&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JPH0777931(A) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP22594493A priority Critical patent/JP3348177B2/en
Publication of JPH0777931A publication Critical patent/JPH0777931A/en
Application granted granted Critical
Publication of JP3348177B2 publication Critical patent/JP3348177B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To prevent the influence from imparting to an instruction execution cycle even when a transferring data amount at the time of I/O refresh is increased. CONSTITUTION:By an MPU 11, immediately after a user program is executed, a bus switching circuit 52 is instructed so as to connect a transferring data memory 51 to an internal bus 16, and the output data of a work memory 14 are exchanged with the input data of the transferring data memory 51, and after the exchange is ended, the bus switching circuit 51b is instructed so as to switch the transferring data memory 51a to an external bus 3, and an operation start command is issued to a data transfer circuit 52, and immediately thereafter, it enters the next cycle, and the user program is executed again. On the other hand, by the data transfer circuit 52, the operation start command from the MPU 11 is received, and the output data of the transferring data memory 51a are exchanged with the input data of an I/O unit 2.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、CPUユニットとI/
Oユニットとの間で外部バスを介して入出力データの交
換を行うようにしたプログラマブルコントローラに関す
る。
The present invention relates to a CPU unit and an I / O.
The present invention relates to a programmable controller adapted to exchange input / output data with an O unit via an external bus.

【0002】[0002]

【従来の技術】プログラマブルコントローラは、通常、
CPUユニットや入出力データの入出力を行うI/Oユ
ニットが接続されて構成されている。
2. Description of the Related Art Programmable controllers are usually
A CPU unit and an I / O unit for inputting / outputting input / output data are connected and configured.

【0003】このようなプログラマブルコントローラで
は、通常、図5に示すように、CPUユニット内のマイ
クロプロセッサ(以下、MPUという)が、ユーザプロ
グラムの実行と、CPUユニットとI/Oユニット間の
外部バスを介してのI/Oリフレッシュ処理、すなわち
入出力データの交換とを繰り返し実行している。
In such a programmable controller, normally, as shown in FIG. 5, a microprocessor (hereinafter referred to as MPU) in a CPU unit executes a user program and an external bus between the CPU unit and the I / O unit. I / O refresh processing, that is, exchange of input / output data, is repeatedly executed via the.

【0004】[0004]

【発明が解決しようとする課題】しかし、CPUユニッ
トとI/Oユニット間の外部バスは一般的にユニット内
の内部バスと比較してデータ転送速度が遅いので、上記
従来のプログラマブルコントローラのように、CPUユ
ニット内のMPUが外部バスを介して直接I/Oユニッ
トとI/Oリフレッシュを行っていたのでは、I/Oリ
フレッシュの際の転送用データ量が大きくなった場合
に、命令実行サイクルに占めるI/Oリフレッシュサイ
クルの割合が無視できなくなる、という問題があった。
However, since the external bus between the CPU unit and the I / O unit generally has a slower data transfer rate than the internal bus in the unit, the external bus is different from the conventional programmable controller described above. Since the MPU in the CPU unit was directly performing I / O refresh with the I / O unit via the external bus, if the amount of transfer data during I / O refresh becomes large, the instruction execution cycle There is a problem in that the ratio of I / O refresh cycles to the above cannot be ignored.

【0005】そこで、本発明は、I/Oリフレッシュの
際の転送用データ量が大きくなった場合でも命令実行サ
イクルに影響を与えないプログラマブルコントローラを
提供することを目的とする。
Therefore, an object of the present invention is to provide a programmable controller that does not affect the instruction execution cycle even when the amount of transfer data at the time of I / O refresh becomes large.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明では、CPUユニットとI/O
ユニットとを外部バスで接続したプログラマブルコント
ローラであって、CPUユニットは、マイクロプロセッ
サと、マイクロプロセッサと内部バスを介して接続さ
れ、ユーザプログラム実行の際の入出力データを記憶す
る実行用データ記憶手段と、マイクロプロセッサおよび
実行用データ記憶手段と内部バスを介して接続されると
共に、I/Oユニットと外部バスを介して接続され、C
PUユニットとI/Oユニット間で転送される入出力デ
ータを記憶する転送用データ記憶手段と、データ転送手
段とを具備し、上記マイクロプロセッサが、ユーザプロ
グラムの実行後、実行用データ記憶手段に記憶された出
力データを転送用データ記憶手段へ転送すると共に、転
送用データ記憶手段に記憶された入力データを実行用デ
ータ記憶手段へ転送し、その後ユーザプログラムを実行
する一方、上記データ転送手段が、上記マイクロプロセ
ッサによる入出力データの転送後、転送用データ記憶手
段に記憶された出力データをI/Oユニットへ転送する
と共に、I/Oユニットが取り込んだ入力データを転送
用データ記憶手段へ転送する、ことを特徴とする。
In order to achieve the above object, the invention according to claim 1 provides a CPU unit and an I / O.
A programmable controller in which a unit is connected to an external bus, wherein a CPU unit is connected to a microprocessor via the internal bus, and execution data storage means stores input / output data when executing a user program. And a microprocessor and execution data storage means via an internal bus, and an I / O unit via an external bus.
A data transfer means for storing input / output data transferred between the PU unit and the I / O unit, and a data transfer means are provided, and the microprocessor stores the data in the execution data storage means after executing the user program. The stored output data is transferred to the transfer data storage means, the input data stored in the transfer data storage means is transferred to the execution data storage means, and then the user program is executed. After the input / output data is transferred by the microprocessor, the output data stored in the transfer data storage means is transferred to the I / O unit, and the input data captured by the I / O unit is transferred to the transfer data storage means. It is characterized by:

【0007】請求項2記載の発明では、請求項1記載の
プログラマブルコントローラにおいて、マイクロプロセ
ッサが、ユーザプログラムの実行後、すぐに実行用デー
タ記憶手段に記憶された出力データを転送用データ記憶
手段へ転送すると共に、転送用データ記憶手段に記憶さ
れた入力データを実行用データ記憶手段へ転送し、その
後ユーザプログラムを実行する、ことを特徴とする。
According to a second aspect of the invention, in the programmable controller according to the first aspect, the microprocessor immediately transfers the output data stored in the execution data storage means to the transfer data storage means after executing the user program. Along with the transfer, the input data stored in the transfer data storage means is transferred to the execution data storage means, and then the user program is executed.

【0008】請求項3記載の発明では、請求項1記載の
プログラマブルコントローラにおいて、マイクロプロセ
ッサが、ユーザプログラムの実行後、一定時間経過後に
実行用データ記憶手段に記憶された出力データを転送用
データ記憶手段へ転送すると共に、転送用データ記憶手
段に記憶された入力データを実行用データ記憶手段へ転
送し、その後ユーザプログラムを実行する、ことを特徴
とする。
According to a third aspect of the present invention, in the programmable controller according to the first aspect, the microprocessor stores the output data stored in the execution data storage means after the execution of the user program for a certain period of time after the execution of the user program. And the input data stored in the transfer data storage means are transferred to the execution data storage means, and then the user program is executed.

【0009】請求項4記載の発明では、請求項1記載の
プログラマブルコントローラにおいて、マイクロプロセ
ッサが、ユーザプログラムの実行後、すぐに実行用デー
タ記憶手段に記憶された出力データを転送用データ記憶
手段へ転送すると共に、転送用データ記憶手段に記憶さ
れた入力データを実行用データ記憶手段へ転送し、その
後ユーザプログラムを実行する一方、データ転送手段
が、上記マイクロプロセッサによる入出力データの転送
後、転送用データ記憶手段に記憶された出力データをI
/Oユニットへ転送すると共に、I/Oユニットが取り
込んだ入力データの転送用データ記憶手段への転送を上
記マイクロプロセッサがユーザプログラムの実行を終了
するまで繰返す、ことを特徴とする。
According to a fourth aspect of the present invention, in the programmable controller according to the first aspect, the microprocessor immediately transfers the output data stored in the execution data storage means to the transfer data storage means after executing the user program. At the same time as the transfer, the input data stored in the transfer data storage means is transferred to the execution data storage means, and then the user program is executed, while the data transfer means transfers the input / output data by the microprocessor and then transfers the data. The output data stored in the data storage means for I
The data is transferred to the I / O unit, and the transfer of the input data taken in by the I / O unit to the transfer data storage means is repeated until the microprocessor finishes executing the user program.

【0010】[0010]

【作用】請求項1記載の発明では、マイクロプロセッサ
が、ユーザプログラムの実行後、実行用データ記憶手段
に記憶された出力データを転送用データ記憶手段へ転送
すると共に、転送用データ記憶手段に記憶された入力デ
ータを実行用データ記憶手段へ転送し、その後ユーザプ
ログラムを実行する一方、データ転送手段が、マイクロ
プロセッサによる入出力データの転送後、転送用データ
記憶手段に記憶された出力データをI/Oユニットへ転
送すると共に、I/Oユニットが取り込んだ入力データ
を転送用データ記憶手段へ転送する。
According to the first aspect of the invention, the microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means after the execution of the user program, and stores the output data in the transfer data storage means. The transferred input data is transferred to the execution data storage means, and then the user program is executed, while the data transfer means transfers the input / output data by the microprocessor and then the output data stored in the transfer data storage means I The data is transferred to the I / O unit and the input data taken in by the I / O unit is transferred to the transfer data storage means.

【0011】請求項2記載の発明では、マイクロプロセ
ッサが、ユーザプログラムの実行後、すぐに実行用デー
タ記憶手段に記憶された出力データを転送用データ記憶
手段へ転送する。
According to another aspect of the present invention, the microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means immediately after the execution of the user program.

【0012】請求項3記載の発明では、マイクロプロセ
ッサが、ユーザプログラムの実行後、一定時間経過後に
実行用データ記憶手段に記憶された出力データを転送用
データ記憶手段へ転送する。
According to the third aspect of the invention, the microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means after a predetermined time has elapsed after the execution of the user program.

【0013】請求項4記載の発明では、マイクロプロセ
ッサが、ユーザプログラムの実行後、すぐに実行用デー
タ記憶手段に記憶された出力データを転送用データ記憶
手段へ転送すると共に、転送用データ記憶手段に記憶さ
れた入力データを実行用データ記憶手段へ転送し、その
後ユーザプログラムを実行する一方、データ転送手段
が、マイクロプロセッサによる入出力データの転送後、
転送用データ記憶手段に記憶された出力データをI/O
ユニットへ転送すると共に、I/Oユニットが取り込ん
だ入力データの転送用データ記憶手段への転送をマイク
ロプロセッサがユーザプログラムの実行を終了するまで
繰り返す。
According to the present invention, the microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means immediately after the execution of the user program, and at the same time, the transfer data storage means. The input data stored in the execution data storage means and then executes the user program, while the data transfer means transfers the input / output data by the microprocessor,
The output data stored in the transfer data storage means is I / O
The transfer to the unit and the transfer of the input data captured by the I / O unit to the transfer data storage means are repeated until the microprocessor finishes executing the user program.

【0014】[0014]

【実施例】以下、本発明に係るプログラマブルコントロ
ーラ(以下、PLCという)の実施例を図面に基づいて
説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a programmable controller (hereinafter referred to as PLC) according to the present invention will be described below with reference to the drawings.

【0015】図1に、本発明に係るPLCの構成を示
す。このPLCは、CPUユニット1と、I/Oユニッ
ト2とを外部バス3で接続して構成されている。
FIG. 1 shows the configuration of a PLC according to the present invention. This PLC is configured by connecting a CPU unit 1 and an I / O unit 2 with an external bus 3.

【0016】CPUユニット1は、ユーザプログラムの
実行等をするMPU11と、MPU11を動作させるた
めのシステムプログラムが格納されたシステムプログラ
ムメモリ12と、ユーザプログラムが格納されたユーザ
プログラムメモリ13と、プログラム命令実行の際の入
出力データを記憶する実行用データ記憶手段としてのワ
ークメモリ14と、外部バス3と接続されるインタフェ
ース(I/F)回路15とを有しており、それらは内部
バス16を介して接続されている。
The CPU unit 1 includes an MPU 11 that executes a user program, a system program memory 12 that stores a system program for operating the MPU 11, a user program memory 13 that stores a user program, and program instructions. It has a work memory 14 as an execution data storage means for storing input / output data at the time of execution, and an interface (I / F) circuit 15 connected to the external bus 3. Connected through.

【0017】インタフェース回路15は、転送用データ
記憶手段としての転送用データ記憶部51と、MPU1
1からのデータ転送命令により転送用データ記憶部51
とI/Oユニット2間で後述するように入出力データの
転送を行うデータ転送手段としてのデータ転送回路52
とから構成されている。本実施例では、転送用データ記
憶部51は、シングルポートの転送用データメモリ51
aと、内部バス16および外部バス3と接続され、MP
U11からの切替え指令により転送用データメモリ51
の接続先を内部バス16あるいは外部バス3の一方に切
替えるバス切替回路51bとから構成されている。
The interface circuit 15 includes a transfer data storage unit 51 as a transfer data storage unit, and the MPU 1.
The data storage unit 51 for transfer according to the data transfer command from
Data transfer circuit 52 as data transfer means for transferring input / output data between the I / O unit 2 and the I / O unit 2 as described later.
It consists of and. In this embodiment, the transfer data storage unit 51 is a single-port transfer data memory 51.
a is connected to the internal bus 16 and the external bus 3, and MP
Data memory 51 for transfer by a switching command from U11
And a bus switching circuit 51b for switching the connection destination to either the internal bus 16 or the external bus 3.

【0018】また、I/Oユニット2は、CPUユニッ
ト1とデータ交換を行うと共に、外部機器への入出力
や、I/Oユニット内部でデータ処理を実行するように
構成されている。ここでは、I/Oユニット2は、1台
しか示されていないが、外部バス3上に複数台接続する
ことができ、また、入力専用、出力専用であっても良
い。
Further, the I / O unit 2 is configured to exchange data with the CPU unit 1, perform input / output to / from an external device, and execute data processing inside the I / O unit. Although only one I / O unit 2 is shown here, a plurality of I / O units 2 can be connected to the external bus 3 and may be dedicated to input and output.

【0019】次に、第1実施例のPLCの動作を説明す
る。この第1実施例は、MPU11によるユーザプログ
ラム実行時間が、データ転送回路52による転送用デー
タメモリ51aとI/Oユニット2間のデータ交換時間
よりも長い場合の実施例である。
Next, the operation of the PLC of the first embodiment will be described. The first embodiment is an embodiment in which the user program execution time by the MPU 11 is longer than the data exchange time by the data transfer circuit 52 between the transfer data memory 51a and the I / O unit 2.

【0020】図2に、この第1実施例におけるMPU1
1およびデータ転送回路52の動作のタイムチャートを
示す。
FIG. 2 shows the MPU 1 in the first embodiment.
1 shows a time chart of operations of 1 and the data transfer circuit 52.

【0021】第1実施例の場合、MPU11によるユー
ザプログラム実行時間t1 のほうが、データ転送回路5
3によるI/Oユニット2とのデータ交換時間t2 より
も長いため、MPU11は、ユーザプログラムの実行
後、すぐにバス切替回路52に切替指令を送って転送用
データメモリ51を内部バス16に接続するように指示
して、ワークメモリ14に格納されている出力データを
内部バス16を介して転送用データメモリ51aに転送
すると共に、転送用データメモリ51aに格納されてい
る入力データをワークメモリ14に転送させる。
In the case of the first embodiment, the user program execution time t1 by the MPU 11 is shorter than the data transfer circuit 5.
3 is longer than the data exchange time t2 with the I / O unit 2, the MPU 11 immediately sends a switching command to the bus switching circuit 52 to connect the transfer data memory 51 to the internal bus 16 after executing the user program. To transfer the output data stored in the work memory 14 to the transfer data memory 51a via the internal bus 16 and to transfer the input data stored in the transfer data memory 51a to the work memory 14 Transfer to.

【0022】この転送終了後、MPU11は、バス切替
回路51bに切替指令を送って転送用データメモリ51
aの接続先を内部バス16から外部バス3に切替えるよ
うに指示すると共に、データ転送回路52に動作開始指
令を送ってMPU11のI/Oリフレッシュ処理の終了
を通知し、その後すぐに次サイクルに入って、ユーザプ
ログラムを再び実行するようにする。
After this transfer is completed, the MPU 11 sends a switching command to the bus switching circuit 51b to transfer data memory 51.
A command is issued to switch the connection destination of a from the internal bus 16 to the external bus 3, an operation start command is sent to the data transfer circuit 52 to notify the end of the I / O refresh processing of the MPU 11, and immediately after that the next cycle is started. Enter and try to run the user program again.

【0023】一方、データ転送回路52では、MPU1
1からI/Oリフレッシュ処理の終了通知を受けると、
バス切替回路51bによって転送用データメモリ51a
の接続先が外部バス3に切替わっているため、転送用デ
ータメモリ51aに格納されている出力データを外部バ
ス3を介してI/Oユニット2に転送すると共に、I/
Oユニット2が取込んだ入力データをデータ転送用デー
タメモリ51aへ転送する。そして、MPU11から次
の動作開始指令が来るまで待機する。
On the other hand, in the data transfer circuit 52, the MPU1
When the end notification of the I / O refresh process is received from 1,
The data memory 51a for transfer by the bus switching circuit 51b
Since the connection destination of is switched to the external bus 3, the output data stored in the transfer data memory 51a is transferred to the I / O unit 2 via the external bus 3, and
The input data taken in by the O unit 2 is transferred to the data transfer data memory 51a. Then, it waits for the next operation start command from the MPU 11.

【0024】従って、この第1実施例によれば、MPU
11によるユーザプログラム実行処理とデータ転送回路
によるI/Oユニット2とのI/Oリフレッシュ処理と
が並列処理され、MPU11はCPUユニット1内のI
/F回路15の転送用データメモリ51aと内部バス1
6を介してI/Oリフレッシュ、すなわち入出力データ
の交換を行うだけで良いため、外部バス3を介してI/
Oユニット2とI/Oリフレッシュを行う場合と比べ
て、I/Oリフレッシュサイクルおよび命令実行サイク
ルが短縮化され、I/Oリフレッシュの際の転送用デー
タ量が大きくなった場合でも命令実行サイクルへの影響
を小さくできる。
Therefore, according to the first embodiment, the MPU
The user program execution process by the I / O unit 11 and the I / O refresh process by the data transfer circuit with the I / O unit 2 are processed in parallel, and the MPU 11 operates the I / O unit in the CPU unit 1.
Data memory 51a for transfer of / F circuit 15 and internal bus 1
I / O refresh via I / O 6, that is, exchange of input / output data is all that is required.
The I / O refresh cycle and the instruction execution cycle are shortened as compared with the case where the I / O refresh is performed with the O unit 2, and the instruction execution cycle is started even when the transfer data amount at the I / O refresh becomes large. Can reduce the effect of.

【0025】ここで、図2に示すように、MPU11が
転送用データメモリ51aとのI/Oリフレッシュにt
3 時間だけ要するとすると、この第1実施例によれば、
従来より(t2 −t3 )時間だけ命令実行サイクルを短
縮化できることになる。
Here, as shown in FIG. 2, the MPU 11 does not perform I / O refresh with the transfer data memory 51a.
If it takes only 3 hours, according to this first embodiment,
The instruction execution cycle can be shortened by (t2-t3) time as compared with the conventional case.

【0026】次に、本発明の第2実施例を説明する。こ
の第2実施例のPLCは、ハード構成の点では図1に示
す第1実施例と同様であるが、システムプログラムが第
1実施例のものと異なっており、MPUが第1実施例の
ものと異なる動作をするように構成されている。
Next, a second embodiment of the present invention will be described. The PLC of the second embodiment is similar to the first embodiment shown in FIG. 1 in terms of hardware configuration, but the system program is different from that of the first embodiment, and the MPU is of the first embodiment. Is configured to operate differently from.

【0027】つまり、この第2実施例は、後述する図3
に示すように、MPUによるユーザプログラム実行時間
t1 が、データ転送回路によるI/Oユニットとのデー
タ交換時間t2 より短い場合の実施例であり、MPUが
ユーザプログラムの実行後、一定時間待機してからI/
F回路の転送用データメモリとI/Oリフレッシュを行
うように構成されている。
That is, this second embodiment will be described later with reference to FIG.
As shown in FIG. 5, this is an embodiment in which the user program execution time t1 by the MPU is shorter than the data exchange time t2 by the data transfer circuit with the I / O unit. After the MPU executes the user program, it waits for a certain period of time. From I /
The I / O refresh is performed with the transfer data memory of the F circuit.

【0028】次に、この第2実施例の動作を説明する。
なお、PLCの構成については図1に示す第1実施例の
PLCの構成の符号を使用して説明する。
Next, the operation of the second embodiment will be described.
The configuration of the PLC will be described using the reference numerals of the PLC configuration of the first embodiment shown in FIG.

【0029】図3に、この第2実施例におけるMPU1
1およびデータ転送回路52の動作のタイムチャートを
示す。
FIG. 3 shows the MPU 1 in the second embodiment.
1 shows a time chart of operations of 1 and the data transfer circuit 52.

【0030】この第2実施例では、ユーザプログラム実
行時間t1 が、データ転送回路52によるI/Oユニッ
ト2とのデータ交換時間t2 より短いので、MPU11
は、ユーザプログラムの実行後一定時間t4 だけ待機し
てからバス切替回路52に切替指令を送って転送用デー
タメモリ51aを内部バス16に接続させ、ワークメモ
リ14に格納されている出力データと、転送用データメ
モリ51aに格納されている入力データとを内部バス1
6を介して交換する。
In the second embodiment, since the user program execution time t1 is shorter than the data exchange time t2 with the I / O unit 2 by the data transfer circuit 52, the MPU 11
Waits for a certain time t4 after the execution of the user program and then sends a switching command to the bus switching circuit 52 to connect the transfer data memory 51a to the internal bus 16 and output data stored in the work memory 14, The input data stored in the transfer data memory 51a is transferred to the internal bus 1
Replace via 6.

【0031】この入出力データの交換処理終了後、MP
U11は、バス切替回路52に対し転送用データメモリ
51aの接続先を内部バス16から外部バス3に切替え
るよう切替指令を送ると共に、データ転送回路52に動
作開始指令を送る。
After this input / output data exchange processing is completed, MP
U11 sends a switching command to the bus switching circuit 52 to switch the connection destination of the transfer data memory 51a from the internal bus 16 to the external bus 3, and also sends an operation start command to the data transfer circuit 52.

【0032】そして、データ転送回路52は、この動作
開始指令を受けると、転送用データメモリ51aに格納
されている出力データを外部バス3およびバス切替回路
51bを介してI/Oユニット2に転送すると共に、I
/Oユニット2からデータ転送用データメモリ51aに
入力データを転送する。そして、MPU11から次の動
作開始指令が来るまで待機する。
Upon receiving this operation start command, the data transfer circuit 52 transfers the output data stored in the transfer data memory 51a to the I / O unit 2 via the external bus 3 and the bus switching circuit 51b. And I
The input data is transferred from the / O unit 2 to the data transfer data memory 51a. Then, it waits for the next operation start command from the MPU 11.

【0033】従って、この第2実施例によれば、第1実
施例の場合と同様に、MPU11によるユーザプログラ
ム実行処理とデータ転送回路によるI/Oユニット2と
のI/Oリフレッシュ処理とが並列処理され、MPU1
1はI/F回路15の転送用データメモリ51aと内部
バス16を介して入出力データの交換を行うだけで良い
ため、外部バス3を介してI/Oユニット3とI/Oリ
フレッシュを行う場合と比べて、I/Oリフレッシュサ
イクルおよび命令実行サイクルが短縮化され、I/Oリ
フレッシュの際の転送用データ量が大きくなった場合で
も命令実行サイクルへの影響を小さくできる。
Therefore, according to the second embodiment, as in the case of the first embodiment, the user program execution processing by the MPU 11 and the I / O refresh processing with the I / O unit 2 by the data transfer circuit are performed in parallel. Processed, MPU1
Since 1 only needs to exchange input / output data via the transfer data memory 51a of the I / F circuit 15 and the internal bus 16, the I / O unit 3 and I / O refresh are performed via the external bus 3. Compared to the case, the I / O refresh cycle and the instruction execution cycle are shortened, and the influence on the instruction execution cycle can be reduced even when the transfer data amount at the time of I / O refresh becomes large.

【0034】ここで、この第2実施例によれば、図3に
示すように従来より(t2 −(t3+t4 ))だけ命令
実行サイクルを短縮化できることがわかる。
Here, according to the second embodiment, as shown in FIG. 3, the instruction execution cycle can be shortened by (t2− (t3 + t4)) as compared with the conventional case.

【0035】次に、本発明の第3実施例を説明する。こ
の第3実施例のPLCは、ハード構成の点では第2実施
例および図1に示す第1実施例と同様であるが、システ
ムプログラムが第1実施例および第2実施例のものと異
なっており、MPUが第1実施例および第2実施例のも
のと異なる動作をするように構成されている。
Next, a third embodiment of the present invention will be described. The PLC of the third embodiment is similar to the second embodiment and the first embodiment shown in FIG. 1 in terms of the hardware configuration, but the system program is different from that of the first and second embodiments. Therefore, the MPU is configured to operate differently from those of the first and second embodiments.

【0036】つまり、この第3実施例は、MPUによる
ユーザプログラム実行時間t1 が、データ転送回路によ
るI/Oユニットとのデータ交換時間t2 より長い場合
の実施例で、MPUがユーザプログラムの実行際、最新
の入力データを使用できるように構成されている。
In other words, the third embodiment is an embodiment in which the user program execution time t1 by the MPU is longer than the data exchange time t2 by the data transfer circuit with the I / O unit, and when the MPU executes the user program. , Configured to use the latest input data.

【0037】次に、この第3実施例の動作を説明する。
なお、PLCの構成については図1に示す第1実施例の
PLCの構成の符号を使用して説明する。
Next, the operation of the third embodiment will be described.
The configuration of the PLC will be described using the reference numerals of the PLC configuration of the first embodiment shown in FIG.

【0038】図4に、この第3実施例におけるMPU1
1およびデータ転送回路52の動作のタイムチャートを
示す。
FIG. 4 shows the MPU 1 in the third embodiment.
1 shows a time chart of operations of 1 and the data transfer circuit 52.

【0039】この第3実施例では、ユーザプログラム実
行時間t1 が、データ転送回路52によるI/Oユニッ
ト2とのデータ交換時間t2 より長いため、MPU11
は、ユーザプログラムの実行後、すぐにバス切替回路5
2に切替指令を送って転送用データメモリ51を内部バ
ス16に接続させ、ワークメモリ14に格納されている
出力データを内部バス16を介して転送用データメモリ
51aに転送すると共に、転送用データメモリ51aに
格納されている入力データをワークメモリ14に転送さ
せる。ここまでの処理は、第1実施例の場合とまったく
同様である。
In the third embodiment, since the user program execution time t1 is longer than the data exchange time t2 with the I / O unit 2 by the data transfer circuit 52, the MPU 11
Immediately after the execution of the user program, the bus switching circuit 5
2, the transfer data memory 51 is connected to the internal bus 16, the output data stored in the work memory 14 is transferred to the transfer data memory 51a via the internal bus 16, and the transfer data is transferred. The input data stored in the memory 51a is transferred to the work memory 14. The processing up to this point is exactly the same as in the case of the first embodiment.

【0040】この転送終了後、MPU11は、バス切替
回路51bに切替指令を送って転送用データメモリ51
aの接続先を内部バス16から外部バス3に切替えさ
せ、その後データ転送回路52に動作開始指令を送っ
て、その後すぐに次サイクルに入って、ユーザプログラ
ムを再び実行するようにする。
After this transfer is completed, the MPU 11 sends a switching command to the bus switching circuit 51b to transfer data memory 51.
The connection destination of a is switched from the internal bus 16 to the external bus 3, and then an operation start command is sent to the data transfer circuit 52, and immediately after that, the next cycle is entered to execute the user program again.

【0041】一方、データ転送回路52では、MPU1
1からI/Oリフレッシュ処理の終了通知を受けると、
バス切替回路51bによって転送用データメモリ51a
の接続先が外部バス3に切替わっているので、まずはO
UTリフレッシュ、すなわち転送用データメモリ51a
に格納されている出力データを外部バス3を介してI/
Oユニット2に転送する。
On the other hand, in the data transfer circuit 52, the MPU1
When the end notification of the I / O refresh process is received from 1,
The data memory 51a for transfer by the bus switching circuit 51b
Since the connection destination of has been switched to the external bus 3, first O
UT refresh, that is, data memory 51a for transfer
Output data stored in the I / O via the external bus 3.
Transfer to O unit 2.

【0042】そして、この後MPU11がユーザプログ
ラムの実行を終了してI/Oリフレッシュ処理を開始す
るまで、INリフレッシュの繰り返し、すなわちI/O
ユニット2からデータ転送用データメモリ51aへの入
力データの転送を繰り返すようにする。
After that, until the MPU 11 finishes executing the user program and starts the I / O refresh processing, IN refresh is repeated, that is, I / O.
The transfer of the input data from the unit 2 to the data transfer data memory 51a is repeated.

【0043】つまり、図4では、MPU11によるユー
ザプログラム実行時間t1 からデータ転送回路52によ
るOUTリフレッシュ時間t21を除いた時間t22の間だ
けINリフレッシュを繰り返すようにする。
That is, in FIG. 4, the IN refresh is repeated only during the time t22, which is the user program execution time t1 by the MPU 11 excluding the OUT refresh time t21 by the data transfer circuit 52.

【0044】そして、MPU11がユーザプログラムの
実行を終了したとき、データ転送回路52は、そのIN
リフレッシュ処理の繰返し処理を終了して、MPU11
から次の動作開始指令が来るまで待機する。
When the MPU 11 finishes executing the user program, the data transfer circuit 52 makes the IN
After the repetition of the refresh process, the MPU 11
Wait until the next operation start command comes from.

【0045】従って、この第3実施例によれば、第1実
施例、第2実施例の場合と同様に、MPU11によるユ
ーザプログラム実行処理とデータ転送回路によるI/O
ユニット2とのI/Oリフレッシュ処理とが並列処理さ
れ、MPU11はCPUユニット1内の転送用データメ
モリ51aと内部バス16を介し入出力データの交換を
行うだけで良いため、外部バス3を介してI/Oユニッ
ト3とI/Oリフレッシュを行う場合と比べてI/Oリ
フレッシュサイクルおよび命令実行サイクルが短縮化さ
れ、I/Oリフレッシュの際の転送用データ量が大きく
なった場合でも命令実行サイクルへの影響を小さくでき
る。
Therefore, according to the third embodiment, the user program execution processing by the MPU 11 and the I / O by the data transfer circuit are performed as in the first and second embodiments.
Since the I / O refresh process with the unit 2 is processed in parallel, and the MPU 11 only needs to exchange input / output data with the transfer data memory 51a in the CPU unit 1 via the internal bus 16, and therefore via the external bus 3. The I / O refresh cycle and the instruction execution cycle are shortened as compared with the case where the I / O unit 3 and the I / O refresh are performed, and the instruction is executed even when the transfer data amount at the time of the I / O refresh becomes large. The impact on the cycle can be reduced.

【0046】ここで、この第3実施例によれば、図2に
示す第1実施例の場合と同様に、MPU11が転送用デ
ータメモリ51aとのI/Oリフレッシュにt3 時間だ
け要するとすると、従来より、(t2 −t3 )時間だけ
命令実行サイクルを短縮化できることになる。
Here, according to the third embodiment, as in the case of the first embodiment shown in FIG. 2, if the MPU 11 requires t3 time for I / O refresh with the transfer data memory 51a, Conventionally, the instruction execution cycle can be shortened by (t2-t3) time.

【0047】また、この第3実施例によれば、データ転
送回路52が、OUTリフレッシュ処理後、MPU11
がI/Oリフレッシュ処理を行うまでINリフレッシュ
を繰り返すため、MPU11がI/Oリフレッシュ処理
を行う際には、転送用データメモリ51aに最新の入力
データが記憶されており、次サイクルのユーザプログラ
ム実行時には最新の入力データを使用できることにな
る。
Further, according to the third embodiment, the data transfer circuit 52 makes the MPU 11 after the OUT refresh processing.
Since the IN refresh is repeated until the I / O refresh process is performed by the MPU 11, when the MPU 11 performs the I / O refresh process, the latest input data is stored in the transfer data memory 51a, and the user program is executed in the next cycle. Sometimes the latest input data will be available.

【0048】なお、上記第1〜第3の各実施例では、図
1に示すように、転送用データ記憶手段としての転送用
データ記憶部51をシングルポートの転送用データメモ
リ51aとバス切替回路51bとで構成したが、本発明
では、転送用データ記憶部51をデュアルポートメモリ
のみで構成して、このデュアルポートメモリをバス切替
回路を介さずに内部バス16および外部バス3の双方に
直接接続するようにし、このデュアルポートメモリにM
PU11およびデータ転送回路52の双方が自由にアク
セスできるようにしても勿論よい。
In each of the first to third embodiments, as shown in FIG. 1, the transfer data storage unit 51 as the transfer data storage means is provided with a single-port transfer data memory 51a and a bus switching circuit. However, in the present invention, the transfer data storage unit 51 is configured by only the dual port memory, and the dual port memory is directly connected to both the internal bus 16 and the external bus 3 without a bus switching circuit. Connect and connect this dual port memory to M
Of course, both the PU 11 and the data transfer circuit 52 may be freely accessible.

【0049】[0049]

【発明の効果】以上説明したように、本発明では、CP
Uユニット内のMPUが、ユーザプログラムの実行後、
CPUユニット内の転送用データ記憶手段と入出力デー
タの交換を行い、その後ユーザプログラムを実行する一
方、データ転送手段が、MPUによる入出力データの交
換後、上記転送用データ記憶手段とI/Oユニットとの
間に入出力データの交換を行うようにしたため、MPU
によるユーザプログラム実行処理と、データ転送手段に
よるI/Oユニットとの入出力データの交換処理とが並
列処理される。
As described above, according to the present invention, CP
After the MPU in the U unit executes the user program,
The input / output data is exchanged with the transfer data storage means in the CPU unit, and then the user program is executed, while the data transfer means exchanges the input / output data with the MPU, and then the transfer data storage means and the I / O are exchanged. I / O data is exchanged with the unit, so MPU
The user program execution processing by the above and the input / output data exchange processing by the data transfer means with the I / O unit are processed in parallel.

【0050】このため、本発明によれば、MPUが直接
CPUユニット外部のI/Oユニットとデータ交換を行
う必要がなくなり、外部バスを介してI/Oユニット3
とI/Oリフレッシュを行う場合と比べて、I/Oリフ
レッシュサイクルおよび命令実行サイクルが短縮化さ
れ、I/Oリフレッシュの際の転送用データ量が大きく
なった場合でも命令実行サイクルへの影響を小さくでき
る。
Therefore, according to the present invention, the MPU does not need to directly exchange data with the I / O unit outside the CPU unit, and the I / O unit 3 is connected via the external bus.
And I / O refresh, the I / O refresh cycle and the instruction execution cycle are shortened, and even if the amount of transfer data at the time of I / O refresh becomes large, the influence on the instruction execution cycle is affected. Can be made smaller.

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

【図1】本発明に係る第1実施例のPLCの構成を示す
ブロック図。
FIG. 1 is a block diagram showing a configuration of a PLC according to a first embodiment of the present invention.

【図2】第1実施例におけるMPUとデータ転送回路の
動作を示すタイムチャート。
FIG. 2 is a time chart showing the operation of the MPU and the data transfer circuit in the first embodiment.

【図3】第2実施例におけるMPUとデータ転送回路の
動作を示すタイムチャート。
FIG. 3 is a time chart showing the operation of the MPU and the data transfer circuit in the second embodiment.

【図4】第3実施例におけるMPUとデータ転送回路の
動作を示すタイムチャート。
FIG. 4 is a time chart showing operations of an MPU and a data transfer circuit according to the third embodiment.

【図5】従来のPLCにおける命令実行サイクルを示す
タイムチャート。
FIG. 5 is a time chart showing an instruction execution cycle in a conventional PLC.

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

1 CPUユニット 2 I/Oユニット 3 外部バス 11 マイクロプロセッサ(MPU) 12 システムプログラムメモリ 13 ユーザプログラムメモリ 14 ワークメモリ(実行用データ記憶手段) 15 インタフェース(I/F)回路 51 転送用データ記憶部(転送用データ記憶手段) 52 データ転送回路(データ転送手段) 1 CPU Unit 2 I / O Unit 3 External Bus 11 Microprocessor (MPU) 12 System Program Memory 13 User Program Memory 14 Work Memory (Execution Data Storage Means) 15 Interface (I / F) Circuit 51 Transfer Data Storage Unit ( Data storage means for transfer) 52 Data transfer circuit (data transfer means)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 CPUユニットとI/Oユニットとを外
部バスで接続したプログラマブルコントローラであっ
て、 CPUユニットは、 マイクロプロセッサと、 マイクロプロセッサと内部バスを介して接続され、ユー
ザプログラム実行の際の入出力データを記憶する実行用
データ記憶手段と、 マイクロプロセッサおよび実行用データ記憶手段と内部
バスを介して接続されると共に、I/Oユニットと外部
バスを介して接続され、CPUユニットとI/Oユニッ
ト間で転送される入出力データを記憶する転送用データ
記憶手段と、 データ転送手段とを具備し、 上記マイクロプロセッサが、ユーザプログラムの実行
後、実行用データ記憶手段に記憶された出力データを転
送用データ記憶手段へ転送すると共に、転送用データ記
憶手段に記憶された入力データを実行用データ記憶手段
へ転送し、その後ユーザプログラムを実行する一方、 上記データ転送手段が、上記マイクロプロセッサによる
入出力データの転送後、転送用データ記憶手段に記憶さ
れた出力データをI/Oユニットへ転送すると共に、I
/Oユニットが取り込んだ入力データを転送用データ記
憶手段へ転送する、 ことを特徴とするプログラマブルコントローラ。
1. A programmable controller in which a CPU unit and an I / O unit are connected by an external bus, the CPU unit being connected to a microprocessor and the microprocessor via an internal bus for executing a user program. The execution data storage means for storing input / output data is connected to the microprocessor and the execution data storage means via the internal bus, and is also connected to the I / O unit via the external bus to connect the CPU unit and the I / O unit. Output data stored in the execution data storage means after execution of the user program by the microprocessor, and data transfer means for storing input / output data transferred between the O units. Is transferred to the transfer data storage means and is stored in the transfer data storage means. While transferring the input data to the execution data storage means and then executing the user program, the data transfer means transfers the output data stored in the transfer data storage means after the input / output data is transferred by the microprocessor. I / O unit and I
/ O unit transfers input data taken in to a transfer data storage means.
【請求項2】 マイクロプロセッサが、ユーザプログラ
ムの実行後、すぐに実行用データ記憶手段に記憶された
出力データを転送用データ記憶手段へ転送すると共に、
転送用データ記憶手段に記憶された入力データを実行用
データ記憶手段へ転送し、その後ユーザプログラムを実
行する、 ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
2. The microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means immediately after executing the user program, and
2. The programmable controller according to claim 1, wherein the input data stored in the transfer data storage means is transferred to the execution data storage means, and then the user program is executed.
【請求項3】 マイクロプロセッサが、ユーザプログラ
ムの実行後、一定時間経過後に実行用データ記憶手段に
記憶された出力データを転送用データ記憶手段へ転送す
ると共に、転送用データ記憶手段に記憶された入力デー
タを実行用データ記憶手段へ転送し、その後ユーザプロ
グラムを実行する、 ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
3. The microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means after a certain time has elapsed after the execution of the user program, and the microprocessor stores the output data in the transfer data storage means. The programmable controller according to claim 1, wherein the input data is transferred to the execution data storage unit, and then the user program is executed.
【請求項4】 マイクロプロセッサが、ユーザプログラ
ムの実行後、すぐに実行用データ記憶手段に記憶された
出力データを転送用データ記憶手段へ転送すると共に、
転送用データ記憶手段に記憶された入力データを実行用
データ記憶手段へ転送し、その後ユーザプログラムを実
行する一方、 データ転送手段が、上記マイクロプロセッサによる入出
力データの転送後、転送用データ記憶手段に記憶された
出力データをI/Oユニットへ転送すると共に、I/O
ユニットが取り込んだ入力データの転送用データ記憶手
段への転送を上記マイクロプロセッサがユーザプログラ
ムの実行を終了するまで繰返す、 ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
4. The microprocessor transfers the output data stored in the execution data storage means to the transfer data storage means immediately after executing the user program, and
The input data stored in the transfer data storage means is transferred to the execution data storage means and then the user program is executed, while the data transfer means transfers the input / output data by the microprocessor and then the transfer data storage means. The output data stored in the I / O unit is transferred to the I / O unit and
2. The programmable controller according to claim 1, wherein the transfer of the input data captured by the unit to the transfer data storage means is repeated until the microprocessor finishes executing the user program.
JP22594493A 1993-09-10 1993-09-10 Programmable controller Expired - Lifetime JP3348177B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22594493A JP3348177B2 (en) 1993-09-10 1993-09-10 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22594493A JP3348177B2 (en) 1993-09-10 1993-09-10 Programmable controller

Publications (2)

Publication Number Publication Date
JPH0777931A true JPH0777931A (en) 1995-03-20
JP3348177B2 JP3348177B2 (en) 2002-11-20

Family

ID=16837346

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22594493A Expired - Lifetime JP3348177B2 (en) 1993-09-10 1993-09-10 Programmable controller

Country Status (1)

Country Link
JP (1) JP3348177B2 (en)

Also Published As

Publication number Publication date
JP3348177B2 (en) 2002-11-20

Similar Documents

Publication Publication Date Title
JPS6364144A (en) Inter-memory data transfer system
JPH02156334A (en) Information processor
JPH0777931A (en) Programable controller
JP3432728B2 (en) Programmable controller
JP2002297209A (en) Sequence program storing method in sequence controller
JP4037941B2 (en) Control device
JPS60241104A (en) Arithmetic method of digital controller
JPH03288906A (en) Instruction executing system for pc
JP2601359B2 (en) Concurrent processing microprocessor
JP2597637B2 (en) Hardware state switching control method
JPH05233525A (en) Input/otuput processor
JPH0731527B2 (en) Programmable controller
JPH05241986A (en) Input/output instruction retrying system
JPS62190544A (en) Higher link unit for programmable controller
JPH02263256A (en) Microcomputer and controller
JPH02113363A (en) Time slice controlling system for multiprocessor system
JPS616704A (en) Programmable controller
JPH01133107A (en) Sequence controller
JPS62296236A (en) Interruption processor for microprocessor
JPH08115213A (en) Digital signal processing and direct memory access control method therefor
JPH083728B2 (en) Data link method in multi-PC system
JPH06222935A (en) Information processor and task switching method by the same
JPH05233026A (en) Microcomputer circuit
JPS62297954A (en) Memory control system
JPH03211628A (en) Interruption control method

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: 20020722

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080913

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080913

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090913

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090913

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100913

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100913

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110913

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110913

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120913

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130913

Year of fee payment: 11