JPS60207915A - How to display intermediate calculation results in a compiler-type sequence controller - Google Patents
How to display intermediate calculation results in a compiler-type sequence controllerInfo
- Publication number
- JPS60207915A JPS60207915A JP59065319A JP6531984A JPS60207915A JP S60207915 A JPS60207915 A JP S60207915A JP 59065319 A JP59065319 A JP 59065319A JP 6531984 A JP6531984 A JP 6531984A JP S60207915 A JPS60207915 A JP S60207915A
- Authority
- JP
- Japan
- Prior art keywords
- instruction
- interrupt
- controller
- program
- arithmetic result
- 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
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/10—Plc systems
- G05B2219/14—Plc safety
- G05B2219/14088—Display result of computation, calculation
Landscapes
- Testing And Monitoring For Control Systems (AREA)
- Programmable Controllers (AREA)
Abstract
Description
【発明の詳細な説明】
(イ)産業上の利用分野
本発明は、フンバイラ形シーケンスコントローラにおけ
る途中演算結果の表示方法に関する。DETAILED DESCRIPTION OF THE INVENTION (A) Field of Industrial Application The present invention relates to a method for displaying intermediate calculation results in a Funbaira type sequence controller.
(ロ)従来技術
一般1こ、シーケンスコントローラにおいて、演算途中
の結果を取り出して表示する場合には、この演算結果を
メモリに一旦スドアさせる必要がある。インクプリタ形
のものであれば、その都度命令を機械語に翻訳しながら
実行していくので、必然的に逐次演算結果をメモリにス
トアさせている。(b) Prior Art General 1. In a sequence controller, when a result in the middle of a calculation is retrieved and displayed, it is necessary to temporarily store the result in a memory. If it is an ink interpreter type, the instructions are translated into machine language and executed each time, so the results of sequential operations are necessarily stored in memory.
したがって、途中演算結果、を自由に取り出して表示す
ることができる。ところが、コンパイラ形のものでは、
プログラムの全部を(蔑械語に翻訳してから実行に移る
関係上、途中の演算結果を表示するには、ある1つの演
算の後に、この演算結果をメモリにストアさせる演算を
別途性なう必要がある。この処理のために逐次演算のす
べてにメモリストアの演算機能を付加すると、大きな記
憶容量が必要となってコスト高となるばかりでなく、演
算処理時間も長くかかるようになって効率が悪い。Therefore, intermediate calculation results can be freely extracted and displayed. However, in the compiler version,
Since the entire program is translated into derogatory language and then executed, in order to display the results of an intermediate operation, after a certain operation, a separate operation must be performed to store the result of this operation in memory. If a memory store calculation function is added to all sequential calculations for this processing, not only will a large storage capacity be required, resulting in high costs, but also the calculation processing time will become long, reducing efficiency. It's bad.
このため、従来のコンパイラ形シーケンスコントローラ
では途中演算結果を任意に取り出して表示することが困
難であった。For this reason, with conventional compiler-type sequence controllers, it has been difficult to arbitrarily extract and display intermediate calculation results.
(ハ)目的
本発明は、従来のかかる問題点を解決し、ノモリストア
用の演算機能を別途付加せずども演算途中の結果を任意
に取り出して表示できるようにすることを目的とする。(c) Objective The present invention aims to solve the above-mentioned conventional problems and to make it possible to arbitrarily extract and display the results of a computation in the middle of a computation without adding a separate computation function for memory storage.
(ニ)構成
本発明は、このような目的を達成するため、表示要求信
号に応答して、シーケンスプログラム内の所望の途中演
算結果が得られる命令の次の命令を出力命令に書き替え
、書き替えられた出力命令の実行により得られる出力信
号で割り込みをかけ、この割り込みによって途中演算結
果をメモリにストアさせる演算結果表示プログラムを起
動させるようにしたことを特徴としている。(D) Structure In order to achieve such an object, the present invention rewrites the next instruction of the instruction that obtains the desired intermediate operation result in the sequence program into an output instruction in response to a display request signal. The present invention is characterized in that an interrupt is generated by an output signal obtained by executing the changed output instruction, and the interrupt activates a calculation result display program that stores intermediate calculation results in memory.
(ホ)実施例
以下、本発明を図面に示す一実施例に基づいて詳細に説
明する。第1図は、本発明に適用されるシーケンスコン
トローラの要部を示すブロック図である。同図において
、1はシーケンスコントローラを示し、2は割り込みを
受け付けることができるCPU、4はこのCPU2をア
クセスするメモリ、6は数種類の割り込みを制御する割
り込みコントローラである。割り込みコントローラ6に
は、CPU2からの出力命令に基づく出力信号Od、一
定周期ごとにシーケンス演算を起動させるためのサンプ
リングクロックC1および途中演算結果を表示するため
の表示要求信号Vdがそれぞれ入力され、割り込みフン
、トローラ6は、この各人力信Oc1.CI、Vdに応
答して割り込み信号1rをCPU2に出力する。この場
合の割り込みレベルは上位から出力信号Od、、サンプ
リングクロックCI、表示要求信号Vdの各類に設定さ
れている。(E) Example Hereinafter, the present invention will be explained in detail based on an example shown in the drawings. FIG. 1 is a block diagram showing the main parts of a sequence controller applied to the present invention. In the figure, 1 is a sequence controller, 2 is a CPU that can accept interrupts, 4 is a memory that accesses this CPU 2, and 6 is an interrupt controller that controls several types of interrupts. The interrupt controller 6 receives an output signal Od based on an output command from the CPU 2, a sampling clock C1 for starting sequence calculations at regular intervals, and a display request signal Vd for displaying intermediate calculation results. Hmph, Troller 6 is this individual power believer Oc1. An interrupt signal 1r is output to the CPU 2 in response to CI and Vd. In this case, the interrupt levels are set for the output signal Od, the sampling clock CI, and the display request signal Vd from the highest level.
CPtJ2は割り込みコントローラ6がらの割り込み信
号1rを受けて、どの種類の割り込みが発生したかを判
別することができる。また、メモリ4には、表示要求プ
ログラム、サンプリングプログラム、演算結果表示プロ
グラム等を含むシーケンスプログラムが予め記憶されて
いる。The CPtJ2 receives the interrupt signal 1r from the interrupt controller 6 and can determine which type of interrupt has occurred. Further, the memory 4 stores in advance sequence programs including a display request program, a sampling program, a calculation result display program, and the like.
次に、シーケンスプログラム1における途中演算結果の
表示手順について第2閃を参照して説明する。Next, the procedure for displaying intermediate calculation results in the sequence program 1 will be explained with reference to the second flash.
まず、キー繰作等によって割り込みコントローラ6に対
して表示要求信号Vdを入力する。そうすると、割り込
みコントローラ6からはこれに応答して割り込み信号1
rが出力されるので、この割り込み信号I「をCPtJ
2に与える。CPLJ2が割り込みを受け付けると、表
示要求プログラムが呼び出される。この表示要求プログ
ラムの実行により、メモリ4に記憶されているサンプリ
ングプログラムにおける所望の途中演算結果が得られる
命令の次段の命令を出力命令に書き替える。この書き替
えと同時に表示要求プログラム自体をウェイト状態にす
る。このウェイト状態で、次にシーケンス演算を起動さ
せるサンプリングクロックC1をパルス発生回路等から
割り込みコントローラ6に加えると、割り込みコントロ
ーラ6はこれに応答して割り込み信号1rを出力し、こ
れをCPU2に送出する。CPLI 2は、この割り込
みを受けイー1けると、サンプリングプログラムが起動
されれる。これにより、シーケンス演算を実行させる。First, a display request signal Vd is input to the interrupt controller 6 by keystrokes or the like. Then, in response to this, the interrupt controller 6 sends an interrupt signal 1.
Since r is output, this interrupt signal I' is output as CPtJ.
Give to 2. When CPLJ2 accepts an interrupt, a display request program is called. By executing this display request program, the next instruction of the instruction in the sampling program stored in the memory 4 that yields the desired intermediate calculation result is rewritten into an output instruction. At the same time as this rewriting, the display request program itself is placed in a wait state. In this wait state, when a sampling clock C1 for starting a sequence operation is applied to the interrupt controller 6 from a pulse generation circuit or the like, the interrupt controller 6 outputs an interrupt signal 1r in response and sends it to the CPU 2. . When the CPLI 2 receives this interrupt, the sampling program is started. This causes the sequence calculation to be executed.
シーケンス演算の実行中、所望の途中演算結果が得られ
2.7)命令の次の命令はすでに出力命令に書き替えら
れているので、CPLJ2からはこの出力命令に基づく
出力信号Odが出力され、これを割り込みコントローラ
6に与える。割り込みコントローラ6はCPU2からの
出力信号Odに応答して割り込み信号1rを発生し、こ
れを再度CPU2に送出する。したがって、CPU 2
がこの割り込みを受け付けると、演算結果表示プログラ
ムが起動される。演算結果表示プログラムの実行により
CPU2はシーケンス演算で得られた所望の途中演算結
果をメモリ4にストアし、次いでサンプリングプログラ
ムの出力命令を元の命令に復帰させて割り込み処理を終
了する。そして、再びサンプリングプログラムの復帰さ
せた命令、即ち、途中演算結果の得られた命令の次の命
令からシーケンス演算の続きを実行する。シーケンス演
算が終了すると、ウェイト状態になっていた表示要求プ
ログラムを再起動させてメモリ4にストアされた途中演
算結果をプリンタ、CRT等へ出力する。During execution of the sequence operation, the desired intermediate operation result is obtained and 2.7) Since the instruction following the instruction has already been rewritten to an output instruction, the CPLJ2 outputs an output signal Od based on this output instruction, This is given to the interrupt controller 6. The interrupt controller 6 generates an interrupt signal 1r in response to the output signal Od from the CPU 2, and sends it to the CPU 2 again. Therefore, CPU 2
When it accepts this interrupt, the calculation result display program is started. By executing the calculation result display program, the CPU 2 stores the desired intermediate calculation result obtained by the sequence calculation in the memory 4, and then restores the output command of the sampling program to the original command, thereby terminating the interrupt processing. Then, the sequence operation is continued again from the restored instruction of the sampling program, that is, the instruction next to the instruction for which the intermediate operation result was obtained. When the sequence calculation is completed, the display request program that has been in a wait state is restarted and the intermediate calculation results stored in the memory 4 are output to a printer, CRT, etc.
(へ)効果
以上のように、本発明によればメモリストア用の演W、
機能を別途付加することなく演算途中の結果を任意に取
り出して表示できることになる。また、演算処理時開も
短く効率がよい。従って、インタプリタ形のものと同様
な表示が可能となるという実用上優れた効果が得られる
。(f) Effects As described above, according to the present invention, the function W for memory store,
This means that it is possible to arbitrarily extract and display the results of a computation without adding any additional functionality. Furthermore, the opening time during arithmetic processing is short and efficient. Therefore, an excellent practical effect can be obtained in that a display similar to that of an interpreter type is possible.
図面は本発明の実施例を示すもので、第1図はシーケン
スコントローラの要部を示すブロック図、第2図は途中
演算結果の表示手順の説明図である。
1はシーケンスコントローラ、2ハCPtJ、4はメモ
リ、6は割り込みコントローラ、Odは出力信号、Ir
は割り込み要求信号。
出願人 株式会社 島津製作所
代理人 弁理士 円田和秀
第1図The drawings show an embodiment of the present invention, and FIG. 1 is a block diagram showing the main parts of a sequence controller, and FIG. 2 is an explanatory diagram of a procedure for displaying intermediate calculation results. 1 is a sequence controller, 2 is a CPtJ, 4 is a memory, 6 is an interrupt controller, Od is an output signal, Ir
is an interrupt request signal. Applicant Shimadzu Corporation Representative Patent Attorney Kazuhide Enda Figure 1
Claims (1)
内の所望の途中演算結果が得られる命令の次の命令を出
力命令に書き替え、書き替えられた出力命令の実行によ
り得られる出力信号で割り込みをかけ、この割り込みに
よって途中演算結果をメモリにストアさせる演算結果表
示プログラムを起動させるようにしたことを特徴とする
コンパイラ形シーケンスコントローラにおける途中演算
結果の表示方法。(1) In response to a display request signal, rewrite the instruction following the instruction that yields the desired intermediate operation result in the sequence program to an output instruction, and interrupt with the output signal obtained by executing the rewritten output instruction. 1. A method for displaying intermediate calculation results in a compiler-type sequence controller, characterized in that the interrupt activates a calculation result display program that stores the intermediate calculation results in memory.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59065319A JPS60207915A (en) | 1984-03-31 | 1984-03-31 | How to display intermediate calculation results in a compiler-type sequence controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP59065319A JPS60207915A (en) | 1984-03-31 | 1984-03-31 | How to display intermediate calculation results in a compiler-type sequence controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS60207915A true JPS60207915A (en) | 1985-10-19 |
Family
ID=13283468
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP59065319A Pending JPS60207915A (en) | 1984-03-31 | 1984-03-31 | How to display intermediate calculation results in a compiler-type sequence controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS60207915A (en) |
-
1984
- 1984-03-31 JP JP59065319A patent/JPS60207915A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2002127807A (en) | RESTARTED TRANSLATED TEAMS | |
JPS6134605A (en) | Controlling system of programmable controller | |
JPS60207915A (en) | How to display intermediate calculation results in a compiler-type sequence controller | |
JPS60207914A (en) | How to display intermediate calculation results in a compiler-type sequence controller | |
JPS62117003A (en) | Multi-cpu constitution programmable controller | |
JPH082727Y2 (en) | Programmable sequencer | |
JPH01119804A (en) | Scan time fixing system for programmable controller | |
JPS6130282B2 (en) | ||
JPH01297728A (en) | Microprogram start address generating system | |
KR900008536B1 (en) | Computer control system suitable for execution of sequence control and servo control | |
JPH08272420A (en) | Positioning device | |
JPS60225904A (en) | Programmable controller | |
JP2000090155A (en) | Calculating device for various expenditures | |
JPH04123229A (en) | Pipeline controller | |
JPH02181811A (en) | Information processor | |
JPH03233703A (en) | Sequence controller | |
JPH06139066A (en) | Digital signal processor | |
JPH02137054A (en) | Information processor | |
JPS63163543A (en) | Information processor | |
JPH0328905A (en) | Input/output transfer method for programmable controller | |
JPS6270907A (en) | Sequence controller | |
JPH01243124A (en) | Simulation method | |
JPS62295138A (en) | Address forming system | |
JPH0883188A (en) | A computer that performs multitasking | |
JPH0782370B2 (en) | Sequencer timer processor |