JP2006201892A - Programmable controller - Google Patents
Programmable controller Download PDFInfo
- Publication number
- JP2006201892A JP2006201892A JP2005011078A JP2005011078A JP2006201892A JP 2006201892 A JP2006201892 A JP 2006201892A JP 2005011078 A JP2005011078 A JP 2005011078A JP 2005011078 A JP2005011078 A JP 2005011078A JP 2006201892 A JP2006201892 A JP 2006201892A
- Authority
- JP
- Japan
- Prior art keywords
- sequence
- processing
- programmable controller
- instruction
- general
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 claims abstract description 53
- 238000010586 diagram Methods 0.000 claims description 10
- 230000000007 visual effect Effects 0.000 abstract 1
- 238000000034 method Methods 0.000 description 24
- 230000005540 biological transmission Effects 0.000 description 16
- 238000012546 transfer Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 230000004913 activation Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Landscapes
- Programmable Controllers (AREA)
Abstract
Description
本発明は、シーケンス命令を実行するプログラマブル・コントローラに関し、特に、シーケンス命令実行時のスキャン・タイムの短縮を実現するプログラマブル・コントローラに関するものである。 The present invention relates to a programmable controller that executes a sequence instruction, and more particularly to a programmable controller that realizes a reduction in scan time when executing a sequence instruction.
プログラマブル・コントローラにあって、シーケンス命令の実行時間であるスキャン・タイムを測定する先行技術としては、例えば、次のような文献が存在する。 For example, the following documents exist as prior art for measuring a scan time, which is an execution time of a sequence instruction, in a programmable controller.
上記に記載される技術は、単に、スキャン・タイムを数回測定してその分布を把握または解析するものであり、積極的にスキャン・タイムを短縮するという思想はなく、スキャン・タイムの分布状況のみを得るものであった。 The technology described above is simply to measure the scan time several times to grasp or analyze the distribution, and there is no idea of actively reducing the scan time, and the scan time distribution status Only got what.
以下、シーケンス命令の実行について、図面を用いて説明する。例えば、図5に示すようなシーケンスを実現する場合を想定する。このシーケンスは、プログラマブル・コントローラから通信回線を介してパーソナル・コンピュータへデータを送信する例である。 Hereinafter, execution of a sequence command will be described with reference to the drawings. For example, a case where a sequence as shown in FIG. 5 is realized is assumed. This sequence is an example in which data is transmitted from a programmable controller to a personal computer via a communication line.
即ち、プログラマブル・コントローラ側の送信データ・セットのステップからデータ送信処理、処理の正常/異常の判断ステップで一連の処理が終了する。 That is, a series of processing is completed from the transmission data set step on the programmable controller side to the data transmission processing and the processing normality / abnormality determination step.
ここで、「データ送信処理」は、サブルーチンに準ずる処理であり、送信可のステップからタイムアウトを監視しつつデータを1文字ずつ送信し、送信終了−正常終了処理、異常終了処理を確認してこの処理は完了する。 Here, the “data transmission process” is a process according to a subroutine. Data is transmitted character by character while monitoring the timeout from the step where transmission is possible, and the transmission end-normal end process and abnormal end process are confirmed. Processing is complete.
プログラマブル・コントローラ分野に特有のラダー言語を用いて図5に示した処理を記述すると、図6のラダー図となり、その詳しい処理動作は次の通りである。 If the processing shown in FIG. 5 is described using a ladder language specific to the programmable controller field, the ladder diagram of FIG. 6 is obtained, and the detailed processing operation is as follows.
ステップ00001でリレー“I00001”がセットされると、送信処理“AAAA”が開始する。送信処理“AAAA”の内容は図5の通りであるが、引数データ・レジスタ“D00001”と、リターン情報(エラー・コード等)が格納されるレジスタ“D00002”を用いてデータを得、リレー(終了ビット)“I00002”をセットする。
When the relay “I00001” is set in
ステップ00002では、リレー“I00002”セットを確認して転送命令“MOV”が起動し、データ“D00002”をパーソナル・コンピュータ側のレジスタ“D00010”へ転送する。
In
以上のフローにより、シーケンス命令のデータ転送処理が実行される。尚、図7は、図5のフローチャートと重複はあるが、図6に示したラダー図により近い実際のフローチャートである。 With the above flow, the sequence instruction data transfer process is executed. FIG. 7 is an actual flowchart that is similar to the ladder diagram shown in FIG.
以上のような従来のプログラマブル・コントローラにあって、処理“AAAA”をシーケンス命令で記述した場合、データの送信開始から送信終了まで、このプログラマブル・コントローラに設定されるシーケンスの実行のスキャン毎に、このデータ送信処理を行なう必要がある。 In the conventional programmable controller as described above, when the process “AAAA” is described by a sequence instruction, from the start of transmission of data to the end of transmission, every scan of execution of the sequence set in this programmable controller, It is necessary to perform this data transmission process.
このため、データ送信処理中であるか、データ送信処理中でないかによって、このプログラマブル・コントローラに設定されるシーケンス全体のスキャン・タイムが影響され、スキャン時間が変化し、大きな差となる。 For this reason, the scan time of the entire sequence set in the programmable controller is influenced by whether the data transmission process is being performed or not, and the scan time changes, resulting in a large difference.
また、通信ネットワークを構成する通信媒体がどれほど高速であっても、シーケンス実行にあってデータはスキャン・タイムあたり1文字のみの送信であり、時間がかかる。 In addition, no matter how fast the communication medium constituting the communication network is, it takes a long time to transmit only one character per scan time in sequence execution.
更には、処理“AAAA”が終了したことは、処理“AAAA”を実行する回路とは別の回路で判定しているため、設定されるシーケンス・プログラムが長くなればなるほど、表示画面におけるプログラムの視認性が悪くなる、という問題もあった。 Further, since the completion of the process “AAAA” is determined by a circuit different from the circuit that executes the process “AAAA”, the longer the set sequence program, the more the program on the display screen. There was also a problem that visibility deteriorated.
本発明は上述した問題点を解決するためになされたものであり、処理の有無によるシーケンス・プログラムのスキャン・タイムの変動を削減し、シーケンス・プログラム記述の際の視認性を向上させることを目的とする。 The present invention has been made to solve the above-described problems, and it is an object of the present invention to reduce the variation in the scan time of the sequence program depending on the presence or absence of processing, and to improve the visibility when describing the sequence program. And
このような課題を解決するために、本発明の構成は次の通りである。
(1)シーケンス演算プロセッサを有し、シーケンス命令を実行するプログラマブル・コントローラにおいて、ユーザが汎用言語で記述した処理命令を格納するプログラム格納メモリと、前記処理命令を前記シーケンス演算プロセッサの処理のバックグラウンドで処理する汎用プロセッサとを備えることを特徴とするプログラマブル・コントローラ。
(2)前記シーケンス演算プロセッサは、前記処理命令を開始する際は前記汎用プロセッサに起動要求を発行することを特徴とする(1)記載のプログラマブル・コントローラ。
(3)前記汎用プロセッサは、前記処理命令を終了した際は前記シーケンス演算プロセッサに終了通知を発行することを特徴とする(1)または(2)のいずれかに記載のプログラマブル・コントローラ。
(4)前記処理命令に引き続く他の命令を直列に記述してラダー図を作成することを特徴とする(1)から(3)のいずれかに記載のプログラマブル・コントローラ。
(5)前記処理命令は、処理が終了したことを表わすビットがセットされることを特徴とする(1)から(4)のいずれかに記載のプログラマブル・コントローラ。
In order to solve such a problem, the configuration of the present invention is as follows.
(1) A programmable controller having a sequence arithmetic processor and executing a sequence instruction, a program storage memory for storing a processing instruction written by a user in a general-purpose language, and a processing background of the sequence arithmetic processor A programmable controller comprising a general-purpose processor for processing in
(2) The programmable controller according to (1), wherein the sequence arithmetic processor issues an activation request to the general-purpose processor when starting the processing instruction.
(3) The programmable controller according to any one of (1) and (2), wherein the general-purpose processor issues an end notification to the sequence arithmetic processor when the processing instruction is ended.
(4) The programmable controller according to any one of (1) to (3), wherein another instruction subsequent to the processing instruction is described in series to create a ladder diagram.
(5) The programmable controller according to any one of (1) to (4), wherein a bit indicating that the processing is completed is set in the processing instruction.
以上説明したことから明らかなように、本発明によれば次のような効果がある。
データ送信処理中であるか、データ送信処理中でないかによって、このプログラマブル・コントローラに設定されるシーケンス全体のスキャン・タイムが影響されることはなく、スキャン・タイムが大きく変化することもない。
As is apparent from the above description, the present invention has the following effects.
The scan time of the entire sequence set in the programmable controller is not affected by the data transmission process or not, and the scan time does not change greatly.
また、引き続き処理される命令を直列に記述することにより、シーケンス・プログラム記述の際の視認性を向上させることができる。 Further, by describing instructions to be processed in series, it is possible to improve visibility when describing a sequence program.
以下、図面を用いて本発明を詳細に説明する。
図1は本発明の一実施例を示す構成図である。この図で、本発明のプログラマブル・コントローラ1は、中央処理制御部であるCPUユニット11、現場からデータを入力する入力ユニット12、現場へデータを出力する出力ユニット13、システム・バスBを介してパーソナル・コンピュータと通信する通信ユニット14等から構成される。
Hereinafter, the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing an embodiment of the present invention. In this figure, the programmable controller 1 of the present invention includes a CPU unit 11 as a central processing control unit, an
更に、CPUユニット11は、システム・バスBと接続するバス・インターフェイス111、シーケンス・プログラム格納メモリm1からシーケンス命令を読み出して実行するシーケンス演算プロセッサ112、汎用プロセッサ用ファームウェア格納メモリm2または汎用プロセッサ用プログラム格納メモリm3から、システム用の各種命令またはユーザが処理内容を記述した命令を読み出して実行する汎用プロセッサ113から構成される。
Further, the CPU unit 11 includes a
本発明では、シーケンス演算プロセッサ112は、ユーザが汎用言語等で記述した処理を開始する際は、汎用プロセッサ113へその処理の起動要求S1を発行し、汎用プロセッサ113は、その処理が終了した時点で、シーケンス演算プロセッサ112へ終了通知S2を発行する。
In the present invention, the sequence
図2は、本発明のプログラマブル・コントローラが実行するシーケンス命令の記述を表わすラダー図である。 FIG. 2 is a ladder diagram showing a description of sequence instructions executed by the programmable controller of the present invention.
この図で、ステップ00004にて、リレー“I01001”がセットされると、処理“BBBB”が開始する。
In this figure, when the relay “I01001” is set in
処理“BBBB”は、引数データ・レジスタ“D01001”と、リターン情報(エラー・コード等)が格納されるレジスタ“D01002”を用いてデータを得、リレー(終了ビット)“I01002”をセットする。 In the process “BBBB”, data is obtained using the argument data register “D010001” and the register “D010002” in which return information (error code, etc.) is stored, and the relay (end bit) “I01002” is set.
その後、引き続いて、直ちに、転送命令“MOV”を起動し、データ“D01002”をパーソナル・コンピュータ側のレジスタ“D01010”へ転送する。 Thereafter, immediately after that, the transfer instruction “MOV” is activated to transfer the data “D010002” to the register “D01010” on the personal computer side.
この処理での特徴は、処理命令“BBBB”は、従来の処理命令“AAAA”がシーケンス命令の組み合わせで記述されていたのに比較して、記述言語は汎用のプログラミング言語であれば何でもよく、記述言語を問わずに所望の内容を記載する。 The feature of this processing is that the processing instruction “BBBB” can be any general-purpose programming language as long as the conventional processing instruction “AAAA” is described by a combination of sequence instructions. The desired contents are described regardless of the description language.
また、本発明にあって、処理“BBBB”は、その処理が終了すれば、リレー(終了ビット)“I01002”をセットするが、直ちに次の転送命令“MOV”を実行することを特徴とする。 In the present invention, the process “BBBB” sets the relay (end bit) “I0102” when the process ends, but immediately executes the next transfer instruction “MOV”. .
更に、このような処理命令をラダー図として記述するときは、処理命令“BBBB”と、この処理命令“BBBB”に引き続く転送命令“MOV”を、この図のように、1列となるように直列に並べて記述する。 Furthermore, when describing such a processing instruction as a ladder diagram, the processing instruction “BBBB” and the transfer instruction “MOV” following this processing instruction “BBBB” are arranged in one column as shown in FIG. Write in series.
そして、この処理命令“BBBB”は、シーケンス演算プロセッサ112ではなく、起動要求S1がかかった時点で汎用プロセッサ113にて実行される。即ち、処理命令“BBBB”は、シーケンス演算プロセッサ112のシーケンス処理のバックグラウンド処理として、汎用プロセッサ113において実行される。
The processing instruction “BBBB” is executed not by the
即ち、汎用プロセッサ113は、通信処理、入力・出力リフレッシュ処理等を行なうプロセッサであり、通常、シーケンス演算プロセッサ112とは別個に設置される。
That is, the general-
そして、処理命令“BBBB”の後に続く命令“MOV”は、処理命令“BBBB”がバックグラウンド処理として終了した場合に、自動的に一度だけ実行される。 Then, the instruction “MOV” following the processing instruction “BBBB” is automatically executed only once when the processing instruction “BBBB” is ended as the background processing.
このように、この一連の処理は、処理命令“BBBB”とそれに続く転送命令“MOV”の1行の記述とすることができ、視認性が向上し、処理の流れも一目で把握することができる。 In this way, this series of processing can be described in one line of the processing command “BBBB” and the transfer command “MOV” that follows, so that the visibility is improved and the flow of processing can be grasped at a glance. it can.
図3は、以上述べたような本発明による処理のフローを表わす図であり、送信開始が起動すると、送信処理“BBBB”がシーケンス処理のバックグラウンドとして開始する。一方、通常のシーケンス処理は、そのまま続行する。 FIG. 3 is a diagram showing the process flow according to the present invention as described above. When the transmission start is activated, the transmission process “BBBB” starts as the background of the sequence process. On the other hand, normal sequence processing continues as it is.
即ち、送信処理“BBBB”が起動すると、汎用プロセッサ113においてその処理が実行し、シーケンス演算プロセッサ112はシーケンス処理を実行する。このため、シーケンス・プログラム全体のスキャン・タイムに影響を受けることはない。
That is, when the transmission process “BBBB” is activated, the general-
また、図2に戻り、処理命令“BBBB”が終了した時点でリレー・ビット“I01002”がセットされるが、処理“BBBB”開始後、リレー・ビット“I01002”のセットに関係なく転送命令“MOV”が実行される。 Returning to FIG. 2, when the processing instruction “BBBB” is completed, the relay bit “I010002” is set. After the processing “BBBB” starts, the transfer instruction “ MOV "is executed.
一方、このリレー・ビット“I01002”のセットまたはリセットの状態は、ステップI0004以外の、そのリレー・ビットのセット状態がその処理に必要なステップで参照されることとなる。 On the other hand, the state of setting or resetting of the relay bit “I01002” is referred to in a step necessary for the processing other than the step I0004.
図4は、処理“BBBB”の内容を表わすフローチャートである。このフローチャートに表わすように、このプログラムは、C言語等の汎用言語で記述するため、シーケンス・プログラムのように「スキャン」という概念はないため、本来の処理のフローをそのまま記述することができる。 FIG. 4 is a flowchart showing the contents of the process “BBBB”. As shown in this flowchart, since this program is described in a general language such as C language, there is no concept of “scan” unlike a sequence program, so that the original processing flow can be described as it is.
また、条件分岐のステップの判断にあたって、スキャン・タイムの影響を受けることはないので、高速に送信処理を行なうことができる。 In addition, the determination of the conditional branch step is not affected by the scan time, so that transmission processing can be performed at high speed.
1 プログラマブル・コントローラ
11 CPUユニット
12 入力ユニット
13 出力ユニット
14 通信ユニット
B システム・バス
111 バス・インターフェイス
112 シーケンス演算プロセッサ
113 汎用プロセッサ
m1 シーケンス・プログラム格納メモリ
m2 汎用プロセッサ用ファームウェア格納メモリ
m3 汎用プロセッサ用プログラム格納メモリ
DESCRIPTION OF SYMBOLS 1 Programmable controller 11
Claims (5)
The programmable controller according to any one of claims 1 to 4, wherein a bit indicating that the processing is completed is set in the processing instruction.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005011078A JP2006201892A (en) | 2005-01-19 | 2005-01-19 | Programmable controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005011078A JP2006201892A (en) | 2005-01-19 | 2005-01-19 | Programmable controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006201892A true JP2006201892A (en) | 2006-08-03 |
Family
ID=36959858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005011078A Pending JP2006201892A (en) | 2005-01-19 | 2005-01-19 | Programmable controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006201892A (en) |
-
2005
- 2005-01-19 JP JP2005011078A patent/JP2006201892A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20080046103A1 (en) | Control apparatus with fast i/o function, and control method for control data thereof | |
JP3938580B2 (en) | Information processing apparatus, information processing method, semiconductor device, and computer program | |
JP2014165748A (en) | Processing device and method of controlling processing device | |
JP6150953B2 (en) | Debugging device, debugging method, and debugging program | |
JP2011257904A (en) | Control apparatus and data processing method thereof | |
JP2010134593A (en) | Programmable controller | |
JP6767896B2 (en) | Programmable logic controller system, programmable logic controller, communication test support device, communication test support method, and computer program that can be executed by the communication test support device. | |
JP5496429B1 (en) | Engineering tools and programmable logic controllers | |
JP5490307B2 (en) | Communication device | |
JP5086296B2 (en) | Programmable controller control program creation method and programmable controller control program creation system | |
JP2006201892A (en) | Programmable controller | |
JP2008077467A (en) | Display unit | |
JP3892873B2 (en) | Programmable controller | |
JP5360382B2 (en) | PLC program development support device | |
JP5053002B2 (en) | Hardware monitoring unit | |
JP4584235B2 (en) | CPU unit, system processing execution method, and program for causing CPU unit to execute the method | |
JP2012018641A (en) | Software development system | |
JP2010097478A (en) | Programmable logic controller | |
JP5088566B2 (en) | PLC with interrupt function | |
WO2016181548A1 (en) | Communication simulation device and communication simulation program | |
JP4919092B2 (en) | Control program development support device | |
JP2012038013A (en) | Information processing device and computer program | |
JP2005084820A (en) | Controller comprising simulating functions of input/output unit | |
JP2011065346A (en) | Control system, communication method for the same, communication unit and communication method for the same | |
JP2011065246A (en) | Built-in system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Effective date: 20070905 Free format text: JAPANESE INTERMEDIATE CODE: A621 |
|
A131 | Notification of reasons for refusal |
Effective date: 20090623 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090625 |
|
A521 | Written amendment |
Effective date: 20090804 Free format text: JAPANESE INTERMEDIATE CODE: A523 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090917 |