JPH0751611Y2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0751611Y2
JPH0751611Y2 JP1988060760U JP6076088U JPH0751611Y2 JP H0751611 Y2 JPH0751611 Y2 JP H0751611Y2 JP 1988060760 U JP1988060760 U JP 1988060760U JP 6076088 U JP6076088 U JP 6076088U JP H0751611 Y2 JPH0751611 Y2 JP H0751611Y2
Authority
JP
Japan
Prior art keywords
scan time
program execution
target value
cycle
execution cycle
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 - Lifetime
Application number
JP1988060760U
Other languages
Japanese (ja)
Other versions
JPH01164505U (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.)
Sharp Corp
Original Assignee
Sharp 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 Sharp Corp filed Critical Sharp Corp
Priority to JP1988060760U priority Critical patent/JPH0751611Y2/en
Publication of JPH01164505U publication Critical patent/JPH01164505U/ja
Application granted granted Critical
Publication of JPH0751611Y2 publication Critical patent/JPH0751611Y2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【考案の詳細な説明】 (産業上の利用分野) 本考案はプログラマブルコントローラに関する。DETAILED DESCRIPTION OF THE INVENTION (Industrial field of application) The present invention relates to a programmable controller.

(従来の技術) プログラマブルコントローラは,多数の命令を含むシー
ケンスプログラムの解読・実行を繰り返し行うことによ
って,シーケンス制御を行うものである。シーケンスプ
ログラムの1回の実行はサイクルと呼ばれ,1サイクルの
処理に要する時間はスキャンタイムと呼ばれている。
(Prior Art) A programmable controller performs sequence control by repeatedly decoding and executing a sequence program including many instructions. One execution of the sequence program is called a cycle, and the time required for processing one cycle is called a scan time.

1サイクルの処理が終了した後に次のサイクルを起動す
る手段としては,従来以下のようなものが考案されてい
る。
Conventionally, the following means has been devised as a means for activating the next cycle after one cycle of processing is completed.

(1)商用電源,すなわちプログラマブルコントローラ
の電源の電圧の零交差点を検出し,零交差点が検出され
た時にサイクルの起動を行う。これはゼロクロス法と呼
ばれている。電源電圧の零交差点でサイクルの起動を行
う理由は,プロセスのON/OFFを電源電圧0Vで行い,ノイ
ズの発生を抑えるためである。
(1) The zero crossing point of the voltage of the commercial power supply, that is, the power supply of the programmable controller is detected, and the cycle is started when the zero crossing point is detected. This is called the zero-cross method. The reason for starting the cycle at the zero-crossing point of the power supply voltage is to turn ON / OFF the process at the power supply voltage of 0 V to suppress noise generation.

(2)シーケンスプログラムに設けられたEND命令によ
って現在のサイクルの処理を終了し,即座に次のサイク
ルの処理を開始する。
(2) The END instruction provided in the sequence program ends the processing of the current cycle and immediately starts the processing of the next cycle.

(考案が解決しようとする課題) スキャンタイムは,プログラマブルコントローラとリミ
ットスイッチ,ソレノイドバルブ等のプロセスとの間で
の情報交換のタイミングを良好に維持するために,でき
るだけ一定に保たれることが望ましい。しかし,スキャ
ンタイムには次に述べるような変動要因が存在する。シ
ーケンスプログラムは,実行時のリレーの接点の状態に
よって実行部分と非実行部分に分けられるが,リレーの
接点の状態の変化によって,それらの割合はサイクルご
とに変動する。従ってスキャンタイムにも変動が生じ
る。すなわち,実行部分の割合が大きいほどスキャンタ
イムは長くなる。また,リモートI/O等の通信による入
出力処理が加わる場合には通信の完了を待つ必要がある
が,通信に要する時間はそのサイクルにおける通信量の
多少によって増減するので,スキャンタイムの変動要因
となる。スキャンタイムが変動すると,プログラマブル
コントローラとプロセスとの間での情報交換のタイミン
グにばらつきが生じ、正常な制御ができなくなる原因と
なる。
(Problems to be solved by the invention) The scan time should be kept as constant as possible in order to maintain good timing of information exchange between the programmable controller and processes such as limit switch and solenoid valve. . However, the scan time has the following fluctuation factors. The sequence program is divided into an execution part and a non-execution part according to the state of the relay contact at the time of execution, but the ratio thereof changes every cycle depending on the change of the state of the relay contact. Therefore, the scan time also varies. That is, the larger the ratio of the executed portion, the longer the scan time. In addition, when input / output processing by communication such as remote I / O is added, it is necessary to wait for the completion of communication, but the time required for communication increases or decreases depending on the amount of communication in that cycle. Becomes When the scan time fluctuates, the timing of information exchange between the programmable controller and the process fluctuates, which causes normal control to become impossible.

前述した従来のサイクル起動手段を用いたプログラマブ
ルコントローラには,スキャンタイムが変動するという
問題が生じていた。
The programmable controller using the conventional cycle starting means described above has a problem that the scan time varies.

上記(1)の手段を用いた場合には,商用電源の周波数
が50Hzであるとすれば,半波長毎に,すなわち時間でい
えば10msごとに起動パルスが生成される。従って,現在
のサイクルが例えば21msで終了しても,次のサイクルは
30msが経過するまで起動されない。このため,スキャン
タイムが全体として長くなり,スキャンタイムに大きな
変動が生じる。
When the means of the above (1) is used, assuming that the frequency of the commercial power source is 50 Hz, the start pulse is generated every half wavelength, that is, every 10 ms in terms of time. Therefore, even if the current cycle ends in 21ms, for example, the next cycle
It will not start until 30ms have passed. Therefore, the scan time becomes long as a whole, and the scan time greatly varies.

上記(2)の手段は(1)の手段を用いた場合よりもス
キャンタイムを短縮することを意図して考案されたもの
である。しかし,この手段によっても,前述したスキャ
ンタイムの変動という問題は解消されない。そこで,プ
ロセスとの情報交換のタイミングのばらつきを避けるた
めに,シーケンスプログラムにタイミングを調整するた
めのプログラムを挿入することが行われている。このた
め,シーケンスプログラムが長くかつ複雑になり,デバ
ッグや保守に多大な労力が必要になるという問題が生じ
ている。
The means (2) is designed with the intention of shortening the scan time as compared with the case where the means (1) is used. However, even by this means, the problem of the fluctuation of the scan time described above cannot be solved. Therefore, in order to avoid variations in the timing of information exchange with the process, a program for adjusting the timing is inserted in the sequence program. Therefore, the sequence program becomes long and complicated, and a great deal of effort is required for debugging and maintenance.

本考案はこのような現状に鑑みてなされたものであり,
その目的とするところは,シーケンスプログラムに手を
加えることなくスキャンタイムを一定にすることがで
き,しかも任意のスキャンタイムを設定することができ
るプログラマブルコントローラを提供することにある。
The present invention has been made in view of such a current situation,
It is an object of the present invention to provide a programmable controller which can make the scan time constant without modifying the sequence program and can set an arbitrary scan time.

(課題を解決するための手段) 本考案のプログラマブルコントローラは,スキャンタイ
ム目標値を記憶する記憶手段,1個のプログラム実行サイ
クルが終了すると直ちに次のプログラム実行サイクルを
起動することによりシーケンスプログラムを繰り返し実
行し,該シーケンスプログラムにスキャンタイム設定命
令が含まれている場合に該記憶手段にスキャンタイム目
標値を設定するプログラム実行手段を有している。
(Means for Solving the Problem) The programmable controller of the present invention repeats the sequence program by memorizing the scan time target value and immediately activating the next program execution cycle after the end of one program execution cycle. It has a program execution means for executing and setting a scan time target value in the storage means when the sequence program includes a scan time setting instruction.

該プログラマブルコントローラは,さらに,該プログラ
ム実行手段によるプログラム実行におけるスキャンタイ
ムが該スキャンタイム目標値に満たない場合には該スキ
ャンタイム目標値が経過するまで次のプログラム実行サ
イクルの起動を遅延させる第1の遅延手段,外部からの
信号をプログラム実行サイクルの起動に利用するか否か
を決定する決定手段,および該決定手段によって外部か
らの信号を利用すると決定された場合に外部からの信号
が入力されるまで次のプログラム実行サイクルの起動を
遅延させる第2の遅延手段を備えている。
The programmable controller further delays the start of the next program execution cycle until the scan time target value elapses when the scan time in executing the program by the program execution means is less than the scan time target value. Delaying means, determining means for determining whether or not an external signal is used to start a program execution cycle, and an external signal is input when the determining means determines to use the external signal. The second delay means is provided to delay the start of the next program execution cycle until the start.

そして,該プログラマブルコントローラは,該外部から
の信号を利用すると決定された場合には、該第1及び第
2の遅延手段によるプログラム実行サイクルの起動の遅
延が完了したときのみ,次のプログラム実行サイクルの
起動を行い,該外部からの信号を利用しないと決定され
た場合には,該第1の遅延手段によるプログラム実行サ
イクルの起動の遅延が完了したときのみ,次のプログラ
ム実行サイクルの起動を行うよう構成されている。その
ことにより上記目的が達成される。
When the programmable controller determines to use the signal from the outside, the next program execution cycle is performed only when the start delay of the program execution cycle by the first and second delay means is completed. When it is determined that the signal from the outside is not used, the next program execution cycle is started only when the delay of the start of the program execution cycle by the first delay means is completed. Is configured. Thereby, the above object is achieved.

(作用) この考案においては,スキャンタイム目標値を記憶する
記憶手段を設け,プログラム実行におけるスキャンタイ
ムが該記憶手段のスキャンタイム目標値に満たない場合
には該スキャンタイム目標値が経過するまで次のプログ
ラム実行サイクルの起動を遅延させるようにしたので,
シーケンスプログラムに手を加えることなく,スキャン
タイムのばらつきを低減することができる。
(Operation) In the present invention, the storage means for storing the scan time target value is provided, and if the scan time in the program execution is less than the scan time target value of the storage means, the next scan time target value is passed until the scan time target value elapses. Since the start of the program execution cycle of is delayed,
It is possible to reduce variations in scan time without modifying the sequence program.

また,上記記憶手段には,スキャンタイム目標値として
任意の値を格納できるため,プログラマブルコントロー
ラに接続される外部機器等の動作速度を考慮してスキャ
ンタイムの最適化を図ることができる。
Further, since an arbitrary value can be stored as the scan time target value in the storage means, the scan time can be optimized in consideration of the operating speed of the external device connected to the programmable controller.

さらに,外部からの信号をプログラム実行サイクルの起
動に利用するか否かを決定する決定手段を備えているた
め,プログラム実行サイクルの起動を,外部からの信号
とスキャンタイム目標値との両方に基づいて行う動作モ
ードと,その起動をスキャンタイム目標値のみに基づい
て行う動作モードとの両方が実現可能である。
Furthermore, since the determination means for determining whether to use the signal from the outside for starting the program execution cycle is provided, the start of the program execution cycle is based on both the signal from the outside and the scan time target value. It is possible to realize both an operation mode in which the operation is performed based on the scan time target value and an operation mode in which the activation is performed based on only the scan time target value.

ここで,外部からの信号を利用すると決定された場合に
は,スキャンタイムの目標値の経過後,外部からの信号
が入力されるまで,次のプログラム実行サイクルの起動
を遅延させるようにしているため,動作速度に変動があ
る外部機器をプログラマブルコントローラに接続した場
合においても,外部機器の動作遅延に合わせてプログラ
ム実行サイクルを起動でき,一方,外部からの信号を利
用しないと決定された場合には,プログラム実行サイク
ルの起動の遅延がスキャンタイム目標値の経過時までと
なり,スキャンタイムのばらつきを抑えつつその短縮が
有効になされる。
Here, when it is decided to use the signal from the outside, the start of the next program execution cycle is delayed until the signal from the outside is input after the lapse of the target value of the scan time. Therefore, even when an external device whose operating speed fluctuates is connected to the programmable controller, the program execution cycle can be started according to the operation delay of the external device, and on the other hand, when it is decided not to use a signal from the outside. The delay in the start of the program execution cycle is until the scan time target value elapses, and the reduction can be effectively performed while suppressing the variation in the scan time.

(実施例) 以下に本考案を実施例について説明する。(Embodiment) An embodiment of the present invention will be described below.

第1図に本考案の一実施例のブロック図を示す。CPU1は
ROM2に格納されているシステムプログラムに従って動作
し,バス3を介して以下に述べる各種メモリ,I/Oユニッ
ト等との間で情報をやりとりしながらシーケンスプログ
ラムの実行を進めてゆく。プログラムメモリ4にはシー
ケンスプログラムが格納される。システムメモリ5はシ
ーケンスプログラムの実行に必要なデータ等を記憶して
いる。RAM6は作業記憶として用いられる。入力用I/Oユ
ニット7からのデータ入力および出力用I/Oユニット8
へのデータ出力はI/Oユニットドライバ・レシーバ9を
介して行われる。入力用I/Oユニット7にはリミットス
イッチ,押ボタン等のプロセス10が接続される。出力用
I/Oユニット8にはランプ,ソレノイドバルブ等のプロ
セス11が接続される。プログラム装置12はシーケンスプ
ログラムを入力しプログラムメモリ4に格納するために
設けられており,符号13で示すRS−485でバス3に接続
されている。電源ユニット14は5Vの直流電力を各部に供
給する。外部トリガ入力回路15は外部トリガ信号を検出
すると,トリガ信号16をバス3へ送出する。表示ユニッ
ト17は後述するスキャンタイム目標値の表示または実際
のスキャンタイムがスキャンタイム目標値を超過した時
間の表示を行うためのものである。表示ユニット17の表
示内容は表示選択スイッチ18を用いて切り換えることが
できる。
FIG. 1 shows a block diagram of an embodiment of the present invention. CPU1
It operates according to the system program stored in the ROM 2 and executes the sequence program while exchanging information with the various memories, I / O units, etc. described below via the bus 3. A sequence program is stored in the program memory 4. The system memory 5 stores data necessary for executing the sequence program. RAM6 is used as working memory. Data input / output I / O unit 8 from input I / O unit 7
Data output to the I / O unit driver / receiver 9 is performed. A process 10 such as a limit switch or push button is connected to the input I / O unit 7. For output
A process 11 such as a lamp or a solenoid valve is connected to the I / O unit 8. The program device 12 is provided for inputting a sequence program and storing it in the program memory 4, and is connected to the bus 3 by RS-485 indicated by reference numeral 13. The power supply unit 14 supplies 5V DC power to each unit. When the external trigger input circuit 15 detects the external trigger signal, it sends the trigger signal 16 to the bus 3. The display unit 17 is for displaying a scan time target value described later or a time when the actual scan time exceeds the scan time target value. The display content of the display unit 17 can be switched using the display selection switch 18.

本実施例では,一定のスキャンタイムを実現するため
に,スキャンタイム目標値が設定される。スキャンタイ
ム目標値はプログラム装置12から入力され,システムメ
モリ5内の所定の記憶セルに格納される。スキャンタイ
ム目標値は,シーケンスプログラム中に設けることがで
きるスキャンタイム設定命令で設定または変更すること
もできる。スキャンタイム設定命令は,第2図に示すよ
うに,命令の種類を示す部分21と設定するスキャンタイ
ム目標値を示す部分22とからなる。部分21の「**」は
番号等であり,命令の種類を示している。スキャンタイ
ム目標値はBCDコードで表され,その単位はミリ秒であ
る。シーケンスプログラムにスキャンタイム設定命令が
含まれていると,システムメモリ5に格納されているス
キャンタイム目標値が書き換えられ,次のサイクルでは
新たなスキャンタイム目標値が用いられる。
In this embodiment, a scan time target value is set in order to achieve a constant scan time. The scan time target value is input from the programming device 12 and stored in a predetermined memory cell in the system memory 5. The scan time target value can be set or changed by a scan time setting command that can be provided in the sequence program. As shown in FIG. 2, the scan time setting command is composed of a part 21 indicating the type of command and a part 22 indicating the scan time target value to be set. “**” in the part 21 is a number or the like and indicates the type of instruction. The scan time target value is expressed in BCD code, and its unit is millisecond. When the sequence program includes a scan time setting instruction, the scan time target value stored in the system memory 5 is rewritten, and a new scan time target value is used in the next cycle.

スキャンタイム目標値としては,試験運転を行うなどし
て得られたスキャンタイムの実測値の内で最も大きい値
を用いるのが好適である。また,スキャンタイム目標値
はスキャンタイム設定命令で変更することができるの
で,NC装置,ロボット等の外部機器の状態に合わせて一
旦設定したスキャンタイム目標値を柔軟に調節すること
ができる。
As the scan time target value, it is preferable to use the largest value among the measured values of the scan time obtained by performing the test operation. Further, since the scan time target value can be changed by the scan time setting command, the scan time target value once set can be flexibly adjusted according to the state of the external device such as the NC device or the robot.

シリガ信号16は,後に詳述するように,サイクルの起動
に用いられる。サイクルの起動にトリガ信号16を用いる
か否かは選択可能である。トリガ信号16を用いるか否か
の情報はプログラム装置から入力され,システムメモリ
5の所定の記憶セルに格納される。
The Shiriga signal 16 is used to activate a cycle, as will be described in detail later. Whether or not the trigger signal 16 is used to activate the cycle can be selected. Information on whether or not to use the trigger signal 16 is input from the programming device and stored in a predetermined storage cell of the system memory 5.

本実施例の動作を,第3図のフローチャートを用いて説
明する。
The operation of this embodiment will be described with reference to the flowchart of FIG.

(1)初期設定処理(ステップ31〜32) 電源がオンされると,自己診断が行われ(ステップ3
1),次に各部のイニシャライズが行われる(ステップ3
2)。
(1) Initial setting process (steps 31 to 32) When the power is turned on, self-diagnosis is performed (step 3
1) Next, each part is initialized (step 3)
2).

(2)サイクルの起動(ステップ33〜34) システムメモリ5を調べてサイクルの起動にトリガ信号
16を使用するか否かを判断する(ステップ33)。トリガ
信号16を使用しない場合には直ちにサイクルが起動され
る。トリガ信号16を使用する場合にはトリガ信号16が入
力されていないか否かを調べ,入力されていればサイク
ルを起動する(ステップ34)。トリガ信号16が入力され
ていない場合には,入力されるまでループを回って待
つ。
(2) Cycle activation (steps 33-34) Examine system memory 5 and trigger signal for cycle activation
It is determined whether to use 16 (step 33). If the trigger signal 16 is not used, the cycle is activated immediately. When the trigger signal 16 is used, it is checked whether or not the trigger signal 16 is input, and if it is input, the cycle is started (step 34). If the trigger signal 16 is not input, the loop is waited until it is input.

(3)タイマのセット(ステップ35) システムメモリに格納されているスキャンタイム目標値
をタイマST.TMRにセットする。ST.TMRの値はセットされ
た目標値を初期値として,シーケンスプログラムの実行
中カウントダウンされる。
(3) Set timer (step 35) Set the scan time target value stored in the system memory to the timer ST.TMR. The ST.TMR value is counted down during execution of the sequence program, with the set target value as the initial value.

(4)1サイクルのシーケンスプログラムの実行(ステ
ップ36〜38) シーケンスプログラムが実行され,入出力処理(ステッ
プ36),演算(ステップ37),および通信,周辺ツール
の処理(ステップ38)が行われる。
(4) Execution of 1-cycle sequence program (steps 36 to 38) The sequence program is executed and input / output processing (step 36), calculation (step 37), communication, and peripheral tool processing (step 38) are performed. .

(5)スキャンタイムの処理(ステップ39〜42) 1サイクルのシーケンスプログラムの実行が終了する
と,タイマST.TMRが既にタイムアップしているか否かを
調べる(ステップ39)。タイマST.TMRがタイムアップし
ているならば実際のスキャンタイムがスキャンタイム目
標値を超過しているので,タイムオーバーフラグをセッ
トする(ステップ40)。タイマST.TMRがタイムアップし
ていなければ,タイムアップするまで待ち(ステップ4
1),タイムオーバーフラグをリセットする(ステップ4
2)。
(5) Scan time processing (steps 39 to 42) When execution of the sequence program for one cycle is completed, it is checked whether or not the timer ST.TMR has already expired (step 39). If the timer ST.TMR has timed up, the actual scan time has exceeded the scan time target value, so the time over flag is set (step 40). If the timer ST.TMR has not expired, wait until the timer expires (step 4
1), reset the time-over flag (step 4)
2).

以上のスキャンタイムの処理によって,1サイクルが目標
とするところよりも早く終了した場合においてもスキャ
ンタイムを一定に保つことができる。
By the above processing of the scan time, the scan time can be kept constant even when one cycle ends earlier than the target.

なお,タイムオーバーフラグは直前のサイクルにおいて
スキャンタイムが目標値を超過したか否かを示すもので
あるが,このフラグは他の処理のためには用いられてい
ない。
The time-over flag indicates whether or not the scan time has exceeded the target value in the immediately preceding cycle, but this flag is not used for other processing.

(6)スキャンタイム目標値の変更(ステップ43〜44) 直前に終了したサイクルにおいてシーケンスプログラム
にスキャンタイム設定命令があったか否かを判断し(ス
テップ43),スキャンタイム設定命令があった場合には
システムメモリ5に格納されているスキャンタイム目標
値を変更する(ステップ44)。
(6) Change of scan time target value (steps 43 to 44) It is judged whether or not there is a scan time setting instruction in the sequence program in the cycle just finished (step 43). The scan time target value stored in the system memory 5 is changed (step 44).

以後は,上述した(2)〜(6)の処理が繰り返し行わ
れ,この際,外部からのトリガ信号16を利用すると決定
されている場合には,スキャンタイム目標値が経過した
後であって外部からのトリガ信号16が入力されたときの
み,次のプログラム実行サイクルが起動され,該外部か
らの信号16を利用しないと決定されている場合には,ス
キャンタイム目標値が経過したときのみ,次のプログラ
ム実行サイクルが起動されることとなる。
After that, the processes of (2) to (6) described above are repeatedly performed, and at this time, when it is determined to use the trigger signal 16 from the outside, it is after the scan time target value has elapsed. Only when the trigger signal 16 from the outside is input, the next program execution cycle is started, and when it is determined not to use the signal 16 from the outside, only when the scan time target value has passed, The next program execution cycle will be started.

このように本実施例では,スキャンタイム目標値を記憶
するシステムメモリ5を設け,プログラム実行における
スキャンタイムが該メモリに格納されたスキャンタイム
目標値に満たない場合には該スキャンタイム目標値が経
過するまで次のプログラム実行サイクルの起動を遅延さ
せるようにしたので,シーケンスプログラムに手を加え
ることなく,スキャンタイムのばらつきを低減すること
ができる。
As described above, in the present embodiment, the system memory 5 for storing the scan time target value is provided, and when the scan time in the program execution is less than the scan time target value stored in the memory, the scan time target value elapses. Since the start of the next program execution cycle is delayed until that time, it is possible to reduce variations in scan time without modifying the sequence program.

また,上記システムメモリ5には,スキャンタイム目標
値として任意の値をプログラム装置12により格納できる
ため,プログラマブルコントローラに接続される外部機
器等の動作速度を考慮してスキャンタイムの最適化を図
ることができる。
In addition, since an arbitrary value as the scan time target value can be stored in the system memory 5 by the program device 12, the scan time should be optimized in consideration of the operating speed of the external device connected to the programmable controller. You can

さらに,外部からのトリガ信号16をプログラム実行サイ
クルの起動に利用するか否かをCPU1により決定するよう
にしているため,プログラム実行サイクルの起動を,外
部からのトリガ信号16とスキャンタイム目標値との両方
に基づいて行う動作モードと,その起動をスキャンタイ
ム目標値のみに基づいて行う動作モードとの両方が実現
可能である。
Further, since the CPU 1 determines whether or not to use the external trigger signal 16 to start the program execution cycle, the start of the program execution cycle is determined by the external trigger signal 16 and the scan time target value. It is possible to implement both an operation mode based on both of the above and an operation mode in which the activation is performed based on only the scan time target value.

ここで,外部からのトリガ信号16を利用すると決定され
ている場合には,スキャンタイムの目標値の経過後,外
部からのトリガ信号16が入力されるまで,次のプログラ
ム実行サイクルの起動を遅延させるようにしているた
め,動作速度に変動がある外部機器をプログラマブルコ
ントローラに接続した場合においても,外部機器の動作
遅延に合わせてプログラム実行サイクルを起動でき,一
方,外部からのトリガ信号を利用しないと決定されてい
る場合には,プログラム実行サイクルの起動の遅延がス
キャンタイム目標値の経過時までとなり,スキャンタイ
ムのばらつきを抑えつつその短縮が有効になされる。
If it is decided to use the external trigger signal 16, the start of the next program execution cycle is delayed after the scan time target value has elapsed and until the external trigger signal 16 is input. Therefore, even when an external device whose operating speed fluctuates is connected to the programmable controller, the program execution cycle can be started according to the operation delay of the external device, while the external trigger signal is not used. If it is determined that the delay of the start of the program execution cycle is until the lapse of the scan time target value, the reduction can be effectively performed while suppressing the variation of the scan time.

(考案の効果) 本考案によれば,一定のスキャンタイムを容易に実現す
ることができ,しかも任意のスキャンタイムを設定する
ことができるプログラマブルコントローラが提供され
る。従って接続される外部機器等の動作速度を考慮して
スキャンタイムを適切に定めることができ,また,割込
処理等に充分な処理時間をとることができる。本考案の
プログラマブルコントローラにおいては,タイミングを
調整するプログラムをシーケンスプログラムに挿入する
必要がないので,シーケンスプログラムを格納するため
のメモリが有効に利用され,さらに,シーケンスプログ
ラムのデバッグや保守に要する時間が短縮される。本考
案のプログラマブルコントローラは,外部からの信号に
基づいてサイクルを起動する手段を備えているので,動
作速度に変動がある外部機器を接続して使用する場合に
おいても外部機器の遅延に合わせてサイクルを起動する
ことが可能となっている。また,本考案のプログラマブ
ルコントローラは.任意のスキャンタイムが設定可能で
あるから,遅い処理速度で動作していた既存のプログラ
マブルコントローラと容易に置き換えることができる。
(Effect of the Invention) According to the present invention, there is provided a programmable controller capable of easily realizing a constant scan time and setting an arbitrary scan time. Therefore, the scan time can be appropriately determined in consideration of the operating speed of the external device connected, and sufficient processing time can be taken for interrupt processing and the like. In the programmable controller of the present invention, since it is not necessary to insert a timing adjusting program into the sequence program, the memory for storing the sequence program is effectively used, and the time required for debugging and maintaining the sequence program is increased. Shortened. Since the programmable controller of the present invention has means for starting a cycle based on a signal from the outside, the cycle is adjusted according to the delay of the external device even when the external device whose operating speed fluctuates is connected and used. It is possible to start. In addition, the programmable controller of the present invention is. Since an arbitrary scan time can be set, it can easily replace the existing programmable controller that was operating at a slow processing speed.

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

第1図は本考案の一実施例のブロック図,第2図はその
実施例におけるスキャンタイム設定命令の形式を示す
図,第3図はその実施例の動作を示すフローチャートで
ある。 1……CPU,2……ROM,3……バス,4……プログラムメモ
リ,5……システムメモリ,6……RAM,7……入力用I/Oユニ
ット,8……出力用I/Oユニット,9……I/Oユニットバスド
ライバ・レシーバ,10,11……プロセス,12……プログラ
ム装置,13……RS−485,14……電源ユニット,15……外部
トリガ入力回路,16……トリガ信号,17……表示ユニッ
ト,18……表示選択スイッチ。
FIG. 1 is a block diagram of an embodiment of the present invention, FIG. 2 is a diagram showing a format of a scan time setting command in the embodiment, and FIG. 3 is a flow chart showing an operation of the embodiment. 1 …… CPU, 2 …… ROM, 3 …… Bus, 4 …… Program memory, 5 …… System memory, 6 …… RAM, 7 …… Input I / O unit, 8 …… Output I / O Unit, 9 …… I / O unit Bus driver / receiver, 10,11 …… Process, 12 …… Program device, 13 …… RS-485,14 …… Power supply unit, 15 …… External trigger input circuit, 16… … Trigger signal, 17 …… Display unit, 18 …… Display selection switch.

Claims (1)

【実用新案登録請求の範囲】[Scope of utility model registration request] 【請求項1】スキャンタイム目標値を記憶する記憶手
段, 1個のプログラム実行サイクルが終了すると直ちに次の
プログラム実行サイクルを起動することによりシーケン
スプログラムを繰り返し実行し,該シーケンスプログラ
ムにスキャンタイム設定命令が含まれている場合に該記
憶手段にスキャンタイム目標値を設定するプログラム実
行手段, 該プログラム実行手段によるプログラム実行におけるス
キャンタイムが該スキャンタイム目標値に満たない場合
には該スキャンタイム目標値が経過するまで次のプログ
ラム実行サイクルの起動を遅延させる第1の遅延手段
と, 外部からの信号をプログラム実行サイクルの起動に利用
するか否かを決定する決定手段,および 該決定手段によって外部からの信号を利用すると決定さ
れた場合に外部からの信号が入力されるまで次のプログ
ラム実行サイクルの起動を遅延させる第2の遅延手段を
備え, 該外部からの信号を利用すると決定された場合には,該
第1及び第2の遅延手段によるプログラム実行サイクル
の起動の遅延が完了したときのみ,次のプログラム実行
サイクルの起動を行い,該外部からの信号を利用しない
と決定された場合には,該第1の遅延手段によるプログ
ラム実行サイクルの起動の遅延が完了したときのみ,次
のプログラム実行サイクルの起動を行うよう構成したプ
ログラマブルコントローラ。
1. A storage means for storing a scan time target value, and immediately after the end of one program execution cycle, the next program execution cycle is started to repeatedly execute the sequence program, and the scan time setting instruction is given to the sequence program. Program execution means for setting the scan time target value in the storage means, and if the scan time in the program execution by the program execution means is less than the scan time target value, the scan time target value is First delay means for delaying the start of the next program execution cycle until the lapse of time, deciding means for deciding whether or not to use a signal from the outside for activating the program execution cycle, and the deciding means from the outside. External if it is decided to use the signal Second delay means for delaying the start of the next program execution cycle until these signals are input, and the first and second delay means when it is decided to use the signal from the outside. The next program execution cycle is started only when the delay of the start of the program execution cycle is completed, and when it is determined not to use the signal from the outside, the program execution cycle by the first delay means is executed. Programmable controller configured to start the next program execution cycle only when the start delay of is completed.
JP1988060760U 1988-05-09 1988-05-09 Programmable controller Expired - Lifetime JPH0751611Y2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1988060760U JPH0751611Y2 (en) 1988-05-09 1988-05-09 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1988060760U JPH0751611Y2 (en) 1988-05-09 1988-05-09 Programmable controller

Publications (2)

Publication Number Publication Date
JPH01164505U JPH01164505U (en) 1989-11-16
JPH0751611Y2 true JPH0751611Y2 (en) 1995-11-22

Family

ID=31286458

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1988060760U Expired - Lifetime JPH0751611Y2 (en) 1988-05-09 1988-05-09 Programmable controller

Country Status (1)

Country Link
JP (1) JPH0751611Y2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2522401B2 (en) * 1989-08-19 1996-08-07 富士電機株式会社 Programmable controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57191703A (en) * 1981-05-20 1982-11-25 Fanuc Ltd Sequence controller

Also Published As

Publication number Publication date
JPH01164505U (en) 1989-11-16

Similar Documents

Publication Publication Date Title
US6880029B2 (en) Programmable controller
JPH0751611Y2 (en) Programmable controller
JP4906286B2 (en) Software development environment system
US5940628A (en) Control processor for user setting a change prohibition period during which a program change command will not be executed until the lapse of that period
JP2709934B2 (en) Industrial robot
JPS635402A (en) Programmable controller
JPS616704A (en) Programmable controller
JP2522401B2 (en) Programmable controller
JP2522351B2 (en) Hot water temperature setting device for water heater
JPH0642242Y2 (en) Start / stop control device
JP3358112B2 (en) Programmable controller
JP2810578B2 (en) Programmable controller
JPH0456321B2 (en)
JP3925150B2 (en) Microcomputer and electronic control device for vehicle
JPH04314101A (en) Sequencer
JPS62186154A (en) Control unit of air conditioner
JPH0443139A (en) Diagnosis of controller for vehicle
JP3091457U (en) Electronic equipment
JPS622684Y2 (en)
JPS63126007A (en) Programmable controller
JPH02306306A (en) Programmable controller
JPH0777931A (en) Programable controller
JPS60235205A (en) Programmable controller
JPH0541899B2 (en)
JPH04151706A (en) Cpu reset circuit