JPH0630005B2 - Programmable counter - Google Patents

Programmable counter

Info

Publication number
JPH0630005B2
JPH0630005B2 JP16395683A JP16395683A JPH0630005B2 JP H0630005 B2 JPH0630005 B2 JP H0630005B2 JP 16395683 A JP16395683 A JP 16395683A JP 16395683 A JP16395683 A JP 16395683A JP H0630005 B2 JPH0630005 B2 JP H0630005B2
Authority
JP
Japan
Prior art keywords
output
counter
control mode
unit
count
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.)
Expired - Lifetime
Application number
JP16395683A
Other languages
Japanese (ja)
Other versions
JPS6054522A (en
Inventor
泰行 鋤本
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
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 Omron Tateisi Electronics Co filed Critical Omron Tateisi Electronics Co
Priority to JP16395683A priority Critical patent/JPH0630005B2/en
Publication of JPS6054522A publication Critical patent/JPS6054522A/en
Publication of JPH0630005B2 publication Critical patent/JPH0630005B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03KPULSE TECHNIQUE
    • H03K23/00Pulse counters comprising counting chains; Frequency dividers comprising counting chains
    • H03K23/64Pulse counters comprising counting chains; Frequency dividers comprising counting chains with a base or radix other than a power of two
    • H03K23/66Pulse counters comprising counting chains; Frequency dividers comprising counting chains with a base or radix other than a power of two with a variable counting base, e.g. by presetting or by adding or suppressing pulses

Landscapes

  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は計数値に応じて種々の制御を行うためのプログ
ラマブルカウンタに関するものである。
The present invention relates to a programmable counter for performing various controls according to a count value.

〔従来の技術〕[Conventional technology]

種々の加工材料の移動に伴って計数値を増減させ、あら
かじめ設定した所定の計数値に達したときに所望の加工
を施すために、設定値を任意に変更することができるよ
うにしたプログラマブルカウンタが用いられている。こ
のようなプログラマブルカウンタにあっては、複数のカ
ウント設定値と、カウンタの計数値がその設定値と一致
したときにどのような加工を行うかという出力指定部で
の出力の指定が対になってあらかじめプログラムされて
おり、そのプログラムに従って種々の加工が行われる。
A programmable counter that can increase or decrease the count value according to the movement of various processing materials and can change the set value arbitrarily to perform the desired processing when the preset count value is reached. Is used. In such a programmable counter, a plurality of count setting values are paired with the output designation in the output designating unit that indicates what processing is to be performed when the count value of the counter matches the set value. Are programmed in advance, and various processes are performed according to the program.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

しかるに従来のプログラマブルカウンタでは、カウント
の設定値に対応した出力の種類のみが定められていた。
そのため出力を一時的に停止したり、カウンタの計数状
態に従って出力を停止するといった高度で複雑な制御を
することはできなかった。
However, in the conventional programmable counter, only the type of output corresponding to the set value of the count is determined.
Therefore, it is not possible to perform highly sophisticated control such as temporarily stopping the output or stopping the output according to the counting state of the counter.

本発明はこのような従来のプログラマブルカウンタの使
用上の不便さに鑑みてなされたもので、カウント設定部
と出力指定部に加えて更に種々の制御を行うための制御
モードを加え、複雑な制御を行うことができるようにし
たプログラマブルカウンタを提供するものである。
The present invention has been made in view of the inconvenience of using such a conventional programmable counter, and in addition to the count setting unit and the output designating unit, a control mode for performing various controls is added, and complicated control is performed. It is intended to provide a programmable counter capable of performing.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明は入力クロックを計数する計数器と、カウント設
定値及び該カウント設定に対応した出力状態を記憶する
記憶部とを有し、計数器の計数出力に基づいて制御を行
うプログラマブルカウンタであって、記憶部はカウント
設定部,出力指定部及び制御モード指定部を夫々有する
複数のステップを含むものであり、該カウント設定部は
カウンタの設定値を設定する領域であり、出力指定部は
任意の出力状態を指定する領域であり、制御モード指定
部は出力状態を除くカウンタ内部の制御を規定する制御
モードを指定する領域であり、プログラマブルカウンタ
は、計数器の計数値と記憶部の各ステップのカウント設
定部の設定値を順次比較し、その一致を判別する比較器
と、比較器の一致出力に基づいて記憶部の当該ステップ
に設定された出力指定部の出力を制御モード指定部の制
御モードに対応して出力する制御部と、を具備すること
を特徴とするものである。
The present invention is a programmable counter that has a counter that counts an input clock and a storage unit that stores a count setting value and an output state corresponding to the count setting, and that controls based on the count output of the counter. The storage unit includes a plurality of steps each having a count setting unit, an output designating unit, and a control mode designating unit, the count setting unit is an area for setting a set value of the counter, and the output designating unit is an arbitrary unit. The control mode designating unit is a region for designating the control mode defining the control inside the counter except the output state, and the programmable counter is the count value of the counter and each step of the storage unit. A comparator that sequentially compares the set values of the count setting unit and determines whether they match, and the output set in the step of the storage unit based on the match output of the comparator. It is characterized in that it comprises a control unit to output the corresponding output of the constant portion of the control mode of the control mode designating unit.

〔作用〕[Action]

このような特徴を有する本発明によれば、記憶部の各ス
テップにはカウント設定部,出力指定部及び制御モード
指定部が夫々記憶されている。そして入力クロック信号
を計数器によって計数し、比較器によって計数値と各ス
テップのカウント設定部の設定値とを順次比較してい
る。そしてあるステップのカウント設定部の設定値と一
致する場合には、そのステップの出力指定部及び制御モ
ード指定部で指定された出力状態及び制御モードの指定
に従って出力される。例えば特許請求の範囲第2項の発
明では、制御モード指定部は終了制御命令としているた
め、指定された出力を出した後カウンタの実行を停止さ
せる。又特許請求の範囲第3項の発明では、制御モード
指定部はロックアウト制御命令としているため出力指定
部で指定された出力を停止する。特許請求の範囲第4項
の発明では、制御モード指定部はクリア命令としている
ため、その設定値に達すれば計数器の計数値をクリアす
る。又特許請求の範囲第5項の発明では、制御モード指
定部は予報信号としているため、出力指定部で設定され
た出力を予報信号として出力する。更に本願の特許請求
の範囲第6項の発明では、制御モード指定部はアップカ
ウント時又はダウンカウント時のいずれかにのみ出力を
出すカウント制御命令としているため、計数器の計数方
向によって出力を出し又は停止するように制御する。
According to the present invention having such a feature, the count setting unit, the output designating unit, and the control mode designating unit are stored in each step of the storage unit. Then, the input clock signal is counted by the counter and the comparator sequentially compares the count value with the set value of the count setting unit of each step. Then, when it matches with the set value of the count setting unit of a certain step, the output is performed according to the output state and the control mode specified by the output designating unit and the control mode designating unit of the step. For example, in the invention of claim 2, since the control mode designating unit uses the end control command, the execution of the counter is stopped after outputting the designated output. Further, in the invention of claim 3, since the control mode designating unit uses the lockout control command, the output designated by the output designating unit is stopped. In the invention according to claim 4, the control mode designating unit uses a clear command, and therefore, when the set value is reached, the count value of the counter is cleared. Further, in the invention of claim 5, since the control mode designating section uses the forecast signal, the output set by the output designating section is output as the forecast signal. Further, according to the invention of claim 6 of the present application, the control mode designating section uses the count control instruction for outputting the output only during either the up-counting or the down-counting. Or, control to stop.

〔実施例〕〔Example〕

第1図は本発明によるプログラマブルカウンタの電気的
構成を示すブロック図である。本図に示すようにこのプ
ログラマブルカウンタは中央演算装置(以下CPUとい
う)1を有している。CPU1には入力手段としてキー
入力部2が接続され、記憶手段としてメモリ3が接続さ
れる。メモリ3はCPU1の演算処理手順に加えて、後
述するようにカウント設定部,出力指定部,制御モード
指定部から成る複数のステップを記憶する領域を有して
いる。CPU1の出力は表示器4及び計数器5に与えら
れる。計数器5はCPU1からの制御に基づいてクロッ
ク発生器6より得られるクロック信号を計数するカウン
タであって、その計数出力は比較器7に与えられる。比
較器7はCPU1より与えられるメモリ3の各ステップ
のカウント設定部と計数器5の計数値とを比較するもの
であって、その一致出力を出力部8に与える。出力部8
はCPU1からの出力指定に基づいて制御対象にそれに
対応した出力を与えるものである。又計数器5,比較器
7及び出力部8には制御入力部9より制御入力信号が与
えられている。
FIG. 1 is a block diagram showing an electrical configuration of a programmable counter according to the present invention. As shown in this figure, this programmable counter has a central processing unit (hereinafter referred to as CPU) 1. A key input unit 2 is connected to the CPU 1 as an input unit, and a memory 3 is connected as a storage unit. The memory 3 has a region for storing a plurality of steps including a count setting unit, an output designating unit, and a control mode designating unit as described later, in addition to the arithmetic processing procedure of the CPU 1. The output of the CPU 1 is given to the display 4 and the counter 5. The counter 5 is a counter for counting the clock signals obtained from the clock generator 6 under the control of the CPU 1, and the count output is given to the comparator 7. The comparator 7 compares the count setting section of each step of the memory 3 provided by the CPU 1 with the count value of the counter 5, and gives the coincidence output to the output section 8. Output unit 8
Is to give a corresponding output to the control target based on the output designation from the CPU 1. A control input signal is applied to the counter 5, the comparator 7, and the output section 8 from the control input section 9.

第2図はキー入力部2及び表示部4のフロントパネル面
を示す図である。このパネル面の上部には3桁のステッ
プナンバーを示す計数表示部4aと、7桁の計数値を示
す計数表示部4bが設けられる。キー入力部2にはテン
キー2a、及びプログラムの書き込み,各種制御モード
の書き込み,変更を行う種々のファンクションキー2b
等が設けられている。
FIG. 2 is a view showing front panel surfaces of the key input unit 2 and the display unit 4. On the upper part of the panel surface, a count display section 4a showing a 3-digit step number and a count display section 4b showing a 7-digit count value are provided. On the key input unit 2, a ten-key 2a and various function keys 2b for writing a program, writing various control modes, and changing
Etc. are provided.

第3図(a)はメモリ3のメモリマップを示す図である。
本図においてメモリ3はCPU1の演算処理手順を記憶
するプログラム領域の他に、一連の制御ステップを記憶
するステップ領域と、制御中のステップを示すステップ
カウンタ及び制御モードの設定、変更時にその位置を指
示する制御モードポインタ領域を有している。各ステッ
プ1〜nは計数器5の計数値を設定するカウント設定部
及びその時の出力の種類を指定する出力指定部、及び本
発明の特徴となる制御モード設定部を有している。
FIG. 3A is a diagram showing a memory map of the memory 3.
In the figure, the memory 3 has, in addition to a program area for storing the arithmetic processing procedure of the CPU 1, a step area for storing a series of control steps, a step counter indicating a step under control, and a position thereof when setting or changing a control mode. It has a control mode pointer area for pointing. Each of the steps 1 to n has a count setting section for setting the count value of the counter 5, an output designating section for designating the type of output at that time, and a control mode setting section which is a feature of the present invention.

ここで出力指定部は、出力自体の状態を定める指定部で
ある。出力状態とは例えば1カウント分接点信号を閉成
する一致出力状態、所定のカウント数だけ接点信号を閉
成するワンショット出力状態、又は設定値で接点を開放
から閉成に、又閉成から開放に切換えるセット,リセッ
ト出力状態であり、更に制御モード設定部は、カウンタ
の動作状態や動作の終了等の出力状態以外の制御を実行
するモードを指定する領域である。本実施例では第3図
(b)に更に詳細に示すように、制御モード設定部は5ビ
ットの信号から成る制御モードとしている。この制御モ
ードとしては、プログラムの終了を示す終了制御(EN
D),プログラム出力を一時的に停止させるロックアウ
ト制御,計数器5の計数値をクリアするカウンタクリア
制御,制御対象に対しての制御前に予報として出力を出
すことを示す予報出力制御,計数器5のアップカウント
時及びダウンカウント時のいずれに出力を出すかを定め
るカウント制御の各領域が定められている。これらの各
制御は対応するビットを「0」又は「1」とすることに
より設定される。
Here, the output designation unit is a designation unit that determines the state of the output itself. The output state is, for example, a coincident output state in which a contact signal is closed for one count, a one-shot output state in which a contact signal is closed for a predetermined count number, or a contact is opened or closed at a set value, or closed. The set and reset output states are switched to open, and the control mode setting section is an area for designating a mode for executing control other than the output state such as the operating state of the counter and the end of the operation. In this embodiment, FIG.
As shown in more detail in (b), the control mode setting section is in the control mode including a 5-bit signal. This control mode includes an end control (EN
D), lockout control for temporarily stopping the program output, counter clear control for clearing the count value of the counter 5, forecast output control indicating that an output is output as a forecast before controlling the control target, counting Each region of the count control that determines when the counter 5 outputs the up-count or the down-count is defined. Each of these controls is set by setting the corresponding bit to "0" or "1".

次にこのプログラマブルカウンタの動作についてフロー
チャートを参照しつつ説明する。第4図はこのプログラ
マブルカウンタの全体の処理を示すフローチャートであ
り、動作を開始するとまずシステムの初期化が行われる
(ルーチン20)。初期化が終了するとステップ21に進ん
でプログラムの設定モードであるかどうかがチェックさ
れる。設定モードであればルーチン22に進んでキー処理
プログラムが行われ、設定モードでなければステップ領
域に書込まれたユーザプログラムの実行処理が行われる
(ルーチン23)。
Next, the operation of the programmable counter will be described with reference to the flowchart. FIG. 4 is a flowchart showing the overall processing of the programmable counter. When the operation is started, the system is first initialized (routine 20). When the initialization is completed, the routine proceeds to step 21, where it is checked whether it is the program setting mode. If it is in the setting mode, the routine proceeds to routine 22 to execute the key processing program, and if it is not in the setting mode, the execution processing of the user program written in the step area is performed (routine 23).

キー処理プログラムはメモリ3の各ステップ領域にプロ
グラムを書き込む処理であって、その動作を第5図のフ
ローチャートにより説明する。この処理を開始すればま
ずステップ30においてシフトキーが押下されているかど
うかをチェックし、押下されている場合にはステップ31
に進んで制御モードであるかどうかをチェックする。制
御モードでなければカウンタ設定もしくは出力の指定で
あるのでそれに応じた処理を行い、制御モードであれば
メモリ3の制御モードポインタを更新してステップ21に
戻る。シフトキーが次々に押下されれば同様にして制御
モードポインタを次々に更新し、第3図(b)に示す制御
モードの変更すべきビット位置にまでポインタを更新す
る。このポインタは表示部4の表示領域に例えば小数点
を点滅するようにして表示される。次いでシフトキーの
代わりに置数キーが押下された場合には、ステップ30,3
3を介してステップ34に進み、制御モードであるかどう
かをチェックする。制御モードでなければ他の処理を行
い、制御モードの場合には各モードは1ビット即ち
「0」もしくは「1」で示されるので、これが「0」も
しくは「1」であるかどうかをチェックする(ステップ
35)。「0」又は「1」でなければエラー処理を行い、
「0」又は「1」であれば制御モードの「0」又は
「1」をポインタの示す位置に書き込んで(ステップ3
6)ステップ21に戻る。
The key processing program is processing for writing the program in each step area of the memory 3, and its operation will be described with reference to the flowchart of FIG. If this process is started, it is first checked in step 30 whether or not the shift key is pressed, and if it is pressed, step 31
Go to and check if it is in control mode. If it is not the control mode, the counter setting or the output is designated, so that the processing corresponding thereto is performed. If it is the control mode, the control mode pointer of the memory 3 is updated and the process returns to step 21. When the shift key is pressed one after another, the control mode pointer is updated in the same manner, and the pointer is updated to the bit position to be changed in the control mode shown in FIG. 3 (b). This pointer is displayed in the display area of the display unit 4 such that the decimal point blinks. Then, if the numeric key is pressed instead of the shift key, step 30,3
Proceed to step 34 via step 3 to check if the control mode is set. If it is not the control mode, other processing is performed. In the case of the control mode, each mode is indicated by 1 bit, that is, "0" or "1", so it is checked whether this is "0" or "1". (Step
35). If it is not "0" or "1", error processing is performed,
If it is "0" or "1", write "0" or "1" of the control mode at the position indicated by the pointer (step 3
6) Return to step 21.

次いで書込みキーが押下されればステップ30,33及びス
テップ37を介してステップ38に進み、プログラムバッフ
ァのチェックを行う。プログラムが正常であればステッ
プ39を介してステップ40においてプログラムの登録を行
い、ステップカウンタをインクリメントしてステップ21
に戻る。又ステップ39においてプログラムに異常があれ
ばステップ42でプログラムのエラー処理を行う。このよ
うにしてステップ1から必要なステップまでに順次カウ
ント設定値の登録と、出力指定及び制御モードの指定を
行う。
Next, if the write key is pressed, the process proceeds to step 38 through steps 30, 33 and 37 to check the program buffer. If the program is normal, the program is registered in step 40 through step 39, the step counter is incremented, and step 21
Return to. If the program is abnormal in step 39, error processing of the program is performed in step 42. In this way, the count setting value is sequentially registered, the output is designated, and the control mode is designated from step 1 to the required step.

次にステップ21においてプログラム設定モードでなけれ
ばルーチン23のユーザプログラム実行処理のルーチンが
行われる。第6図はこの処理ルーチンを示すフローチャ
ートである。実行を開始すると、ステップ50において計
数器5の計数出力が最初のステップカウンタのステップ
に設定されているカウント設定部の設定値と等しくなる
まで待ち受ける。例えば第3図(a)に示すメモリマップ
の例では、ステップ1に100という設定値が設定されて
いるので、計数器5の計数出力が100になるまで待ち受
け、これが設定値と等しくなればステップ51に進んでメ
モリ3よりステップ1の出力指定、及び制御モード指定
を読出す。同時にステップ1の出力(この出力状態をA
とする。)の設定を行い(ステップ52)、制御モード指
定部で指定されている制御モードと出力の種類に応じて
出力の実行を行う(ステップ53)。即ち例えば制御モー
ドでロックアウトが指示されていれば実行を行わず、又
制御モードのカウンタクリアがセットされていれば出力
を出すと共に計数器5の計数値をクリアし、予報出力が
セットされていれば予報として出力する。又カウンタの
アップが設定されている場合には、計数器5がアップカ
ウント中である場合にのみ出力を実行する。第3図(a)
に示すメモリマップの例のように制御モードとしてアッ
プ制御が書き込まれているとすると、計数器5がアップ
カウントしているときにのみその出力(A)例えばワン
ショット出力が実行される。そしてステップ54に進んで
制御モードが終了命令(END)であるかどうかをチェ
ックする。これが終了命令でなければステップ55に進ん
でメモリ3内のステップカウンタをインクリメントして
ステップ50に戻り、次のステップについて同様の処理を
繰り返す。
Next, in step 21, if it is not the program setting mode, the routine of the user program execution processing of the routine 23 is performed. FIG. 6 is a flowchart showing this processing routine. When the execution is started, the process waits in step 50 until the count output of the counter 5 becomes equal to the set value of the count setting section set in the step of the first step counter. For example, in the example of the memory map shown in FIG. 3 (a), since the set value of 100 is set in step 1, it waits until the count output of the counter 5 reaches 100, and if this becomes equal to the set value, the step In step 51, the output designation and control mode designation in step 1 are read from the memory 3. At the same time, output of step 1 (this output state is
And ) Is set (step 52), and the output is executed according to the control mode and the type of output designated by the control mode designation section (step 53). That is, for example, if lockout is instructed in the control mode, execution is not performed, and if the counter clear in the control mode is set, an output is output and the count value of the counter 5 is cleared, and the forecast output is set. If it is output as a forecast. When the counter is set to be up, the output is executed only when the counter 5 is counting up. Fig. 3 (a)
Assuming that the up control is written as the control mode as in the example of the memory map shown in (1), its output (A), for example, one-shot output is executed only when the counter 5 is counting up. Then, the routine proceeds to step 54, where it is checked whether or not the control mode is the end command (END). If this is not an end command, the process proceeds to step 55, the step counter in the memory 3 is incremented, the process returns to step 50, and the same processing is repeated for the next step.

例えば第3図(a)に示す場合には次のステップ2のカウ
ント設定値は295であるので、ステップ50で計数器5の
計数が295になるまで待ち受け、これが295となればステ
ップ51に進んで出力指定及び制御モード指定を呼出す。
又ステップ2では出力状態(B)例えば一致出力であ
り、予報出力のビットが立っているので予報として出力
する。更にステップ3に進み計数器5の計数値が300と
なればステップ3の出力指定及び制御モード指定を読出
す。そして計数器5がアップカウント状態で計数値300
に達したので、出力指定部の出力状態(C)例えばセッ
ト出力を出力する。同様にして計数器5は計数を続け、
ステップ4で指定されたカウント設定部の設定値350に
達すれば、アップカウント状態でこの計数値に達したの
で出力を出す。この出力は計数器5の計数を逆転させる
信号を計数器5に与えるものとすれば、以後計数値が順
次減少する。こうして一連のステップの制御を行うが、
ステップ54において制御モードが終了命令となっていれ
ば、ステップ56に進みステップカウンタをリセットして
ユーザステップの実行処理を終了する。
For example, in the case shown in FIG. 3 (a), since the count set value in the next step 2 is 295, it waits until the count of the counter 5 reaches 295 in step 50, and when it becomes 295, it proceeds to step 51. Calls the output designation and control mode designation with.
In step 2, the output state (B) is, for example, coincidence output, and since the bit of the forecast output is set, it is output as the forecast. Further, the process proceeds to step 3, and when the count value of the counter 5 reaches 300, the output designation and control mode designation of step 3 are read. When the counter 5 is counting up, the count value is 300.
Therefore, the output state (C) of the output designating unit, for example, a set output is output. Similarly, the counter 5 continues counting,
If the set value 350 of the count setting unit designated in step 4 is reached, this count value is reached in the up-counting state, so an output is output. If this output gives a signal for reversing the counting of the counter 5 to the counter 5, the count value is successively decreased thereafter. In this way, a series of steps are controlled,
If the control mode is the end command in step 54, the process proceeds to step 56 and the step counter is reset to end the execution process of the user step.

このように本発明のプログラマブルカウンタでは、各ス
テップに種々の制御が可能な制御モードを加えることと
しているので種々の制御対象に柔軟に対処することがで
きる。
As described above, in the programmable counter of the present invention, a control mode capable of various controls is added to each step, so that various control targets can be dealt with flexibly.

〔発明の効果〕〔The invention's effect〕

このため本発明によるプログラマブルカウンタでは、制
御モード指定部に種々の指定を行うことによって複雑な
制御が可能となり、制御対象を大幅に拡大することがで
きる。又プログラマブルカウンタの汎用性を高めること
が可能となる。
Therefore, in the programmable counter according to the present invention, complicated control is possible by making various designations in the control mode designation unit, and the control target can be greatly expanded. Also, the versatility of the programmable counter can be improved.

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

第1図は本発明のプログラマブルカウンタの電気的構成
を示すブロック図、第2図はキー入力部及び表示部のフ
ロントパネル面を示す図、第3図(a)はメモリ3のメモ
リマップ、第3図(b)は制御モード指定部の記憶内容を
示す図、第4図は全体の処理を示すフローチャート、第
5図はキー処理プログラムを示すフローチャート、第6
図はユーザプログラムの実行処理を示すフローチャート
である。 1……CPU、2……キー入力部、3……メモリ、4…
…表示部、5……計数器、7……比較器
FIG. 1 is a block diagram showing an electrical configuration of a programmable counter of the present invention, FIG. 2 is a diagram showing a front panel surface of a key input section and a display section, and FIG. 3 (a) is a memory map of a memory 3, FIG. 3 (b) is a diagram showing the stored contents of the control mode designating unit, FIG. 4 is a flowchart showing the overall processing, FIG. 5 is a flowchart showing a key processing program, and FIG.
The figure is a flow chart showing the execution processing of the user program. 1 ... CPU, 2 ... key input section, 3 ... memory, 4 ...
… Display, 5 …… Counter, 7 …… Comparator

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】入力クロックを計数する計数器と、カウン
ト設定値及び該カウント設定に対応した出力状態を記憶
する記憶部とを有し、前記計数器の計数出力に基づいて
制御を行うプログラマブルカウンタにおいて、 前記記憶部はカウント設定部,出力指定部及び制御モー
ド指定部を夫々有する複数のステップを含むものであ
り、 該カウント設定部はカウンタの設定値を設定する領域で
あり、出力指定部は任意の出力状態を指定する領域であ
り、前記制御モード指定部は出力状態を除く前記カウン
タ内部の制御を規定する制御モードを指定する領域であ
り、 前記プログラマブルカウンタは、 前記計数器の計数値と前記記憶部の各ステップのカウン
ト設定部の設定値を順次比較し、その一致を判別する比
較器と、 前記比較器の一致出力に基づいて前記記憶部の当該ステ
ップに設定された出力指定部の出力を制御モード指定部
の制御モードに対応して出力する制御部と、を具備する
ことを特徴とするプログラマブルカウンタ。
1. A programmable counter having a counter that counts an input clock and a storage unit that stores a count set value and an output state corresponding to the count setting, and performs control based on the count output of the counter. In the above, the storage unit includes a plurality of steps each having a count setting unit, an output designating unit and a control mode designating unit, the count setting unit is an area for setting a set value of the counter, and the output designating unit is An area for designating an arbitrary output state, the control mode designating section is an area for designating a control mode for defining control inside the counter except the output state, and the programmable counter is a count value of the counter. Based on the coincidence output of the comparator, which sequentially compares the set values of the count setting unit of each step of the storage unit and determines the coincidence, Programmable counter, characterized in that it comprises a control unit for outputting in response to the control mode of the control mode designating unit output of output designation section which is set in the step of the storage unit Te.
【請求項2】前記記憶部の各ステップの制御モード指定
部は、プログラムの実行を停止させる終了制御命令を含
むものであることを特徴とする特許請求の範囲第1項記
載のプログラマブルカウンタ。
2. The programmable counter according to claim 1, wherein the control mode designating section of each step of the storage section includes an end control instruction for stopping the execution of the program.
【請求項3】前記記憶部の制御モード指定部は、前記出
力指定部で設定された出力状態の出力の可否を定めるロ
ックアウト制御命令を含むものであることを特徴とする
特許請求の範囲第1項記載のプログラマブルカウンタ。
3. The control mode designating unit of the storage unit includes a lockout control command for determining whether or not to output the output state set by the output designating unit. Programmable counter described.
【請求項4】前記記憶部の制御モード指定部は、前記計
数器の計数値をクリアするクリア制御命令を含むもので
あることを特徴とする特許請求の範囲第1項記載のプロ
グラマブルカウンタ。
4. The programmable counter according to claim 1, wherein the control mode designation unit of the storage unit includes a clear control instruction for clearing the count value of the counter.
【請求項5】前記記憶部の制御モード指定部は、出力を
予報信号として出力する予報出力命令を含むものである
ことを特徴とする特許請求の範囲第1項記載のプログラ
マブルカウンタ。
5. The programmable counter according to claim 1, wherein the control mode designating unit of the storage unit includes a forecast output command for outputting the output as a forecast signal.
【請求項6】前記記憶部の制御モード指定部は、前記計
数器のアップカウント時又はダウンカウント時のいずれ
かにのみ出力を出すカウント制御命令を含むものである
ことを特徴とする特許請求の範囲第1項記載のプログラ
マブルカウンタ。
6. The control mode designating unit of the storage unit includes a count control command for outputting an output only when the counter is counting up or counting down. The programmable counter according to item 1.
JP16395683A 1983-09-05 1983-09-05 Programmable counter Expired - Lifetime JPH0630005B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP16395683A JPH0630005B2 (en) 1983-09-05 1983-09-05 Programmable counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP16395683A JPH0630005B2 (en) 1983-09-05 1983-09-05 Programmable counter

Publications (2)

Publication Number Publication Date
JPS6054522A JPS6054522A (en) 1985-03-29
JPH0630005B2 true JPH0630005B2 (en) 1994-04-20

Family

ID=15784013

Family Applications (1)

Application Number Title Priority Date Filing Date
JP16395683A Expired - Lifetime JPH0630005B2 (en) 1983-09-05 1983-09-05 Programmable counter

Country Status (1)

Country Link
JP (1) JPH0630005B2 (en)

Also Published As

Publication number Publication date
JPS6054522A (en) 1985-03-29

Similar Documents

Publication Publication Date Title
US4006464A (en) Industrial process controller
JPH0511962A (en) Window management device
JPS60262204A (en) Programmable controller
US4740884A (en) Bank-linked programmable controller
JPH0630005B2 (en) Programmable counter
US4564898A (en) Programmable controller having a drum type sequencer function subject to programming
JPS6232805B2 (en)
JPS5936787B2 (en) Input/output information deletion method
JPH0439083B2 (en)
JPH0439084B2 (en)
JPH05100707A (en) Controller
JPS5944642B2 (en) Operation command circuit
JPH0619518A (en) Program calling system
US4422776A (en) Device for correction of time date displayed by an electronic watch
JPS63123104A (en) Nc device
JPH0219482B2 (en)
JP2696811B2 (en) Electronic preset counter
JPS583144Y2 (en) Calculator with plot calculation function
JPH0588744A (en) Controller
JPH0310123B2 (en)
JP3067166B2 (en) Digital controller
JPS6217782B2 (en)
JPS61272852A (en) How to load the program
JPS615349A (en) Programmable controller
JPH035602B2 (en)