JPH1165620A - Programmable controller having pulse output instruction - Google Patents

Programmable controller having pulse output instruction

Info

Publication number
JPH1165620A
JPH1165620A JP22869997A JP22869997A JPH1165620A JP H1165620 A JPH1165620 A JP H1165620A JP 22869997 A JP22869997 A JP 22869997A JP 22869997 A JP22869997 A JP 22869997A JP H1165620 A JPH1165620 A JP H1165620A
Authority
JP
Japan
Prior art keywords
condition
previous
pulse output
storage means
programmable controller
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.)
Granted
Application number
JP22869997A
Other languages
Japanese (ja)
Other versions
JP3695078B2 (en
Inventor
Masaru Nakai
大 中井
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP22869997A priority Critical patent/JP3695078B2/en
Publication of JPH1165620A publication Critical patent/JPH1165620A/en
Application granted granted Critical
Publication of JP3695078B2 publication Critical patent/JP3695078B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a programmable controller in which the description amounts of a sequence program can be reduced by having an exclusive instruction for generating a pulse. SOLUTION: An address modification designated address is calculated from a condition storage area and an output storage area (S1). A condition at the time of the previous scan read from the condition storage area is compared with a condition obtained at the time of this time scan, and when the rising time is detected, 1 is stored in an accumulator 1 (S2). Also, when the rising time is not detected, 0 is stored in the accumulator. The value of this accumulator is transferred to the output storage area, and the change of the value of the output storage area is used as a pulse (S3).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、パルス出力命令を
持つプログラマブルコントローラに関するものである。
[0001] 1. Field of the Invention [0002] The present invention relates to a programmable controller having a pulse output command.

【0002】[0002]

【従来の技術】一般に、プログラマブルコントローラに
おいて、特定の条件の成立に基づいて制御を行なうため
にパルスを発生させることが多い。たとえば、押釦スイ
ッチの押操作に基づいて何らかの制御を行なうとすれ
ば、押操作の時間のばらつきによる不都合を回避するた
めに一定時間幅のパルスを生成する。また、計測器など
からのデータを所定のタイミング信号の立ち上がりで補
足するためにパルスを生成するのも一般的に行なわれて
いることである。このようなパルスは入力信号の立ち上
がりや立ち下がりのタイミングで生成される。
2. Description of the Related Art Generally, in a programmable controller, a pulse is often generated in order to perform control based on satisfaction of a specific condition. For example, if some control is performed based on the push operation of the push button switch, a pulse having a fixed time width is generated in order to avoid inconvenience due to variation in the push operation time. It is also common practice to generate a pulse to supplement data from a measuring instrument or the like at the rise of a predetermined timing signal. Such a pulse is generated at the rising or falling timing of the input signal.

【0003】立ち上がりパルスを生成するには、図4に
示すようなシーケンスプログラム(ラダー図として示し
てある)が必要である。図4においてX0は入力、M0
は出力を示し、R0はパルス出力を生成するために用い
るリレーを示している。この構成ではプログラマブルコ
ントローラのスキャン動作を利用してパルスを生成して
いる。すなわち、図4の構成では図5のように、入力X
0の立ち上がりが検出されると、1スキャンタイム長の
パルスが出力M0として得られるのである。
To generate a rising pulse, a sequence program (shown as a ladder diagram) as shown in FIG. 4 is required. In FIG. 4, X0 is an input, M0
Indicates an output, and R0 indicates a relay used to generate a pulse output. In this configuration, a pulse is generated using the scan operation of the programmable controller. That is, in the configuration of FIG. 4, as shown in FIG.
When the rising edge of 0 is detected, a pulse having one scan time length is obtained as the output M0.

【0004】[0004]

【発明が解決しようとする課題】ところで、このような
シーケンスプログラムでパルスを生成するとすれば4ス
テップの記述が必要であり、シーケンスプログラムが長
くなってシーケンスプログラムの開発効率が悪くなると
いう問題が生じ、また入力X0と出力M0とのほかにリ
レーR0の記述が必要であるから、可読性が悪くなって
修正や保守が面倒になるという問題が生じる。
By the way, if a pulse is generated by such a sequence program, it is necessary to describe four steps, and the sequence program becomes longer and the development efficiency of the sequence program deteriorates. In addition, since it is necessary to describe the relay R0 in addition to the input X0 and the output M0, there arises a problem that the readability deteriorates and the correction and maintenance become troublesome.

【0005】さらに、シーケンスプログラムの小容量化
を図るにはアドレス修飾を行なうのが有効であるが(特
開昭62−171002号公報等参照)、上述したパル
ス発生用のシーケンスプログラムにおいてアドレス修飾
を行なうとすれば、入力X0、出力M0、リレーR0の
それぞれにアドレス修飾用の命令を用いる必要があり、
しかもアドレス修飾を行なうと直接アドレス指定に比べ
て占有ステップ数(ワード数)が2倍になるから、1回
のパルスの発生について8ステップが必要になって、シ
ーケンスプログラムが一層長くなり可読性が一層低下す
るという問題が生じる。
In order to reduce the capacity of the sequence program, it is effective to perform address modification (see Japanese Patent Application Laid-Open No. 62-171002, etc.). If so, it is necessary to use an address modification instruction for each of the input X0, the output M0, and the relay R0,
In addition, when the address modification is performed, the number of occupied steps (the number of words) is doubled as compared with the direct address specification, so that eight steps are required for one pulse generation, and the sequence program becomes longer and the readability is further increased. The problem of lowering occurs.

【0006】本発明は上記事由に鑑みて為されたもので
あり、その主な目的は、パルスを発生する専用の命令を
持つことによりシーケンスプログラムの記述量を低減さ
せることが可能なパルス出力命令を持つプログラマブル
コントローラを提供することにある。また、請求項2の
発明においては、パルス出力命令をアドレス修飾可能と
してシーケンスプログラムの一層の小容量化を図ったプ
ログラマブルコントローラを提供することを目的として
いる。
The present invention has been made in view of the above circumstances, and a main object of the present invention is to provide a pulse output command capable of reducing the amount of description of a sequence program by having a dedicated command for generating a pulse. And a programmable controller having the same. It is another object of the present invention to provide a programmable controller capable of address modification of a pulse output command to further reduce the capacity of a sequence program.

【0007】[0007]

【課題を解決するための手段】請求項1の発明は、シー
ケンスプログラムのスキャンに伴って対象機器を制御す
るプログラマブルコントローラであって、条件としての
規定の1ビットの変化点を検出すると1スキャンタイム
長のパルスを出力するパルス出力命令を有し、パルス出
力命令の出力を格納する出力記憶手段と、出力記憶手段
と同容量であって前回のスキャン時における条件を格納
する前回条件記憶手段とを備え、パルス出力命令では今
回のスキャン時の条件と前回条件記憶手段に格納した前
回のスキャン時の条件とに基づいて条件の変化点を検出
するものである。この構成によれば、前回条件記憶手段
に格納した前回のスキャン時の条件に基づいて条件の変
化点を検出するから、条件の変化点を検出してパルスを
出力することができるのである。また、前回条件記憶手
段を出力記憶手段と同容量としているから、条件の変化
点を検出するためのシーケンスプログラムをその都度記
述する必要がなく、前回条件記憶手段に格納された前回
のスキャン時の条件を読み出して今回のスキャン時の条
件と比較する作業をパルス出力命令の中で実行すること
で、シーケンスプログラムの記述量を大幅に低減するこ
とができる。
According to a first aspect of the present invention, there is provided a programmable controller for controlling a target device in accordance with a scan of a sequence program, wherein one scan time is detected when a specified 1-bit change point as a condition is detected. An output storage unit having a pulse output instruction for outputting a long pulse, and storing output of the pulse output instruction, and a previous condition storage unit having the same capacity as the output storage unit and storing a condition at the time of the previous scan. The pulse output command detects a change point of the condition based on the condition at the time of the current scan and the condition at the time of the previous scan stored in the previous condition storage means. According to this configuration, since the change point of the condition is detected based on the condition at the time of the previous scan stored in the previous condition storage means, the change point of the condition can be detected and a pulse can be output. In addition, since the previous condition storage means has the same capacity as the output storage means, it is not necessary to describe a sequence program for detecting a change point of the condition each time, and the previous time stored in the previous condition storage means stored in the previous condition storage means is not necessary. The amount of description of the sequence program can be significantly reduced by executing the operation of reading the condition and comparing it with the condition at the time of the current scan in the pulse output instruction.

【0008】請求項2の発明は、請求項1の発明におい
て、アドレス修飾のためのインデックスレジスタと、イ
ンデックスレジスタの内容を用いてアドレス修飾を行な
う修飾演算機能部とを備え、パルス出力命令をアドレス
修飾可能としたものである。この構成によれば、パルス
出力命令を用いる際にアドレス修飾を行なうことができ
るから、シーケンスプログラムの小容量化につながる。
つまり、1命令でパルスを発生させることができるか
ら、アドレス修飾を行なう場合も2ステップで記述する
ことができ、従来構成に比較するとシーケンスプログラ
ムの記述量が1パルス当たり4分の1になる。
According to a second aspect of the present invention, in the first aspect of the present invention, there is provided an index register for address modification, and a modification operation function unit for performing address modification using the contents of the index register. Modifiable. According to this configuration, the address modification can be performed when the pulse output command is used, which leads to a reduction in the capacity of the sequence program.
In other words, since a pulse can be generated by one instruction, address modification can be described in two steps, and the amount of description of the sequence program is reduced to one-fourth as compared with the conventional configuration.

【0009】請求項3の発明は、請求項2の発明におい
て、パルス出力命令が、インデックスレジスタを用いて
出力記憶手段および前回条件記憶手段のアドレスを求め
る過程と、前回条件記憶手段の前記アドレスから読み出
した前回のスキャン時の条件を汎用レジスタに転送する
過程と、今回のスキャンで得られアキュムレータに格納
された条件を一時レジスタに転送する過程と、アキュム
レータに格納された今回のスキャン時の条件と汎用レジ
スタに格納された前回のスキャン時の条件とを比較して
変化点の有無を検出する過程と、変化点を検出すると出
力記憶手段の前記アドレスにそれ以前とは異なる値を格
納する過程と、前記一時レジスタの格納値を前回条件記
憶手段の前記アドレスに格納する過程とからなるもので
ある。この構成は望ましい実施態様である。
According to a third aspect of the present invention, in the second aspect of the present invention, the pulse output instruction obtains the addresses of the output storage means and the previous condition storage means by using an index register; The process of transferring the read conditions of the previous scan to the general-purpose register, the process of transferring the conditions obtained in the current scan and stored in the accumulator to the temporary register, and the conditions of the current scan stored in the accumulator. A step of comparing the conditions of the previous scan stored in the general-purpose register with each other to detect the presence or absence of a change point, and a step of storing a value different from the previous value in the address of the output storage means when the change point is detected. And storing the stored value of the temporary register at the address of the previous condition storage means. This configuration is a preferred embodiment.

【0010】請求項4の発明は、請求項1ないし請求項
3の発明において、前記変化点が条件の立ち上がり点で
あることを特徴とするものである。この構成は望ましい
実施態様である。請求項5の発明は、請求項1ないし請
求項3の発明において、前記変化点が条件の立ち下がり
点であることを特徴とするものである。この構成は望ま
しい実施態様である。
A fourth aspect of the present invention is characterized in that, in the first to third aspects of the present invention, the change point is a rising point of a condition. This configuration is a preferred embodiment. According to a fifth aspect of the present invention, in the first to third aspects of the present invention, the change point is a falling point of a condition. This configuration is a preferred embodiment.

【0011】請求項6の発明は、請求項3の発明におい
て、変化点の有無が、アキュムレータに格納された今回
のスキャン時の条件と汎用レジスタに格納された前回の
スキャン時の条件との排他的論理和により検出されるも
のである。この構成は望ましい実施態様である。請求項
7の発明は、請求項6の発明において、前記排他的論理
和とアキュムレータに格納された今回のスキャン時の条
件と汎用レジスタに格納された前回のスキャン時の条件
との論理積を出力記憶手段に格納するものである。この
構成は望ましい実施態様である。
According to a sixth aspect of the present invention, in the third aspect of the present invention, the presence / absence of a change point is exclusive of the condition at the time of the current scan stored in the accumulator and the condition at the previous scan stored in the general-purpose register. This is detected by logical OR. This configuration is a preferred embodiment. According to a seventh aspect of the present invention, in the invention of the sixth aspect, a logical product of the exclusive OR and the condition at the time of the current scan stored in the accumulator and the condition at the time of the previous scan stored in the general-purpose register is output. It is stored in the storage means. This configuration is a preferred embodiment.

【0012】[0012]

【発明の実施の形態】本実施形態は、図1に示す処理手
順を有したパルス出力命令をプログラマブルコントロー
ラに持たせたものである。プログラマブルコントローラ
は、図2に示すように、マイクロプロセッサ1と、シス
テムプログラムを格納したシステムメモリ2と、シーケ
ンスプログラムを格納するプログラムメモリ3と、各種
データを格納するデータメモリ4と、外部機器を接続す
る入出力部5とを備える。また、図示していないがプロ
グラム支援装置を接続するポートなども設けられる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In this embodiment, a programmable controller has a pulse output command having the processing procedure shown in FIG. As shown in FIG. 2, the programmable controller connects a microprocessor 1, a system memory 2 storing a system program, a program memory 3 storing a sequence program, a data memory 4 storing various data, and an external device. And an input / output unit 5 that performs the operation. Although not shown, a port for connecting a program support device is also provided.

【0013】マイクロプロセッサ1は、演算処理ユニッ
ト11とアキュムレータ12とのほかインデックスレジ
スタ13、汎用レジスタ14、一時レジスタ15を備
え、図1に示す処理の実行が可能になっている。また、
データメモリ4にはパルス出力命令の実行結果を格納す
る出力記憶手段としての出力記憶領域D1 およびパルス
出力命令を実行したときの条件を記憶する前回条件記憶
手段としての条件記憶領域D2 が設けられている。出力
記憶領域D1 と条件記憶領域D2 とは同容量で複数ビッ
トのビットデータが格納可能になっている。
The microprocessor 1 includes an index register 13, a general-purpose register 14, and a temporary register 15 in addition to the arithmetic processing unit 11 and the accumulator 12, and can execute the processing shown in FIG. Also,
Condition storage area D 2 as the last condition memory means for storing the condition of running the output storage area D 1 and the pulse output command as output storage means for storing the execution result of the pulse output command is provided in the data memory 4 Have been. The output storage area D 1 and condition storage area D 2-bit data of a plurality of bits in the same capacity is enabled store.

【0014】本実施形態で説明するパルス出力命令は、
アドレス修飾が可能になっている。すなわち、シーケン
スプログラムには、インデックスレジスタの内容を書き
込むステップとパルス出力命令を実行するステップとの
2ステップを記述するだけでアドレス修飾指定を行なっ
てパルスを出力することができる。ここに、アドレス修
飾を実行するアドレス修飾機能部は、マイクロプロセッ
サ1、システムメモリ2、プログラムメモリ3により構
成されることになる。
The pulse output command described in this embodiment is:
Address qualification is enabled. That is, in the sequence program, the pulse can be output by specifying the address modification simply by describing the two steps of the step of writing the contents of the index register and the step of executing the pulse output instruction. Here, the address modification function unit for executing the address modification is constituted by the microprocessor 1, the system memory 2, and the program memory 3.

【0015】以下に図1に示す処理手順について説明す
る。パルス出力命令を実行すると、インデックスレジス
タ13の内容を用いて、出力記憶領域D1 の所望のアド
レスと、条件記憶領域D2 における対応するアドレスと
が計算される(S1)。こうして出力記憶領域D1 およ
び条件記憶領域D2 のアドレスが求められると、今回の
スキャンでのパルス出力命令の実行結果を格納する領域
が確保され、かつ前回のスキャン時にパルス出力命令を
実行したときの条件を獲得することができる。ここで、
条件の立ち上がりを検出したときにパルスを発生するの
であれば、条件記憶領域D2 の初期値は0になる(論理
値が0から1に変化することを立ち上がりとしてい
る)。
The processing procedure shown in FIG. 1 will be described below. When executing the pulse output command, using the contents of the index register 13, and the desired address in the output storage area D 1, and the address corresponding in condition storage area D 2 is calculated (S1). When the addresses of the output storage area D 1 and the condition storage area D 2 are obtained in this manner, an area for storing the execution result of the pulse output instruction in the current scan is secured, and the pulse output instruction is executed during the previous scan. Condition can be obtained. here,
If for generating a pulse when detecting a rising edge of the condition, the initial value of the condition storage area D 2 becomes 0 (that the by rising the logic value changes from 0 to 1).

【0016】出力記憶領域D1 および条件記憶領域D2
のアドレスを求めた後には、条件記憶領域D2 より得ら
れた前回のスキャン時の条件を汎用レジスタ14に格納
し、アキュムレータ12に格納された今回のスキャン時
の条件を一時レジスタ15に格納する。この条件は次回
のスキャン時に変化点(立ち上がり点、立ち下がり点)
の検出用に用いることになる。さらに、条件に変化点が
あるか否かを検出するために、アキュムレータ12に格
納された今回のスキャン時の条件と汎用レジスタ14に
格納した前回のスキャン時の条件との排他的論理和を求
める。この論理演算によって、条件の変化点の有無を検
出することができる。つまり、条件に変化があれば論理
演算の結果は1になり、条件に変化がなければ0にな
る。さらに、上述の排他的論理和の結果と現在のスキャ
ン時の条件との論理積を求める。これにより、今回のス
キャン時の条件が0であれば変化点の有無にかかわらず
論理演算の結果が0であり、今回のスキャン時の条件が
1であって変化点が検出されれば論理演算の結果が1に
なる。つまり、条件の立ち上がり点が検出されたときに
のみ出力値が1になる。また、条件に変化がないか、条
件の立ち下がり点が検出されたときには出力値が0にな
る。つまり、条件の立ち上がり点から1スキャンタイム
長のパルスが出力されることになる。この演算結果はア
キュムレータ12に格納される(S2)。
Output storage area D 1 and condition storage area D 2
After obtaining the address, the condition for the previous scan obtained from the condition storage area D 2 is stored in the general-purpose register 14, and the condition for the current scan stored in the accumulator 12 is stored in the temporary register 15. . This condition is the change point (rising point, falling point) at the next scan
Will be used for detection. Further, in order to detect whether or not there is a change point in the condition, an exclusive OR of the condition at the time of the current scan stored in the accumulator 12 and the condition at the time of the previous scan stored in the general-purpose register 14 is obtained. . With this logical operation, it is possible to detect the presence or absence of a changing point of the condition. That is, if the condition changes, the result of the logical operation becomes 1, and if the condition does not change, it becomes 0. Further, the logical product of the result of the exclusive OR described above and the condition at the time of the current scan is obtained. Accordingly, if the condition at the time of the current scan is 0, the result of the logical operation is 0 regardless of the presence or absence of a change point, and if the condition at the time of the current scan is 1 and a change point is detected, the logical operation is performed. Becomes 1. That is, the output value becomes 1 only when the rising point of the condition is detected. The output value becomes 0 when there is no change in the condition or when a falling point of the condition is detected. That is, a pulse of one scan time length is output from the rising point of the condition. This calculation result is stored in the accumulator 12 (S2).

【0017】次に、アキュムレータ12の内容が出力記
憶領域D1 のうちステップS1で求めたアドレスに格納
される(S3)。また、一時レジスタ15の内容が条件
記憶領域D2 のうちステップS1で求めたアドレスに格
納される(S4)。これらの処理によって、出力記憶領
域D1 のうちステップS1で求めたアドレスの内容は、
条件の立ち上がりから1スキャンタイム長の間だけ1に
なりパルスとして用いられることになる。また、今回の
スキャン時の条件が一時レジスタ15から条件記憶領域
2 に転送されるから、この条件を次回のスキャン時に
変化点の有無の検出に用いることになる。上述の説明か
ら明らかなように、パルスは出力記憶領域D1 の特定ア
ドレスに格納された値の変化として得られるから、他の
ビット演算において自由に参照することができる。
Next, the contents of accumulator 12 is stored at an address determined at step S1 of the output storage area D 1 (S3). The contents of the temporary register 15 is stored in the address determined at step S1 of the condition storage area D 2 (S4). These processes, contents of the address determined at step S1 of the output storage area D 1 is
It becomes 1 only for one scan time length from the rise of the condition, and is used as a pulse. Further, since the condition during this scan is transferred from the temporary register 15 in the condition storage area D 2, it will be used to detect the presence or absence of a change point this condition during the next scan. As apparent from the above description, the pulses from obtained as a change in stored in a specific address of the output storage area D 1 value, can be freely referenced in other bit operations.

【0018】上述のようなパルス出力命令を用いてビッ
ト演算を行なうことで、シーケンスプログラム中でアド
レス修飾を行なってパルスを発生させることができるの
であって、たとえば、図3に示すように、アドレス修飾
を行なった入力iXnとアドレス修飾を行なった出力i
Pn(パルスリレー)とを記述するだけでパルスを用い
ることができるのである。このようにシーケンスプログ
ラムを従来よりも簡単に記述することができるから、シ
ーケンスプログラムのステップ数が低減され、かつ不要
な命令の記述がなくなり、シーケンスプログラムの作
成、修正、保守が容易になるのである。
By performing a bit operation using the pulse output command as described above, a pulse can be generated by performing address modification in a sequence program. For example, as shown in FIG. Modified input iXn and address modified output iXn
A pulse can be used only by describing Pn (pulse relay). As described above, since the sequence program can be described more easily than before, the number of steps in the sequence program is reduced, unnecessary instructions are not described, and creation, modification, and maintenance of the sequence program are facilitated. .

【0019】[0019]

【発明の効果】請求項1の発明は、シーケンスプログラ
ムのスキャンに伴って対象機器を制御するプログラマブ
ルコントローラであって、条件としての規定の1ビット
の変化点を検出すると1スキャンタイム長のパルスを出
力するパルス出力命令を有し、パルス出力命令の出力を
格納する出力記憶手段と、出力記憶手段と同容量であっ
て前回のスキャン時における条件を格納する前回条件記
憶手段とを備え、パルス出力命令では今回のスキャン時
の条件と前回条件記憶手段に格納した前回のスキャン時
の条件とに基づいて条件の変化点を検出するものであ
り、前回条件記憶手段に格納した前回のスキャン時の条
件に基づいて条件の変化点を検出するから、条件の変化
点を検出してパルスを出力することができ、しかも、前
回条件記憶手段を出力記憶手段と同容量としているか
ら、条件の変化点を検出するためのシーケンスプログラ
ムをその都度記述する必要がなく、前回条件記憶手段に
格納された前回のスキャン時の条件を読み出して今回の
スキャン時の条件と比較する作業をパルス出力命令の中
で実行することで、シーケンスプログラムの記述量を大
幅に低減することができるという利点がある。
According to a first aspect of the present invention, there is provided a programmable controller for controlling a target device in accordance with a scan of a sequence program, and upon detecting a specified 1-bit change point as a condition, a pulse having a scan time length is generated. An output storage unit having a pulse output instruction to output, and storing an output of the pulse output instruction; and a previous condition storage unit having the same capacity as the output storage unit and storing a condition at the time of the previous scan. The instruction detects a change point of the condition based on the condition at the time of the current scan and the condition at the time of the previous scan stored in the previous condition storage means. Since the condition change point is detected based on the condition, the condition change point can be detected and a pulse can be output. Since the capacity is the same as that of the storage means, there is no need to write a sequence program for detecting a change point of the condition each time, and the conditions of the previous scan stored in the previous condition storage means are read and the current scan is performed. By executing the operation of comparing with the condition (1) in the pulse output command, there is an advantage that the description amount of the sequence program can be greatly reduced.

【0020】請求項2の発明のように、アドレス修飾の
ためのインデックスレジスタと、インデックスレジスタ
の内容を用いてアドレス修飾を行なう修飾演算機能部と
を備え、パルス出力命令をアドレス修飾可能としたもの
では、パルス出力命令を用いる際にアドレス修飾を行な
うことができるから、シーケンスプログラムの小容量化
につながるという利点がある。つまり、1命令でパルス
を発生させることができるから、アドレス修飾を行なう
場合も2ステップで記述することができ、従来構成に比
較するとシーケンスプログラムの記述量が1パルス当た
り4分の1になるという利点がある。
According to a second aspect of the present invention, there is provided an index register for address modification, and a modification operation function unit for performing address modification using the contents of the index register so that the pulse output instruction can be address modified. Thus, the address modification can be performed when the pulse output command is used, which has the advantage of reducing the capacity of the sequence program. That is, since a pulse can be generated by one instruction, address modification can be described in two steps, and the amount of description of the sequence program is reduced to one fourth per pulse as compared with the conventional configuration. There are advantages.

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

【図1】本発明の実施形態で用いるパルス出力命令の手
順を示す動作説明図である。
FIG. 1 is an operation explanatory diagram showing a procedure of a pulse output command used in an embodiment of the present invention.

【図2】同上を実行するプログラマブルコントローラの
ブロック図である。
FIG. 2 is a block diagram of a programmable controller that executes the above.

【図3】同上を用いて記述したシーケンスプログラムの
一部を示す図である。
FIG. 3 is a diagram showing a part of a sequence program described using the above.

【図4】従来のシーケンスプログラムの一部を示す図で
ある。
FIG. 4 is a diagram showing a part of a conventional sequence program.

【図5】同上の動作説明図である。FIG. 5 is an operation explanatory view of the above.

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

1 マイクロプロセッサ 2 システムメモリ 3 プログラムメモリ 11 演算処理ユニット 12 アキュムレータ 13 インデックスレジスタ 14 汎用レジスタ 15 一時レジスタ D1 出力記憶領域 D2 条件記憶領域DESCRIPTION OF SYMBOLS 1 Microprocessor 2 System memory 3 Program memory 11 Arithmetic processing unit 12 Accumulator 13 Index register 14 General-purpose register 15 Temporary register D 1 Output storage area D 2 Condition storage area

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 シーケンスプログラムのスキャンに伴っ
て対象機器を制御するプログラマブルコントローラであ
って、条件としての規定の1ビットの変化点を検出する
と1スキャンタイム長のパルスを出力するパルス出力命
令を有し、パルス出力命令の出力を格納する出力記憶手
段と、出力記憶手段と同容量であって前回のスキャン時
における条件を格納する前回条件記憶手段とを備え、パ
ルス出力命令では今回のスキャン時の条件と前回条件記
憶手段に格納した前回のスキャン時の条件とに基づいて
条件の変化点を検出することを特徴とするパルス出力命
令を持つプログラマブルコントローラ。
1. A programmable controller for controlling a target device in accordance with a scan of a sequence program, and having a pulse output command for outputting a pulse of one scan time length when a specified one-bit change point is detected as a condition. An output storage means for storing the output of the pulse output command; and a previous condition storage means having the same capacity as the output storage means and storing the conditions at the time of the previous scan. A programmable controller having a pulse output instruction for detecting a change point of a condition based on a condition and a condition at the time of a previous scan stored in a previous condition storage means.
【請求項2】 アドレス修飾のためのインデックスレジ
スタと、インデックスレジスタの内容を用いてアドレス
修飾を行なう修飾演算機能部とを備え、パルス出力命令
をアドレス修飾可能としたことを特徴とする請求項1記
載のパルス出力命令を持つプログラマブルコントロー
ラ。
2. The apparatus according to claim 1, further comprising an index register for address modification, and a modification operation function unit for performing address modification using the contents of the index register, wherein the pulse output instruction can be address-modified. Programmable controller with the described pulse output instruction.
【請求項3】 パルス出力命令は、インデックスレジス
タを用いて出力記憶手段および前回条件記憶手段のアド
レスを求める過程と、前回条件記憶手段の前記アドレス
から読み出した前回のスキャン時の条件を汎用レジスタ
に転送する過程と、今回のスキャンで得られアキュムレ
ータに格納された条件を一時レジスタに転送する過程
と、アキュムレータに格納された今回のスキャン時の条
件と汎用レジスタに格納された前回のスキャン時の条件
とを比較して変化点の有無を検出する過程と、変化点を
検出すると出力記憶手段の前記アドレスにそれ以前とは
異なる値を格納する過程と、前記一時レジスタの格納値
を前回条件記憶手段の前記アドレスに格納する過程とか
らなることを特徴とする請求項2記載のパルス出力命令
を持つプログラマブルコントローラ。
3. A pulse output command includes: a step of obtaining addresses of an output storage means and a previous condition storage means using an index register; and a condition of a previous scan read from the address of the previous condition storage means in a general-purpose register. The process of transferring, the process of transferring the condition obtained in the current scan and stored in the accumulator to the temporary register, the condition of the current scan stored in the accumulator, and the condition of the previous scan stored in the general-purpose register Detecting the presence or absence of a change point, storing a value different from the previous value in the address of the output storage means when the change point is detected, and storing the stored value of the temporary register in the previous condition storage means. Storing the program at the address of the programmable controller having the pulse output command according to claim 2. controller.
【請求項4】 前記変化点は条件の立ち上がり点である
ことを特徴とする請求項1ないし請求項3記載のパルス
出力命令を持つプログラマブルコントローラ。
4. The programmable controller having a pulse output command according to claim 1, wherein the change point is a rising point of a condition.
【請求項5】 前記変化点は条件の立ち下がり点である
ことを特徴とする請求項1ないし請求項3記載のパスル
出力命令を持つプログラマブルコントローラ。
5. The programmable controller having a pulse output command according to claim 1, wherein the change point is a falling point of a condition.
【請求項6】 変化点の有無は、アキュムレータに格納
された今回のスキャン時の条件と汎用レジスタに格納さ
れた前回のスキャン時の条件との排他的論理和により検
出されることを特徴とする請求項3記載のパルス出力命
令を持つプログラマブルコントローラ。
6. The presence or absence of a change point is detected by an exclusive OR of a condition at the time of the current scan stored in the accumulator and a condition at the time of the previous scan stored in the general-purpose register. A programmable controller having the pulse output command according to claim 3.
【請求項7】 前記排他的論理和とアキュムレータに格
納された今回のスキャン時の条件と汎用レジスタに格納
された前回のスキャン時の条件との論理積を出力記憶手
段に格納することを特徴とする請求項6記載のパルス出
力命令を持つプログラマブルコントローラ。
7. The output storage means stores the logical product of the exclusive OR, the condition of the current scan stored in the accumulator, and the condition of the previous scan stored in the general-purpose register. A programmable controller having a pulse output command according to claim 6.
JP22869997A 1997-08-26 1997-08-26 Programmable controller with pulse output instructions Expired - Lifetime JP3695078B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP22869997A JP3695078B2 (en) 1997-08-26 1997-08-26 Programmable controller with pulse output instructions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP22869997A JP3695078B2 (en) 1997-08-26 1997-08-26 Programmable controller with pulse output instructions

Publications (2)

Publication Number Publication Date
JPH1165620A true JPH1165620A (en) 1999-03-09
JP3695078B2 JP3695078B2 (en) 2005-09-14

Family

ID=16880423

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22869997A Expired - Lifetime JP3695078B2 (en) 1997-08-26 1997-08-26 Programmable controller with pulse output instructions

Country Status (1)

Country Link
JP (1) JP3695078B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045197A (en) * 2014-04-30 2015-11-11 松下神视株式会社 Programmable logic controller and control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045197A (en) * 2014-04-30 2015-11-11 松下神视株式会社 Programmable logic controller and control method

Also Published As

Publication number Publication date
JP3695078B2 (en) 2005-09-14

Similar Documents

Publication Publication Date Title
JP3695078B2 (en) Programmable controller with pulse output instructions
US4807178A (en) Programmable sequence controller having indirect and direct input/output apparatus
JP4283226B2 (en) Data processing device that performs instruction parallel processing depending on address range
JPH06236695A (en) Non-volatile memory device with exchange display function
JP3597548B2 (en) Digital signal processor
JPH03296104A (en) Programmable controller system
JPS62202550A (en) Testing equipment for memory ic with redundant circuit
JPH11296441A (en) Error correction circuit
JPH04342037A (en) Operand checking system for program
JPH0229839A (en) Microprogram control device
US20010021973A1 (en) Processor
JPH07319809A (en) Processor
JP2004086374A (en) Semiconductor device
JPS63225836A (en) Storage device
JPS6222295A (en) Memory controller
JPH06332508A (en) Programmable controller
JPS63234497A (en) Storage device
JPH0667914A (en) Control storage read error correcting system
JPH07319753A (en) Multiplex system for bus cycle
JPH10187490A (en) Microprogram controller
JPH05189015A (en) Programmable controller
JPH02151925A (en) Fast bit logic operation device
JPH056280A (en) Interruption control system
JPH04199432A (en) Microprogram controller
JPH03265038A (en) Address storage control system

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050502

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20050607

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050620

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090708

Year of fee payment: 4

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090708

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090708

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100708

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100708

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110708

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120708

Year of fee payment: 7

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120708

Year of fee payment: 7

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120708

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130708

Year of fee payment: 8

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term