JP2001350508A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JP2001350508A
JP2001350508A JP2000172217A JP2000172217A JP2001350508A JP 2001350508 A JP2001350508 A JP 2001350508A JP 2000172217 A JP2000172217 A JP 2000172217A JP 2000172217 A JP2000172217 A JP 2000172217A JP 2001350508 A JP2001350508 A JP 2001350508A
Authority
JP
Japan
Prior art keywords
sequence program
execution unit
debugging
programmable controller
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.)
Withdrawn
Application number
JP2000172217A
Other languages
Japanese (ja)
Inventor
Masahiro Watanabe
昌裕 渡辺
Yuichi Egawa
裕一 頴川
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.)
Shibaura Machine Co Ltd
Original Assignee
Toshiba Machine Co Ltd
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 Toshiba Machine Co Ltd filed Critical Toshiba Machine Co Ltd
Priority to JP2000172217A priority Critical patent/JP2001350508A/en
Publication of JP2001350508A publication Critical patent/JP2001350508A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a programmable controller which facilitates debugging operation and secure the execution time of a sequence program in the actual operation. SOLUTION: A CPU 3 is equipped with a debugging operation execution part 31 which executes the sequence program while making an error check and a normal operation execution part 32 which executes the sequence program fast without any error check. In debugging execution, the debugging operation execution part 31 executes the sequence program to present detailed error information including errors regarding the sequence program and errors accompanying input data, so the debugging man-hour is reducible, so that the debugging operation can easily be performed. In the actual operation after the debugging, the normal arithmetic execution 32 is selected and executes the sequence program to secure the execution time of the sequence program since the adequacy of input data is already obtained and the program is executed fast without any error check.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、ユーザが作成した
シーケンスプログラムを実行する演算処理手段を備え、
外部から入力した信号を、この演算処理手段で前記シー
ケンスプログラムに基づいて演算処理し、外部機器に制
御信号を出力するプログラマブルコントローラに関する
ものである。
[0001] The present invention comprises an arithmetic processing means for executing a sequence program created by a user,
The present invention relates to a programmable controller that performs arithmetic processing on an externally input signal based on the sequence program by the arithmetic processing means and outputs a control signal to an external device.

【0002】[0002]

【背景技術】従来より、ユーザが作成したシーケンスプ
ログラムを実行する演算処理手段を備え、外部から入力
した信号を、この演算処理手段でシーケンスプログラム
に基づいて演算処理し、外部機器に制御信号を出力する
プログラマブルコントローラが利用されている。ここ
で、シーケンスプログラムは、プログラマブルコントロ
ーラに設けられているシーケンスプログラム記憶部に格
納されるようになっている。作業者は、作成したシーケ
ンスプログラムをシーケンスプログラム記憶部に格納し
た後、プログラマブルコントローラの試運転を行い、シ
ーケンスプログラムに記述等の誤りがないか否かのデバ
ッグ作業を行って、当該シーケンスプログラムを修正
し、目的の制御が正常に動作するか否かの確認を行って
いる。そして、このデバッグ作業が終了した後、実際の
実稼働時に、プログラマブルコントローラを使用するよ
うになっている。
2. Description of the Related Art Conventionally, an arithmetic processing unit for executing a sequence program created by a user is provided. The arithmetic processing unit performs arithmetic processing on a signal input from the outside based on the sequence program, and outputs a control signal to an external device. Programmable controllers are used. Here, the sequence program is stored in a sequence program storage unit provided in the programmable controller. After storing the created sequence program in the sequence program storage unit, the operator performs a trial run of the programmable controller, performs a debugging operation to determine whether or not there is an error in the sequence program, and corrects the sequence program. It is checked whether the target control operates normally. Then, after this debugging work is completed, the programmable controller is used at the time of actual actual operation.

【0003】[0003]

【発明が解決しようとする課題】このようなプログラマ
ブルコントローラでは、デバッグ実行時は、単にシーケ
ンスプログラムに記述等の誤りがないか否かのチェッ
ク、および修正を行うだけであるとともに、演算処理手
段には、デバッグ実行時に、シーケンスプログラムに組
み込まれている入力データの正当性等を監視するものが
ないので、デバッグ実行中に、入力データとして誤った
データをシーケンスプログラムで使用した場合、予期し
ない出力信号(制御信号)が発生するということがあ
る。このようなプログラムミスは、非常に発見しづらい
ので、デバッグ作業に多くの工数が必要となり、このた
め、当該デバッグ作業が煩雑になるという問題がある。
In such a programmable controller, at the time of debugging, it is only necessary to check whether or not there is an error in the description or the like in the sequence program and to correct the sequence program. Does not monitor the validity of the input data incorporated in the sequence program at the time of debugging, so if incorrect data is used as input data in the sequence program during debugging, unexpected output signals (Control signal) may occur. Such a program error is very difficult to find, so that a lot of man-hours are required for the debugging work, and thus there is a problem that the debugging work becomes complicated.

【0004】一方、プログラマブルコントローラにおい
て、入力されるデータを監視しながらプログラムを実行
する厳密なプログラムチェック機能を実現すると、シー
ケンスプログラムの実行時間が極端に増加するので、実
稼働時に、演算処理手段に対する応答性等が低下するこ
とから、実用化することができないという問題がある。
On the other hand, when a strict program check function for executing a program while monitoring input data is realized in a programmable controller, the execution time of a sequence program is extremely increased. There is a problem that it cannot be put to practical use due to a decrease in responsiveness and the like.

【0005】本発明の目的は、デバッグ作業が容易にで
き、実稼働時にシーケンスプログラムの実行時間を確保
することができるプログラマブルコントローラを提供す
ることにある。
An object of the present invention is to provide a programmable controller capable of easily performing a debugging operation and securing the execution time of a sequence program during actual operation.

【0006】[0006]

【課題を解決するための手段】本発明は、ユーザが作成
したシーケンスプログラムを実行する演算処理手段を備
え、外部から入力した信号を、この演算処理手段でシー
ケンスプログラムに基づいて演算処理し、外部機器に制
御信号を出力するプログラマブルコントローラであっ
て、演算処理手段は、エラーチェックを行いながらシー
ケンスプログラムを実行するデバッグ用演算実行部と、
エラーチェックなしに高速にシーケンスプログラムを実
行する通常演算実行部とを備え、これらのいずれか一方
を選択して実行することを特徴とする。ここで、外部か
ら入力する信号は、リミットスイッチ等から出力される
ON/OFF等の2値信号として構成され、演算処理手
段は、この外部から入力する信号に変化があると、シー
ケンスプログラム等に組み込まれた数値データや配列デ
ータ等の入力データを呼び出し、この入力データを使用
してシーケンスプログラムを実行し、制御信号を生成す
る。なお、入力データとしては、数値データや配列デー
タに限らず、例えば、桁数宣言データ、上限値および下
限値からなる許容範囲データ、アドレス指定データ等が
挙げられる。このような本発明によれば、デバッグ実行
時に、デバッグ用演算実行部でシーケンスプログラムを
実行することで、デバッグ実行中に、当該デバッグ用演
算実行部のエラーチェックによって入力データを監視す
ることが可能となり、デバッグ時に、シーケンスプログ
ラムに関するエラーと、入力データに伴うエラーとを含
む詳細なエラー情報を提示することができるので、デバ
ッグ工数を削減することができる。これらにより、デバ
ッグ作業を容易に行うことができる。また、デバッグ終
了後、つまり、実稼働時に、通常演算実行部を選択し、
当該通常演算実行部でシーケンスプログラムを実行する
ことで、入力データの正当性が得られているとともに、
エラーチェックなしに高速に実行する分、シーケンスプ
ログラムの実行時間を確保することができる。従って、
デバッグ用演算実行部と通常演算実行部とを選択するこ
とで、デバッグ実行時の厳密なプログラムチェック機能
と、実稼働時のシーケンスプログラムの高速実行機能と
を両立させたプログラマブルコントローラを提供するこ
とができる。
According to the present invention, there is provided an arithmetic processing means for executing a sequence program created by a user, wherein a signal input from the outside is arithmetically processed by the arithmetic processing means based on the sequence program. A programmable controller that outputs a control signal to the device, wherein the arithmetic processing unit includes a debug arithmetic execution unit that executes a sequence program while performing an error check;
A normal operation execution unit that executes a sequence program at high speed without error checking; and selects and executes one of them. Here, the signal input from the outside is configured as a binary signal such as ON / OFF output from a limit switch or the like. The input data such as numerical data and array data incorporated is called, and a sequence program is executed using the input data to generate a control signal. Note that the input data is not limited to numerical data and array data, but includes, for example, digit number declaration data, allowable range data including an upper limit value and a lower limit value, and address designation data. According to the present invention, by executing the sequence program in the debugging operation unit during debugging, it is possible to monitor input data by performing an error check of the operation unit during debugging. Thus, at the time of debugging, detailed error information including an error relating to the sequence program and an error accompanying the input data can be presented, so that the number of debugging steps can be reduced. As a result, debugging can be easily performed. Also, after debugging, that is, at the time of actual operation, select the normal operation execution unit,
By executing the sequence program in the normal operation execution unit, the validity of the input data is obtained,
The execution time of the sequence program can be secured for the high-speed execution without error check. Therefore,
By selecting the debug operation execution unit and the normal operation execution unit, it is possible to provide a programmable controller that has both a strict program check function at the time of debug execution and a high-speed execution function of a sequence program at the time of actual operation. it can.

【0007】以上において、前述のシーケンスプログラ
ムには、デバッグ用演算実行部および通常演算実行部の
いずれかを選択する命令が含まれ、演算処理手段は、こ
の命令を処理することにより、デバッグ用演算実行部お
よび通常演算実行部を選択して実行することが好まし
い。このようにすれば、ユーザがデバッグ用演算実行部
および通常演算実行部のいずれかを選択する命令を含ん
だシーケンスプログラムを作成すればよく、プログラマ
ブルコントローラにデバッグ用演算実行部および通常演
算実行部のいずれかを選択する機能を設ける必要がない
ので、当該プログラマブルコントローラの構成を簡易に
することができ、製造が容易となる。
In the above, the sequence program includes an instruction for selecting one of the debug operation execution unit and the normal operation execution unit, and the operation processing means processes the instruction to execute the debug operation execution. It is preferable to select and execute the execution unit and the normal operation execution unit. With this configuration, the user only has to create a sequence program including an instruction for selecting one of the debug operation execution unit and the normal operation execution unit. Since there is no need to provide a function for selecting one of them, the configuration of the programmable controller can be simplified, and manufacturing becomes easier.

【0008】また、前述のプログラマブルコントローラ
には、シーケンスプログラムを編集する編集支援装置が
接続され、演算処理手段は、編集支援装置から出力され
る信号に基づいて、デバッグ用演算実行部および通常演
算実行部を選択して実行することが望ましい。このよう
にすれば、編集支援装置からの入力によって、デバッグ
用演算実行部および通常演算実行部のいずれかを選択し
て実行することができるので、誰でも簡単に実行部の選
択を行うことが可能となる。また、デバッグ終了後、編
集支援装置によって通常演算実行部を選択してから、当
該編集支援装置をプログラマブルコントローラから取り
外すことで、デバッグ用演算実行部および通常演算実行
部のいずれかを選択することができなくなるので、実稼
働時、誤ってデバッグ用演算実行部によってシーケンス
プログラムが実行されることを未然に防止することが容
易に可能となる。
An editing support device for editing a sequence program is connected to the above-mentioned programmable controller, and the arithmetic processing means includes a debugging calculation execution unit and a normal calculation execution unit based on a signal output from the editing support device. It is desirable to select a part and execute it. With this configuration, it is possible to select and execute one of the debugging calculation execution unit and the normal calculation execution unit based on the input from the editing support device, so that anyone can easily select the execution unit. It becomes possible. Further, after the debugging is completed, the editing support device selects the normal operation execution unit, and then removes the editing support device from the programmable controller, so that either the debugging operation execution unit or the normal operation execution unit can be selected. Since it becomes impossible, it is possible to easily prevent a sequence program from being erroneously executed by the debugging operation unit during actual operation.

【0009】さらに、前述のデバッグ用演算実行部の実
行時、演算処理手段が所定のエラーを検出すると、当該
演算処理手段は、編集支援装置にエラー信号を出力する
ように構成されていることが好ましい。このようにすれ
ば、シーケンスプログラムおよび入力データのエラー箇
所を編集支援装置で逐次確認および修正することができ
るので、デバッグ作業をスムーズに、かつ、確実に行う
ことが可能となる。
Further, when the above-mentioned debugging operation execution unit is executed, when the operation processing means detects a predetermined error, the operation processing means may be configured to output an error signal to the editing support device. preferable. With this configuration, the error location of the sequence program and the input data can be sequentially confirmed and corrected by the editing support device, so that the debugging operation can be performed smoothly and reliably.

【0010】[0010]

【発明の実施の形態】以下に本発明の実施の形態を図面
に基づいて説明する。図1には、本発明の一実施形態に
おけるプログラマブルコントローラ1のブロック図が示
されている。プログラマブルコントローラ1は、ユーザ
が作成したシーケンスプログラムに基づいてシーケンス
制御を行うものであり、外部から信号が入力される信号
入力部2と、この信号入力部2に入力した信号を、シー
ケンスプログラムに基づいて演算処理する演算処理手段
であるCPU3と、演算処理された制御信号を外部機器
に出力する信号出力部4と、シーケンスプログラム記憶
部5と、システムプログラム記憶部6と、インターフェ
ース7とを含んで構成されている。このインターフェー
ス7には、シーケンスプログラムの修正・変更、および
デバッグ等を行うための編集支援装置8が接続されてい
る。ここで、外部から入力する信号は、リミットスイッ
チ等から出力されるON/OFF等の2値信号として構
成されている。
Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 shows a block diagram of a programmable controller 1 according to an embodiment of the present invention. The programmable controller 1 performs sequence control based on a sequence program created by a user. The programmable controller 1 converts a signal input unit 2 to which a signal is input from the outside and a signal input to the signal input unit 2 based on the sequence program. And a signal output unit 4 for outputting a control signal subjected to the arithmetic processing to an external device, a sequence program storage unit 5, a system program storage unit 6, and an interface 7. It is configured. The interface 7 is connected to an editing support device 8 for correcting / changing a sequence program, debugging, and the like. Here, the signal input from the outside is configured as a binary signal such as ON / OFF output from a limit switch or the like.

【0011】シーケンスプログラム記憶部5は、バック
アップRAMまたはEEPROM(Electrically Erasa
ble Programmable ROM)で構成され、CPU3が実行す
る複数の命令から構成されるシーケンスプログラムが記
憶されている。実行時には、CPU3は、シーケンスプ
ログラム記憶部5からシーケンスプログラムの命令を順
次読み出し、順次実行するようになっている。このシー
ケンスプログラムには、信号入力部2に入力した信号の
変化に応じてCPU3に呼び出される数値データや配列
データ等の入力データが組み込まれている。システムプ
ログラム記憶部6は、ROM(Read Only Memory)で構
成され、当該プログラマブルコントローラ1を制御する
システムプログラムが記憶されている。
The sequence program storage unit 5 stores a backup RAM or an EEPROM (Electrically Erase).
ble Programmable ROM), and stores a sequence program including a plurality of instructions executed by the CPU 3. At the time of execution, the CPU 3 sequentially reads out the instructions of the sequence program from the sequence program storage unit 5 and sequentially executes the instructions. The sequence program incorporates input data such as numerical data and array data called by the CPU 3 in response to a change in the signal input to the signal input unit 2. The system program storage unit 6 is configured by a ROM (Read Only Memory), and stores a system program for controlling the programmable controller 1.

【0012】CPU3は、外部から入力する信号に変化
があると、前述の入力データを呼び出し、この入力デー
タを使用してシーケンスプログラムを実行し、制御信号
を生成するものであり、エラーチェックを行いながらシ
ーケンスプログラムを実行するデバッグ用演算実行部3
1と、エラーチェックなしに高速にシーケンスプログラ
ムを実行する通常演算実行部32とを備えている。これ
らデバッグ用演算実行部31および通常演算実行部32
は、編集支援装置8によって選択可能となっている。つ
まり、CPU3は、編集支援装置8から出力される信号
に基づいて、デバッグ用演算実行部31および通常演算
実行部32のいずれか一方を選択して実行するようにな
っている。ここで、デバッグ用演算実行部31および通
常演算実行部32は、プログラマブルコントローラ1の
電源オン後の起動時に実行されるシーケンス制御処理に
よって、CPU3に作成されるものである。
When there is a change in an externally input signal, the CPU 3 calls the above-mentioned input data, executes a sequence program using this input data, generates a control signal, and performs an error check. Executing unit 3 for debugging while executing sequence program
1 and a normal operation execution unit 32 for executing a sequence program at high speed without error checking. The debug operation execution unit 31 and the normal operation execution unit 32
Can be selected by the editing support device 8. That is, the CPU 3 selects and executes one of the debugging calculation execution unit 31 and the normal calculation execution unit 32 based on the signal output from the editing support device 8. Here, the debug operation execution unit 31 and the normal operation execution unit 32 are created in the CPU 3 by a sequence control process executed when the programmable controller 1 is started after the power is turned on.

【0013】デバッグ用演算実行部31は、シーケンス
プログラムのデバッグ作業を行う際に選択する実行部で
あり、当該シーケンスプログラムの解釈を行うシーケン
スプログラム解釈部と、データ入力部と、入力データの
エラーチェックを行う入力データエラーチェック部と、
前記シーケンスプログラム解釈部で解釈されたシーケン
スプログラムを実行するシーケンスプログラム実行部と
を含んで構成されている。
The debugging execution unit 31 is an execution unit that is selected when debugging a sequence program. The execution unit 31 is a sequence program interpreting unit that interprets the sequence program, a data input unit, and an error check unit for input data. An input data error check unit for performing
A sequence program execution unit that executes the sequence program interpreted by the sequence program interpretation unit.

【0014】シーケンスプログラム解釈部は、シーケン
スプログラムの命令をシーケンスプログラム記憶部5か
らCPU3内に取り込み、この取り込んだ命令の解釈を
行う部分である。シーケンスプログラム実行部は、前記
シーケンスプログラム解釈部で解釈された命令を実行す
る部分である。
The sequence program interpreting section is a section for fetching sequence program instructions from the sequence program storage section 5 into the CPU 3 and interpreting the fetched instructions. The sequence program execution unit is a unit that executes the instruction interpreted by the sequence program interpretation unit.

【0015】入力データエラーチェック部は、使用され
る入力データが、シーケンスプログラム解釈部で解釈さ
れた命令によって正当に処理されるか否かのエラーチェ
ックを行う部分である。具体的に、エラーチェックする
内容としては、例えば、0による除算、負数の平方根、
演算の際の入力値のオーバーフローおよびアンダーフロ
ー、逆三角関数で±1以外の入力等の算術演算の入力値
や、許容範囲外のデータをアクセスする等のインデック
ス命令の範囲不正、システム予約領域等の読み込み専用
エリアに関する書き込み処理等の検出などが挙げられ
る。
The input data error check section is a section for performing an error check on whether or not the input data to be used is properly processed by a command interpreted by the sequence program interpreting section. Specifically, the contents to be checked for errors include, for example, division by 0, square root of a negative number,
Overflow and underflow of input values at the time of operation, input values of arithmetic operation such as input other than ± 1 by inverse trigonometric function, illegal range of index instruction such as accessing data out of allowable range, system reserved area, etc. Detection of write processing and the like for the read-only area.

【0016】この入力データエラーチェック部は、正当
性のない入力データが入力された場合、つまり、入力デ
ータのエラーを検出すると、シーケンスプログラム実行
部での命令の実行を中止するとともに、編集支援装置8
に当該エラーを検出した旨のエラー信号を出力するよう
になっている。これにより、デバッグ作業として、シー
ケンスプログラムに記述等の誤りがないか否かのチェッ
ク、および修正に加えて、入力データの正当性等のエラ
ーチェックを行うようになっている。
The input data error check section stops the execution of the instruction in the sequence program execution section when an invalid input data is input, that is, when an error in the input data is detected, and the editing support device. 8
, An error signal indicating that the error has been detected is output. Thus, as a debugging work, an error check such as validity of input data is performed in addition to checking whether there is an error in the description or the like in the sequence program and correcting the error.

【0017】通常演算実行部32は、通常の実稼働時に
選択する実行部であり、前記デバッグ用演算実行部31
の構成から入力データエラーチェック部を除いたものと
同様の、シーケンスプログラム解釈部と、シーケンスプ
ログラム実行部とを備えた構成となっている。このよう
に、入力データエラーチェック部を省略することで、通
常演算実行部32は、エラーチェックなしに高速にシー
ケンスプログラムを実行することができるようになって
いる。
The normal operation execution unit 32 is an execution unit that is selected at the time of normal actual operation.
Has a sequence program interpretation unit and a sequence program execution unit similar to the configuration except that the input data error check unit is omitted. Thus, by omitting the input data error check unit, the normal operation execution unit 32 can execute the sequence program at high speed without error check.

【0018】このようなプログラマブルコントローラ1
は、図2〜図4に示されるように動作する。ここで、予
めユーザは、作成したシーケンスプログラムをシーケン
スプログラム記憶部5に記憶させておくとともに、制御
したい外部機器、入力したい信号を発生する信号源、お
よび編集支援装置8をプログラマブルコントローラ1に
接続しておく。
Such a programmable controller 1
Operates as shown in FIGS. Here, the user stores the created sequence program in the sequence program storage unit 5 in advance, and connects the external device to be controlled, the signal source that generates the signal to be input, and the editing support device 8 to the programmable controller 1. Keep it.

【0019】(1) まず、プログラマブルコントローラ1
の電源を入れると、システムプログラム記憶部6に記憶
されているシステムプログラムが立ち上がり、CPU3
は、このシステムプログラムに基づいて、当該プログラ
マブルコントローラ1の初期化を行う(S50)。具体
的には、CPU3は、図4に示されるように、入出力信
号の制御を行う入出力制御処理を行い(S501)、イ
ンターフェース7を制御する通信制御処理を行い(S5
02)、プログラマブルコントローラ1全体の制御を行
うシステム制御処理を行い(S503)、シーケンスプ
ログラムの進行を制御するシーケンス制御処理を行い
(S504)、それぞれの制御を動作可能な状態とす
る。この際、シーケンス制御処理が行われると、CPU
3内にデバッグ用演算実行部31および通常演算実行部
32が作成される。初期化が完了すると、プログラマブ
ルコントローラ1は、外部からの信号の入力や編集支援
装置8からの入力があるまで待機状態となる。
(1) First, the programmable controller 1
When the power is turned on, the system program stored in the system program storage unit 6 starts up, and the CPU 3
Initializes the programmable controller 1 based on the system program (S50). Specifically, as shown in FIG. 4, the CPU 3 performs input / output control processing for controlling input / output signals (S501), and performs communication control processing for controlling the interface 7 (S5).
02), a system control process for controlling the entire programmable controller 1 is performed (S503), a sequence control process for controlling the progress of the sequence program is performed (S504), and each control is made operable. At this time, when the sequence control process is performed, the CPU
3, a debug operation execution unit 31 and a normal operation execution unit 32 are created. When the initialization is completed, the programmable controller 1 is in a standby state until there is an input of a signal from the outside or an input from the editing support device 8.

【0020】(2) 次に、ユーザは、作成したシーケンス
プログラムのデバッグ作業を行いたい場合、編集支援装
置8を操作し、当該編集支援装置8からインターフェー
ス7を介して、CPU3にデバッグ用演算実行部31を
選択する旨の信号を出力する(S51)。 (3) CPU3は、この編集支援装置8からの信号によっ
て、シーケンス制御をデバッグ用演算実行部31で実行
するように設定する(S52)。
(2) Next, when the user wants to perform a debugging operation on the created sequence program, he operates the editing support device 8 and causes the CPU 3 to execute a debugging operation from the editing support device 8 via the interface 7. A signal to select the unit 31 is output (S51). (3) Based on the signal from the editing support device 8, the CPU 3 sets the sequence control to be executed by the debug calculation execution unit 31 (S52).

【0021】(4) そして、デバッグ用演算実行部31で
は、シーケンスプログラム解釈部が、シーケンスプログ
ラムの命令をシーケンスプログラム記憶部5からCPU
3内に取り込み、この取り込んだ命令の解釈を行う(S
53)。 (5) 次に、入力データエラーチェック部で、信号入力部
2に入力した信号の変化に応じてデータ入力部に呼び出
した入力データのエラーチェックを行う(S54)。 (6) ここで、入力データに正当性のない信号、つまり、
エラーとなるデータを検出した場合(S55)、編集支
援装置8に当該エラーを検出した旨のエラー信号を出力
し、シーケンスプログラム実行部での命令の実行を中止
して、デバッグ作業を終了する。ユーザは、編集支援装
置8に入力されたエラー信号に基づいて、プログラムミ
スを修正し、再度、デバッグ作業を行う。
(4) In the debug operation executing unit 31, the sequence program interpreting unit transmits the sequence program instruction from the sequence program storing unit 5 to the CPU.
3 and interprets the fetched instruction (S
53). (5) Next, the input data error check unit performs an error check on the input data called to the data input unit according to a change in the signal input to the signal input unit 2 (S54). (6) Here, a signal without valid input data, that is,
If the error data is detected (S55), an error signal to the effect that the error has been detected is output to the editing support device 8, the execution of the instruction in the sequence program execution unit is stopped, and the debugging operation is terminated. The user corrects a program error based on the error signal input to the editing support device 8, and performs debugging again.

【0022】(7) 一方、入力データにエラーがない場合
(S55)、シーケンスプログラム実行部がシーケンス
プログラム解釈部で解釈された命令を実行する(S5
6)。 (8) シーケンスプログラム実行部は、入力データを命令
に基づいて演算処理し、命令に応じて外部機器に制御信
号を出力する(S57)。1つの命令をシーケンスプロ
グラム実行部で実行すると、シーケンスプログラム解釈
部は、次の命令を取り込み、同様の動作が行われる。
(7) On the other hand, if there is no error in the input data (S55), the sequence program execution unit executes the command interpreted by the sequence program interpretation unit (S5).
6). (8) The sequence program execution unit performs arithmetic processing on the input data based on the command, and outputs a control signal to an external device according to the command (S57). When one instruction is executed by the sequence program execution unit, the sequence program interpretation unit fetches the next instruction and performs the same operation.

【0023】そして、以下、順次命令を解釈、実行して
いき、シーケンスプログラムの最後を示す「END」命
令を取り込んで実行すると、シーケンスプログラムの実
行順序が先頭に戻る。シーケンスプログラムの実行順序
が先頭に戻れば、デバッグ用演算実行部31は、演算を
中止することなく、再び最初の命令を取り込んで実行す
る。なお、前述のように、シーケンスプログラム実行部
でシーケンスプログラムの命令を実行する前に、入力デ
ータエラーチェック部で入力データのエラーを検出した
場合や、ユーザから編集支援装置8を介してデバッグ用
演算実行部31でのシーケンス制御を終了する旨の信号
がCPU3に入力された場合、強制的にシーケンスプロ
グラムが終了し、デバッグ作業を終了することができる
ようになっている(S58)。
Thereafter, the instructions are sequentially interpreted and executed, and when an "END" instruction indicating the end of the sequence program is fetched and executed, the execution order of the sequence program returns to the top. When the execution order of the sequence program returns to the beginning, the debugging operation execution unit 31 fetches and executes the first instruction again without stopping the operation. As described above, if the input data error check unit detects an error in the input data before executing the sequence program instruction in the sequence program execution unit, or if the user performs a debugging operation via the editing support device 8 from the user. When a signal to end the sequence control in the execution unit 31 is input to the CPU 3, the sequence program is forcibly ended, and the debugging work can be ended (S58).

【0024】(9) デバッグ作業によって、シーケンスプ
ログラムに記述等の誤りがないか否かのチェック、およ
び修正に加えて、入力データの正当性等のエラーチェッ
クを行った後、ユーザは、作成したシーケンスプログラ
ムによって実稼働を行うために、編集支援装置8を操作
し、当該編集支援装置8からインターフェースを介し
て、CPU3に通常演算実行部32を選択する旨の信号
を出力する(S51)。この後、編集支援装置8は、プ
ログラマブルコントローラ1から取り外しておく。 (10)CPU3は、この編集支援装置8からの信号によっ
て、シーケンス制御を通常演算実行部32で実行するよ
うに設定する(S61)。
(9) In addition to checking whether there is an error in the description or the like in the sequence program by a debugging operation, and performing an error check on the validity of the input data in addition to the correction, the user creates the program. In order to perform the actual operation by the sequence program, the editing support device 8 is operated, and a signal to select the normal operation execution unit 32 is output from the editing support device 8 to the CPU 3 via the interface (S51). Thereafter, the editing support device 8 is removed from the programmable controller 1. (10) Based on the signal from the editing support device 8, the CPU 3 sets the normal arithmetic execution unit 32 to execute the sequence control (S61).

【0025】(11)すると、通常演算実行部32では、シ
ーケンスプログラム解釈部がシーケンスプログラムの命
令をシーケンスプログラム記憶部5からCPU3内に取
り込んで命令の解釈を行う(S62)。 (12)そして、シーケンスプログラム実行部は、シーケン
スプログラム解釈部で解釈した命令を実行する(S6
3)。 (13)シーケンスプログラム実行部は、入力データを命令
に基づいて演算処理し、命令に応じて外部機器に制御信
号を出力する(S64)。1つの命令をシーケンスプロ
グラム実行部で実行すると、シーケンスプログラム解釈
部は、次の命令を取り込み、同様の動作が行われる。そ
して、以下、順次命令を解釈、実行していき、シーケン
スプログラムの最後を示す「END」命令を取り込んで
実行すると、シーケンスプログラムの実行順序が先頭に
戻る。シーケンスプログラムの実行順序が先頭に戻れ
ば、通常演算実行部32は、演算を中止することなく、
再び最初の命令を取り込んで実行する。なお、編集支援
装置8を再びプログラマブルコントローラ1に接続し、
ユーザから編集支援装置8を介して通常演算実行部32
でのシーケンス制御を終了する旨の信号がCPU3に入
力された場合、強制的にシーケンスプログラムが終了す
るようになっている(S65)。
(11) In the normal operation executing section 32, the sequence program interpreting section fetches the sequence program instruction from the sequence program storage section 5 into the CPU 3 and interprets the instruction (S62). (12) Then, the sequence program execution unit executes the command interpreted by the sequence program interpretation unit (S6).
3). (13) The sequence program execution unit performs arithmetic processing on the input data based on the command, and outputs a control signal to an external device according to the command (S64). When one instruction is executed by the sequence program execution unit, the sequence program interpretation unit fetches the next instruction and performs the same operation. Thereafter, the instructions are sequentially interpreted and executed, and when the “END” instruction indicating the end of the sequence program is fetched and executed, the execution order of the sequence program returns to the top. When the execution order of the sequence program returns to the beginning, the normal operation execution unit 32 does not stop the operation,
Fetch and execute the first instruction again. Note that the editing support device 8 is connected to the programmable controller 1 again,
The normal operation execution unit 32 from the user via the editing support device 8
When a signal indicating that the sequence control in step (1) is terminated is input to the CPU 3, the sequence program is forcibly terminated (S65).

【0026】このような本実施形態によれば、次のよう
な効果が得られる。すなわち、デバッグ実行時に、デバ
ッグ用演算実行部31でシーケンスプログラムを実行す
ることで、デバッグ実行中に、当該デバッグ用演算実行
部31のエラーチェックによって入力データを監視する
ことができ、デバッグ時に、シーケンスプログラムに関
するエラーと、入力データに伴うエラーとを含む詳細な
エラー情報を提示することができるので、デバッグ工数
を削減することができる。これにより、デバッグ作業を
容易に行うことができる。
According to the present embodiment, the following effects can be obtained. That is, by executing the sequence program in the debugging operation unit 31 during the execution of the debugging, the input data can be monitored by the error check of the operation unit 31 during the debugging. Since detailed error information including an error relating to the program and an error accompanying the input data can be presented, the number of debugging steps can be reduced. As a result, debugging can be easily performed.

【0027】また、デバッグ終了後、つまり、実稼働時
に、通常演算実行部32を選択し、当該通常演算実行部
32でシーケンスプログラムを実行することで、入力デ
ータの正当性が得られているとともに、エラーチェック
なしに高速に実行する分、シーケンスプログラムの実行
時間を確保することができる。従って、デバッグ用演算
実行部31と通常演算実行部32とを選択することで、
デバッグ実行時の厳密なプログラムチェック機能と、実
稼働時のシーケンスプログラムの高速実行機能とを両立
させたプログラマブルコントローラ1を提供することが
できる。
After the debugging is completed, that is, at the time of actual operation, by selecting the normal operation execution unit 32 and executing the sequence program by the normal operation execution unit 32, the validity of the input data is obtained. As a result, the execution time of the sequence program can be secured for the high-speed execution without error check. Therefore, by selecting the debug operation execution unit 31 and the normal operation execution unit 32,
It is possible to provide the programmable controller 1 having both a strict program check function at the time of debugging execution and a high-speed execution function of a sequence program at the time of actual operation.

【0028】さらに、編集支援装置8からの入力によっ
て、デバッグ用演算実行部31および通常演算実行部3
2のいずれかを選択して実行するようにしたので、誰で
も簡単に実行部の選択を行うことが可能となる。
Further, in response to the input from the editing support device 8, the debug operation execution unit 31 and the normal operation execution unit 3
2 is selected and executed, so that anyone can easily select the execution unit.

【0029】また、デバッグ終了後、編集支援装置8に
よって通常演算実行部32を選択してから、当該編集支
援装置8をプログラマブルコントローラ1から取り外す
ようにしたので、デバッグ用演算実行部31および通常
演算実行部32のいずれかを選択することができなくな
り、実稼働時、誤ってデバッグ用演算実行部31によっ
てシーケンスプログラムが実行されることを未然に防止
することを容易に行うことができる。
After the debugging, the editing support device 8 selects the normal operation execution unit 32 and then removes the editing support device 8 from the programmable controller 1. Therefore, the debugging operation execution unit 31 and the normal operation It becomes impossible to select any one of the execution units 32, and it is possible to easily prevent the execution of the sequence program by the debugging operation execution unit 31 from being erroneously performed during actual operation.

【0030】さらに、デバッグ用演算実行部31の実行
時、CPU3がエラーを検出すると、当該CPU3は、
編集支援装置8にエラー信号を出力するように構成され
ているので、シーケンスプログラムおよび入力データの
エラー箇所を編集支援装置8で逐次確認および修正する
ことができ、デバッグ作業をスムーズに、かつ、確実に
行うことができる。
Further, when the CPU 3 detects an error during execution of the debug operation execution unit 31, the CPU 3
Since the configuration is such that an error signal is output to the editing support device 8, error portions of the sequence program and the input data can be sequentially confirmed and corrected by the editing support device 8, and the debugging work can be performed smoothly and reliably. Can be done.

【0031】なお、本発明は前記実施の形態に限定され
るものではなく、本発明の目的を達成できる他の構成等
を含み、以下に示すような変形等も本発明に含まれる。
例えば、前記実施形態では、CPUは、編集支援装置か
ら出力される信号に基づいて、デバッグ用演算実行部お
よび通常演算実行部を選択して実行していたが、これに
限らず、例えば、シーケンスプログラムに、デバッグ用
演算実行部および通常演算実行部のいずれかを選択する
命令を含めておき、演算処理手段が、この命令を処理す
ることにより、デバッグ用演算実行部および通常演算実
行部を選択して実行するようにしてもよい。このように
すれば、ユーザがデバッグ用演算実行部および通常演算
実行部のいずれかを選択する命令を含んだシーケンスプ
ログラムを作成すればよく、プログラマブルコントロー
ラにデバッグ用演算実行部および通常演算実行部のいず
れかを選択する機能を設ける必要がないので、当該プロ
グラマブルコントローラの構成を簡易にすることがで
き、製造を容易に行うことができる。
It should be noted that the present invention is not limited to the above-described embodiment, but includes other configurations that can achieve the object of the present invention, and also includes the following modifications.
For example, in the above-described embodiment, the CPU selects and executes the debug calculation execution unit and the normal calculation execution unit based on a signal output from the editing support device. The program includes an instruction for selecting one of the debug operation execution unit and the normal operation execution unit, and the operation processing unit processes the instruction to select the debug operation execution unit and the normal operation execution unit. May be executed. With this configuration, the user only has to create a sequence program including an instruction for selecting one of the debug operation execution unit and the normal operation execution unit. Since there is no need to provide a function for selecting either one, the configuration of the programmable controller can be simplified, and manufacturing can be performed easily.

【0032】また、前記実施形態では、CPUは、エラ
ーを検出した場合に、編集支援装置にエラー信号を出力
するように構成されていたが、これに限らず、例えば、
エラーを検出した場合に、プログラマブルコントローラ
から音が出るようになっていたり、単に自動的にシーケ
ンスプログラムが強制終了するようになっていてもよ
く、要するに、プログラムミスがわかればよく、その構
成は、実施に当たって適宜決めればよい。
In the above-described embodiment, the CPU is configured to output an error signal to the editing support device when an error is detected. However, the present invention is not limited to this.
When an error is detected, a sound may be output from the programmable controller, or the sequence program may be automatically terminated forcibly. In short, it is sufficient if a program error is found. It may be determined appropriately in implementation.

【0033】[0033]

【発明の効果】以上に述べたように、本発明のプログラ
マブルコントローラによれば、演算処理手段を、エラー
チェックを行いながら前記シーケンスプログラムを実行
するデバッグ用演算実行部と、エラーチェックなしに高
速に前記シーケンスプログラムを実行する通常演算実行
部とを備えて構成し、これらのいずれか一方を選択して
実行するようにしたので、デバッグ作業が容易にでき、
実稼働時にシーケンスプログラムの実行時間を確保する
ことができるという効果がある。
As described above, according to the programmable controller of the present invention, the arithmetic processing means is provided with a debugging arithmetic execution unit for executing the sequence program while performing an error check, and at a high speed without an error check. A normal operation execution unit for executing the sequence program is provided, and any one of them is selected and executed.
There is an effect that the execution time of the sequence program can be secured during actual operation.

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

【図1】本発明の一実施形態におけるプログラマブルコ
ントローラの構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a programmable controller according to an embodiment of the present invention.

【図2】前記実施形態におけるプログラマブルコントロ
ーラの動作を示すフローチャートである。
FIG. 2 is a flowchart showing an operation of the programmable controller in the embodiment.

【図3】前記実施形態におけるプログラマブルコントロ
ーラの動作を示すフローチャートである。
FIG. 3 is a flowchart showing an operation of the programmable controller in the embodiment.

【図4】前記実施形態におけるプログラマブルコントロ
ーラの動作を示すフローチャートである。
FIG. 4 is a flowchart showing an operation of the programmable controller in the embodiment.

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

1 プログラマブルコントローラ 3 演算処理手段であるCPU 8 編集支援装置 31 デバッグ用演算実行部 32 通常演算実行部 DESCRIPTION OF SYMBOLS 1 Programmable controller 3 CPU which is an arithmetic processing means 8 Editing support device 31 Calculating execution part 32 for debugging 32 Normal calculation executing part

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】ユーザが作成したシーケンスプログラムを
実行する演算処理手段を備え、外部から入力した信号
を、この演算処理手段で前記シーケンスプログラムに基
づいて演算処理し、外部機器に制御信号を出力するプロ
グラマブルコントローラであって、 前記演算処理手段は、エラーチェックを行いながら前記
シーケンスプログラムを実行するデバッグ用演算実行部
と、エラーチェックなしに高速に前記シーケンスプログ
ラムを実行する通常演算実行部とを備え、これらのいず
れか一方を選択して実行することを特徴とするプログラ
マブルコントローラ。
An arithmetic processing means for executing a sequence program created by a user, wherein the arithmetic processing means performs arithmetic processing on a signal input from the outside based on the sequence program, and outputs a control signal to an external device. A programmable controller, wherein the arithmetic processing unit includes a debugging arithmetic execution unit that executes the sequence program while performing error checking, and a normal arithmetic execution unit that executes the sequence program at high speed without error checking. A programmable controller characterized in that one of these is selected and executed.
【請求項2】請求項1に記載のプログラマブルコントロ
ーラにおいて、 前記シーケンスプログラムには、前記デバッグ用演算実
行部および通常演算実行部のいずれかを選択する命令が
含まれ、 前記演算処理手段は、この命令を処理することにより、
前記デバッグ用演算実行部および通常演算実行部を選択
して実行することを特徴とするプログラマブルコントロ
ーラ。
2. The programmable controller according to claim 1, wherein the sequence program includes an instruction for selecting one of the debug operation execution unit and the normal operation execution unit. By processing the instructions,
A programmable controller, wherein the debug operation execution unit and the normal operation execution unit are selected and executed.
【請求項3】請求項1に記載のプログラマブルコントロ
ーラにおいて、 前記シーケンスプログラムを編集する編集支援装置が接
続され、 前記演算処理手段は、前記編集支援装置から出力される
信号に基づいて、前記デバッグ用演算実行部および通常
演算実行部を選択して実行することを特徴とするプログ
ラマブルコントローラ。
3. The programmable controller according to claim 1, wherein an editing support device for editing the sequence program is connected, and wherein the arithmetic processing unit is configured to execute the debugging based on a signal output from the editing support device. A programmable controller, which selects and executes an operation execution unit and a normal operation execution unit.
【請求項4】請求項3に記載のプログラマブルコントロ
ーラにおいて、 前記デバッグ用演算実行部の実行時、前記演算処理手段
が所定のエラーを検出すると、当該演算処理手段は、前
記編集支援装置にエラー信号を出力するように構成され
ていることを特徴とするプログラマブルコントローラ。
4. The programmable controller according to claim 3, wherein, when executing the debug operation execution unit, the operation processing unit detects a predetermined error, the operation processing unit sends an error signal to the editing support device. A programmable controller characterized in that it is configured to output the following.
JP2000172217A 2000-06-08 2000-06-08 Programmable controller Withdrawn JP2001350508A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000172217A JP2001350508A (en) 2000-06-08 2000-06-08 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000172217A JP2001350508A (en) 2000-06-08 2000-06-08 Programmable controller

Publications (1)

Publication Number Publication Date
JP2001350508A true JP2001350508A (en) 2001-12-21

Family

ID=18674652

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000172217A Withdrawn JP2001350508A (en) 2000-06-08 2000-06-08 Programmable controller

Country Status (1)

Country Link
JP (1) JP2001350508A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9336114B2 (en) 2012-07-24 2016-05-10 Samsung Electronics Co., Ltd. Apparatus and method for detecting error

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9336114B2 (en) 2012-07-24 2016-05-10 Samsung Electronics Co., Ltd. Apparatus and method for detecting error

Similar Documents

Publication Publication Date Title
JP2526688B2 (en) Programmable controller and partial execution method of sequence program
JP2006293544A (en) Numerical control system
JP2003248631A (en) Memory control circuit and memory control method
JP2001350508A (en) Programmable controller
JPS595931B2 (en) Address stop method for arithmetic processing system
JPH10149317A (en) Information processor
JP2003091301A (en) Error prevention method for programmable controller
JPH06314190A (en) Electronic device
KR100436003B1 (en) Method for loading a device driver, more specifically correlated to loading the device driver on a memory through a dos prompt after a computer system is completely booted up
JP3024719B2 (en) Arithmetic processing method of programmable controller
JP3074809B2 (en) Programmable controller
JPH0635757A (en) Abnormality detector of cpu
JP3441262B2 (en) Data processing device
JP2762665B2 (en) Blog programming device for programmable controller
JPH07287660A (en) Interruption processing method for programmable controller
JPH09319608A (en) Software development supporting device
JPS6118045A (en) Detecting system of program runaway
JPH07295670A (en) Starting method for computer system
JPH0764822A (en) Microcomputer
KR20020061195A (en) Program update system for flash memory and control method thereof
JPS63126007A (en) Programmable controller
JPH08185319A (en) Microcomputer and its program correction method
JPH08328867A (en) Program confirmation method for digital signal processor and digital signal processor system
JPH11338690A (en) Flash memory, firmware use system device and firmware rewriting method
JPS6344241A (en) Interruption processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070904