JPS59216202A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPS59216202A
JPS59216202A JP9046883A JP9046883A JPS59216202A JP S59216202 A JPS59216202 A JP S59216202A JP 9046883 A JP9046883 A JP 9046883A JP 9046883 A JP9046883 A JP 9046883A JP S59216202 A JPS59216202 A JP S59216202A
Authority
JP
Japan
Prior art keywords
instruction
output
stored
tracing
start point
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
Application number
JP9046883A
Other languages
Japanese (ja)
Inventor
Kazuaki Tomita
富田 一彰
Tamotsu Takagi
高木 保
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
Tateisi Electronics Co
Omron Tateisi Electronics Co
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tateisi Electronics Co, Omron Tateisi Electronics Co filed Critical Tateisi Electronics Co
Priority to JP9046883A priority Critical patent/JPS59216202A/en
Publication of JPS59216202A publication Critical patent/JPS59216202A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/058Safety, monitoring

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To monitor easily the execution state of user instructions by detecting the number of times of execution of a user instruction and displaying execution states of user instructions before and after this detection point. CONSTITUTION:A set output number A is stored in a register R9 of an RAM 6, and a set number N of an output instruction is stored in a register R10 of the RAM 6. It is discriminated whether a loaded instruction is an output instruction or not; and if it is detected that this loaded instruction is an output instruction, the number of times of execution is counted, and the time when this counted number coincides with said number N is the start point of tracing. When tracing is started, the instruction one step before the start point of tracing, the instruction at the start point of tracing, the instruction one step after the start point of tracing, and their addresses which are stored in registers R0-R8 of the RAM 6 are displayed on a display device 7A. The user watches this display to grasp exactly how the control of a user program branches and changes before and after the set start point.

Description

【発明の詳細な説明】 (発明の分野) この発明はプログラマブル・コントローラ、特に、命令
実行過程をモニタし得るプログラマブル・コントローラ
に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to programmable controllers, and more particularly to programmable controllers capable of monitoring instruction execution processes.

(発明の背景) 従来のプログラマブル・コントローラにおいては、モニ
タ対象を特定する情報として任意のプログラムアドレス
を設定人力づると、ユーザプログラムの実行時に、入力
したアドレスの命令およびその命令の実行による入出力
状態がモニタ表示される、いわゆるトレース機能が備わ
っているものが多い。
(Background of the Invention) In conventional programmable controllers, when an arbitrary program address is manually set as information for specifying a monitoring target, when a user program is executed, the command at the input address and the input/output state due to the execution of the command are displayed. Many of them have a so-called trace function that displays the information on the monitor.

しかしながら、トレース対象を特定する情報として出力
番号を指定し、実際の制御の流れの中で上記出力番号を
出力として使用するくその出力番号のデータを更新する
処理を含む)命令が所定回数実行されたときを起点とし
、その前後に実行された命令をその順序に抽出し、表示
するモニタ機能あるいはトレース機能を有づ′るものは
なかった。
However, if an instruction (including processing that specifies an output number as information that identifies the trace target and updates the data of the output number that uses the output number as an output in the actual flow of control) is executed a predetermined number of times. There has been no monitor or trace function that extracts and displays instructions executed before and after that time, in that order, starting from when the command was executed.

プログラマブル・コントローラの使用者にとって、プロ
グラム実行時に命令がO番地より順次実行されていく場
合には、従来のトレース機能で制御の流れを充分に確認
することができる。しかし、ユーザプログラムが制御の
流れを変える分岐命令(ジャンプ命令や条件ジャンプ命
令)を含んでいる場合、従来のトレース機能では、ユー
ザプログラム中の特定の出力番号を含んだ命令の実行結
果で、制御の流れがどのように分岐・変化するのがを確
認するのは容易でなかった。
For users of programmable controllers, when instructions are executed sequentially from address O during program execution, the conventional trace function can sufficiently confirm the flow of control. However, if the user program contains branch instructions (jump instructions or conditional jump instructions) that change the flow of control, the conventional trace function uses the execution results of instructions that include a specific output number in the user program to control It was not easy to see how the flow branched and changed.

例えば、第1図に示づように、ユーザプログラムが、制
御1から分岐命令によって制御2ど制御3の何れかへ分
岐づ°るように構成されている場合、従来のトレース機
能では、上記分岐命令の条件設定の内容によっては、特
定番号の人出ノjの状態について、どのステップへ制御
が移り変化してい(のかを簡単にモニタすることができ
ず、非常に不便であった。
For example, as shown in FIG. 1, if a user program is configured to branch from control 1 to either control 2 or control 3 using a branch instruction, the conventional trace function cannot Depending on the contents of the condition settings of the command, it is not possible to easily monitor to which step the control is being transferred to and changing the state of the turnout number j, which is very inconvenient.

(発明の目的) この発明の目的は、指定した出力番りのデータを更新す
る処理を含む命令が指定した回数だけ実行されたのを検
出し、その検出点を起点とし、前後のユーザ命令の実行
状態、すなわち制御の流れの状態を監視することが容易
に行なえるようにしたトレース機能を有するプログラマ
ブル・コントローラを提供することにある。
(Objective of the Invention) The object of the present invention is to detect when an instruction including the process of updating data at a specified output number has been executed a specified number of times, and to use that detection point as a starting point to update the previous and subsequent user instructions. It is an object of the present invention to provide a programmable controller having a trace function that allows easy monitoring of the execution state, that is, the state of the flow of control.

(発明の構成と効果) 上記の目的を達成するために、この発明のプログラマブ
ル・コントローラは、トレース起点を特定する出力番号
Δおよび実行回数Nを任意に設定入力するための手段と
、上記入力番号Aのデータを更新づ゛る処理を含んだユ
ーザ命令の実行回数を計数し、その回数が上記設定回数
Nになったとき1〜レース開始指令を発づ−る手段と、
このi−レース開始指令に応答し、該指令が生じた直前
および直後に実行された所定ステップ分のニー沓ア命令
の内容および/またはユーザ命令のアドレスを一時記憶
する手段と、この一時記憶手段による記憶内容を表示す
る手段とを設けたことを特徴とする。
(Structure and Effects of the Invention) In order to achieve the above object, the programmable controller of the present invention includes means for arbitrarily setting and inputting an output number Δ for specifying a trace starting point and the number of executions N, and means for counting the number of times a user command including a process of updating data of A is executed, and issuing a race start command when the number of times reaches the set number N;
In response to the i-race start command, a means for temporarily storing the contents of the knee-to-wheel command and/or the address of the user command for a predetermined number of steps executed immediately before and after the i-race start command, and the temporary storage means The present invention is characterized in that it is provided with means for displaying the stored contents.

このように構成されたトレース機能によれば、ある分岐
命令で制御状態がどのように変化していくかを監視する
ためのトレースの起点として、ある出力番号のデータを
更新する処理を含む命令が所定回数実行されたときとい
う条件設定をすることができ、分岐命令を含んだユーザ
プログラムの実際の制御の流れをモニタすることが容易
に行なえる。
According to the trace function configured in this way, an instruction that includes processing to update data of a certain output number is used as the starting point of a trace to monitor how the control state changes with a certain branch instruction. It is possible to set a condition that the program has been executed a predetermined number of times, and it is easy to monitor the actual flow of control of a user program including branch instructions.

(実施例の説明) 第2図はこの発明が適用されるプログラマブル・=Iン
トローラの概略構成を示すブロック図である。このプロ
グラマブル・コントローラは、ユーザプログラムを記憶
するメモリ1と、被制御系とインターフェイスされる入
出力回路2と、入出力データを記憶するメモリ3と、シ
ステムプログラムを記憶づ−るROM4と、ROM 4
に記憶されたシステムプログラムおよびメモリ1のユー
ザプログラムに従って制御・演算処理を実行するCPU
5と、システム動作中の各種データの一時記憶用として
利用されるR A M 6と、使用者によって操作され
るプログラムコンソール部(以下プロコンという)7と
から構成されている。
(Description of Embodiments) FIG. 2 is a block diagram showing a schematic configuration of a programmable =I controller to which the present invention is applied. This programmable controller includes a memory 1 that stores a user program, an input/output circuit 2 that is interfaced with a controlled system, a memory 3 that stores input/output data, a ROM 4 that stores a system program, and a ROM 4 that stores a system program.
A CPU that executes control and arithmetic processing according to the system program stored in the memory 1 and the user program stored in the memory 1.
5, a RAM 6 used for temporary storage of various data during system operation, and a program console section (hereinafter referred to as a program console) 7 operated by the user.

プロコン7は、ケース外部の操作面に表示器7Aおよび
キーボード7Bをケース内部には制御回路7Cを備えて
いる。プロコン7の操作面の具体例を第3図に示してい
る。
The professional computer 7 includes a display 7A and a keyboard 7B on an operation surface outside the case, and a control circuit 7C inside the case. A specific example of the operation surface of the processor 7 is shown in FIG.

第4図はこの発明のトレース処理を含んだシステムプロ
グラムの概要を示すフローチャートである。また、第5
図はこの発明のトレース処理を行なうためにRAM6に
設定されたレジスタ類のマツプである。
FIG. 4 is a flowchart showing an overview of a system program including trace processing according to the present invention. Also, the fifth
The figure is a map of registers set in the RAM 6 for performing the trace processing of the present invention.

まず、この発明のトレース処理について包括的に説明す
る。トレース起点を特定する情報として、出力番号を設
定するが、設定した出力番号Aは、第5図に示すように
、レジスタR9にストアされる。また、この起点を特定
する情報として出力番号Aのデータを更新する処理を含
んだ命令(以下これを出力命令と称する)の実行回数も
設定するが、設定された回数NはレジスタR10にスト
アされる。これら番号および回数の設定は、第4図にお
けるステップ100のイニシャル処理に続くステップ1
01のプロコンザービス処理にて受付けられる。また同
時に、上記番号および回数を設定した後に、プロコン7
にてトレースの指令入力を与えると、トレース指令フラ
グFOがセットされる。
First, the trace processing of the present invention will be comprehensively explained. An output number is set as information for specifying the trace starting point, and the set output number A is stored in register R9 as shown in FIG. Additionally, the number of executions of an instruction (hereinafter referred to as an output instruction) that includes the process of updating the data of output number A is also set as information for specifying this starting point, but the set number of times N is stored in register R10. Ru. These numbers and the number of times are set in step 1 following the initial processing of step 100 in FIG.
01 will be accepted through ProConservation processing. At the same time, after setting the above number and number of times,
When a trace command input is given at , a trace command flag FO is set.

以上の処理が上記プロコンザービス処理にて行なわれる
。その後ステップ102以降に進み、以下に説明でるよ
うに1−レース処理がなされるが、その処理によって一
時記憶すベきモニタデータはレジスタRO〜R8に順番
にストアされる。つまり、この実施例では、ステップ−
1〜7と示すエリアにそれぞれモニタデータが格納でき
、全部で9命令分のモニタデータがここに一時記憶され
、プロコン7の表示器7Aに表示される。なJ3、レジ
スタRO−R8にストアされたモニタデータを表示器7
Aに表示する処理は、先のステップ1゜1のプロコン沓
ナービス処理にて行なわれる。
The above processing is performed in the professional maintenance processing. Thereafter, the process advances to step 102 and subsequent steps, and 1-race processing is performed as described below, whereby monitor data to be temporarily stored is sequentially stored in registers RO to R8. That is, in this example, steps -
Monitor data can be stored in areas 1 to 7, respectively, and monitor data for a total of 9 instructions is temporarily stored here and displayed on the display 7A of the processor 7. J3 displays the monitor data stored in register RO-R8 on display 7.
The process displayed at A is performed in the previous step 1.1 of the professional controller service process.

ステップ102では、゛ニー11プログラムメモリ1か
ら実行アドレスの命令をロードする。次のステップ10
3ではトレース指令フラグFOがセットされているか否
かをチェックする。トレース指令が与えられていなけれ
ばステップ106にジャンプし、ここでその命令を実行
し、続くステップ107で実行アドレスを更新し、最初
のステップ101に戻る。
In step 102, the instruction at the execution address is loaded from the knee 11 program memory 1. Next step 10
In step 3, it is checked whether the trace command flag FO is set. If no trace command has been given, the process jumps to step 106, where the instruction is executed, the execution address is updated in the following step 107, and the process returns to the first step 101.

トレース指令が与えられている場合、ステップ104に
進み、トリガフラグF1がセットされているか否かをチ
ェックする。このトリガフラグ「1は1次に説明するよ
うに、出力番号Aを含んだ出力命令がN回実行されたと
ぎにセラ1−される。
If a trace command has been given, the process proceeds to step 104, where it is checked whether the trigger flag F1 is set. This trigger flag "1" is set to 1 when the output command including the output number A is executed N times, as will be explained next.

まず、トリガフラグF1がセットされていないとして説
明りると、その場合はステップ108に進む。
First, if the trigger flag F1 is not set, the process proceeds to step 108.

ステップ108では、ステップ102でロードした命令
が出ツノ命令か、ずなわち出力データを更新する命令か
否かを判断する。出力命令でなければステップ114に
ジャンプし、その命令とアドレスを上記レジスタROに
一旦スドアし、その後先に説明したステップ106へ進
む。
In step 108, it is determined whether the instruction loaded in step 102 is an outgoing instruction, that is, an instruction to update output data. If it is not an output instruction, the process jumps to step 114, stores the instruction and address in the register RO, and then proceeds to step 106 described above.

ステップ108で出力命令であることが検出された場合
、ステップ109に進み、その出力命令によって更新す
る出力データの出力番号がレジスタR9に設定された番
号Aと一致するか否かを判断する。一致しない場合は、
先に説明したステップ104→106と進む。
If it is detected in step 108 that it is an output command, the process proceeds to step 109, where it is determined whether the output number of the output data to be updated by the output command matches the number A set in register R9. If it doesn't match,
The process proceeds from step 104 to step 106 described above.

ステップ109で設定した出力番号へについての出ノj
命令であることが検出された場合、ステップ110に進
み、初)Illリセットされているカウンタnを歩進す
る。続くステップ111でカウンタ11の目数値がレジ
スタ、R10に設定した回数Nと一致するか否かを判断
する。51数値nが設定数Nに達していない場合、先に
説明し1cステツプ114→106と進む。
Output number for the output number set in step 109
If it is detected that it is a command, the process proceeds to step 110, where the counter n, which has been reset (for the first time), is incremented. In the following step 111, it is determined whether the count value of the counter 11 matches the number N set in the register R10. 51 If the numerical value n has not reached the set number N, this will be explained first and the process proceeds from step 114 to step 106.

実行回数のt1数値nが指定回数Nと一致づ−ると、こ
のどきがトレースの起点であり、ステップ111からス
テップ112に進み、トリガフラグF1をセットする。
When the t1 value n of the number of executions matches the specified number N, this is the starting point of the trace, and the process proceeds from step 111 to step 112, where the trigger flag F1 is set.

続くステップ113で、レジスタR1に、このときの実
行アドレスとその命令内容をストアする。その後ステッ
プ106→107→101→102→103→104と
進み、ここで1へリガフラグF1がセットされているこ
とから、今度はステップ105へ進む。
In the following step 113, the execution address and the contents of the instruction at this time are stored in the register R1. Thereafter, the process proceeds to steps 106→107→101→102→103→104, and since the rigged flag F1 has been set to 1, the process then proceeds to step 105.

ステップ105では、ステップ102でロードした命令
とそのアドレスをレジスタR2〜R8に順番にストアし
ていく。続くステップ200で、レジスタR8まで命令
およびアドレスをストアしたか否かがチェックされ、レ
ジスタR8に達りるまではステップ106へ直接進み、
レジスタR8まで命令およびアドレスをストアしてしま
うと、ステップ201に進み、フラグ[:0とFlをリ
セットし、ステップ106に進む。
In step 105, the instructions loaded in step 102 and their addresses are sequentially stored in registers R2 to R8. In the following step 200, it is checked whether the instruction and address have been stored up to register R8.
Once the instructions and addresses have been stored up to register R8, the process proceeds to step 201, where the flag [:0 and Fl are reset, and the process proceeds to step 106.

ステップ201が実行されたときには、レジスタRO〜
R8に、上述したトレース起点の前1スデツプの命令、
1〜レ一ス起点の命令、および後7スデツプの命令とそ
れぞれのアドレスが格納されている。このレジスタRO
〜R8に格納されたデータが、ステップ101のプロコ
ン1ナービス処理が実行されることにより、表示器7A
に表示される。この表示を見ることによって、使用省は
、設定した起点の前後でユーザプログラムの制御がどの
ように分岐し変化していくかを的確に把1FEI−るこ
とができる。
When step 201 is executed, registers RO~
In R8, the instruction one step before the trace start point mentioned above,
The instructions from 1 to the start point of the first step, the instructions for the next 7 steps, and their respective addresses are stored. This register RO
The data stored in ~R8 is displayed on the display 7A by executing the program controller 1 service process in step 101.
will be displayed. By looking at this display, the operator can accurately grasp how the control of the user program branches and changes before and after the set starting point.

なお、上記の実施例では、モニタデータとして命令のア
ドレスとその命令内容を両方とも表示していだが、この
発明はこれに限定されず、命令アドレスか命令内容の何
れか一方を表示覆るだけでも、この発明の効果はほぼ達
成することができる。
Note that in the above embodiment, both the instruction address and the instruction content are displayed as monitor data, but the present invention is not limited to this, and even if only one of the instruction address and the instruction content is displayed and hidden, The effects of this invention can almost be achieved.

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

第1図は分岐命令を含んだコーザプログラムの説明図、
第2図はこの発明が適用されたプログラマブル・コント
ローラの概略構成を示J−ブロック図、第3図は第2図
にJ3けるブOグラムコンソール7の概略外観を示す図
、第4図は第2図におりるCPU5によって実行される
この発明のトレース処理を含んだシステムプログラムの
フローチト−(〜、第5図は上記トレース処理で使用さ
れる1(八Mの部分的なマツプである。 1・・・ユーザプログラムメモリ 2・・・入出力回路 3・・・入出カメモリ 4・・・ROM 5・・・CPU 6・・・RAM 7・・・プログラムコンソール
Figure 1 is an explanatory diagram of a causer program including branch instructions.
FIG. 2 is a block diagram showing a schematic configuration of a programmable controller to which the present invention is applied, FIG. 3 is a diagram showing a schematic appearance of the programmable controller 7 in FIG. 2, and FIG. 2 is a flowchart of a system program including the trace processing of the present invention executed by the CPU 5 shown in FIG. ...User program memory 2...Input/output circuit 3...Input/output memory 4...ROM 5...CPU 6...RAM 7...Program console

Claims (1)

【特許請求の範囲】[Claims] (1)、トレース起点を特定覆る出力番号Aおよび実行
回数Nを任意に設定人力するだめの手段と、上記入力番
号Δのデータを更新する処理を含んだユーザ命令の実行
回数を計数し、その回数が上記設定回数Nになったとき
トレース開始指令を発J。 る手段と、このトレース開始指令に応答し、該指令が生
じ1〔直前および直接に実行された所定ステップ分のユ
ーザ命令の内容および/またはユーザ命令のアドレスを
一時記憶する手段と、この一時記憶手段による記憶内容
を表示する手段とを備えたことを特徴とするプログラマ
ブル・コントローラ。
(1) Specify the trace starting point, arbitrarily set the output number A and the number of executions N, and count the number of executions of the user command including the process of updating the data of the input number Δ. When the number of times reaches the set number N, a trace start command is issued. means for temporarily storing the content and/or the address of the user command for a predetermined step immediately and directly executed in response to the trace start command; A programmable controller comprising means for displaying the contents stored by the means.
JP9046883A 1983-05-23 1983-05-23 Programmable controller Pending JPS59216202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9046883A JPS59216202A (en) 1983-05-23 1983-05-23 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9046883A JPS59216202A (en) 1983-05-23 1983-05-23 Programmable controller

Publications (1)

Publication Number Publication Date
JPS59216202A true JPS59216202A (en) 1984-12-06

Family

ID=13999425

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9046883A Pending JPS59216202A (en) 1983-05-23 1983-05-23 Programmable controller

Country Status (1)

Country Link
JP (1) JPS59216202A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62108310A (en) * 1985-11-06 1987-05-19 Mitsubishi Electric Corp Controller for operating panel
JPS62243008A (en) * 1986-04-15 1987-10-23 Fanuc Ltd Signal trace controlling system for pmc

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62108310A (en) * 1985-11-06 1987-05-19 Mitsubishi Electric Corp Controller for operating panel
JPS62243008A (en) * 1986-04-15 1987-10-23 Fanuc Ltd Signal trace controlling system for pmc

Similar Documents

Publication Publication Date Title
JPS59216202A (en) Programmable controller
JPS59212906A (en) Programmable controller
JPH1091475A (en) Fault restoration device, fault restoration method and program medium for fault restoration
JPS6253859B2 (en)
JPH08278809A (en) Plant controller
JPS63284644A (en) Instruction address output circuit
JP3167245B2 (en) Programmable controller operating state monitoring device
JPH0668369A (en) System monitoring abnormality progress reproducing device
JPS62162105A (en) Flow chart type programmable controller
JPS59183405A (en) Programmable controller
JP2877075B2 (en) Instrument control device and method
JPH0581197A (en) Data processor
JPS6331142Y2 (en)
JPS59157718A (en) Operation state monitoring system of programmable controller
JPH0354645A (en) Program execution time measuring instrument
JPS6215606A (en) Method for confirming executing speed of programmable controller
JPH08221300A (en) Program simulator
JPH08147026A (en) Plant operation controller
JPH01112438A (en) Operand tracing system
JPH1074135A (en) Information processor
JPH05216444A (en) Screen display control device
JPH11143637A (en) Touch panel controller and its method
JPH04216103A (en) User program tracing system for programmable controller
JPH06161516A (en) Checking method for sequence program
JPH0277947A (en) Measuring device