JPS60251721A - Electronic preset counter - Google Patents

Electronic preset counter

Info

Publication number
JPS60251721A
JPS60251721A JP11056184A JP11056184A JPS60251721A JP S60251721 A JPS60251721 A JP S60251721A JP 11056184 A JP11056184 A JP 11056184A JP 11056184 A JP11056184 A JP 11056184A JP S60251721 A JPS60251721 A JP S60251721A
Authority
JP
Japan
Prior art keywords
output
counter
section
clear
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.)
Granted
Application number
JP11056184A
Other languages
Japanese (ja)
Other versions
JP2696811B2 (en
Inventor
Hiroyuki Yamamoto
博之 山本
Junichiro Fukuya
福家 純一郎
Hajime Takakuwa
高桑 肇
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 JP59110561A priority Critical patent/JP2696811B2/en
Publication of JPS60251721A publication Critical patent/JPS60251721A/en
Application granted granted Critical
Publication of JP2696811B2 publication Critical patent/JP2696811B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To clear a count value of a counter without requiring an external reset circuit by providing a control section clearing a count value of a counter in step of a user's program. CONSTITUTION:Each step of the user's program includes an area of a control instruction. The control instruction includes an end flag designating the end of the program and an area of a clear instruction clearing the count value of an input counter. A control section of a CPU3 executes an output instruction of the step based on the coincident output of the comparator and when the clear instruction is set to the step, the clear control clearing the count value of the counter section is executed.

Description

【発明の詳細な説明】 発明の分野 本発明は計数値に応じて種々の制御を行う電子j、(プ
リセットカウンタに関し、特にプログラムによってカウ
ンタの計数値をクリアすることができる電子式プリセッ
トカウンタに関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to an electronic preset counter that performs various controls according to a counted value, and particularly relates to an electronic preset counter that can clear the counted value of the counter by a program. It is.

従来技術とその問題点 位置制御等に用いられる電子式プリセットカウンタにお
いては、複数の設定された計数値とその釧数僅の夫々に
対応した出力の指定が対になってあらかしめプログラム
されており、そのプログラムに従って種々の加工か行わ
れる。
Conventional technology and its problems In electronic preset counters used for position control, etc., a plurality of set count values and output specifications corresponding to each of these counts are pre-programmed in pairs. , various processing is performed according to the program.

しかるに従来の電子式プリセンカウンタンタによれば、
出力操作を行うと共にその位置から新に計数を開始する
いわゆる相対制御を行う場合や、所定値でカウンタの計
数値をクリアする場合には例えば第4図に示すように、
出力端より与えられる出力をハードウェアによる回路を
設定して電子式プリセソトカウンクのリセット端子に入
力を与える構造としていた。例えば第4図(a)の場合
にはいずれかの出力端0−1〜0−7に出力を生しる場
合にそれらの論理和信号でリセット信号を与えてδ1数
値をリセットし、第4図(blでは出力0−7に出力が
生しる場合にのみリセット信号を与えてカウンタをリセ
ットしていた。
However, according to the conventional electronic presen counter,
When performing so-called relative control in which a new count is started from that position at the same time as an output operation is performed, or when clearing the count value of a counter with a predetermined value, for example, as shown in FIG.
The structure was such that the output given from the output end was input to the reset terminal of the electronic preset counter by setting a hardware circuit. For example, in the case of FIG. 4(a), when an output is generated at any of the output terminals 0-1 to 0-7, a reset signal is given by their logical sum signal to reset the δ1 value, and the δ1 value is reset. In Figure (bl), the counter is reset by applying a reset signal only when an output is generated at outputs 0-7.

このような操作を行わせるために従来は所定の電子式プ
リセットカウンタからの出力に基づいて動作する専用の
外部回路をユーザが独自に接続し、その外部回路からの
出力をカウンタへのリセット入力として用いており、複
雑な工程の処理ではシステムを組上げるのが困難になる
というという11M題点があった。又こうした外部回路
を設けた場合には、電子式プリセン1カウンクにリセッ
ト入力を与えると全ての出力がオフとなって出力をその
まま保持することができないため、使用に制約を受ける
ことがあるという問題点もあった。
Conventionally, in order to perform such operations, the user connects a dedicated external circuit that operates based on the output from a predetermined electronic preset counter, and the output from that external circuit is used as the reset input to the counter. The 11M problem was that it was difficult to assemble the system when processing complex processes. In addition, when such an external circuit is provided, there is a problem in that when a reset input is applied to the electronic presen 1 count, all outputs are turned off and the output cannot be maintained as it is, which may restrict its use. There were also points.

発明の目的 本発明はこのような従来の電子式プリセットカウンタの
問題点をIW消するものであって、出力信ひに基づいて
リセット信号を発生ずる外部回路を用いることなくカウ
ンタの計数値をクリアすることができ出力をそのまま保
持しておくことができる電子式プリナノ1−カウンクを
提供するものである。
Purpose of the Invention The present invention eliminates the problems of the conventional electronic preset counter, and clears the count value of the counter without using an external circuit that generates a reset signal based on an output signal. The present invention provides an electronic pre-nano 1-count that can maintain the output as it is.

発明の構成と効果 本発明はクロック入力を計数する計数部と、計数設定値
及び該計数設定に対応した出力状態を記憶する記憶手段
とを有し、計数部の計数値に基づいて出力操作を行う電
子式プリセットカウンタであって、記憶手段は計数設定
′値を記憶する計数設定部、出力指定部及び入力計数値
をクリアするクリア命令を含む一連のステップを有する
ものであり、記憶手段の一連のステップの計数設定部の
設定値が順次与えられ、計数部の計数値と比較する比較
手段と、順次配j(1手段の一連のステップを読出して
比較手段にり、え、比較器の一致出力に基づいてそのス
テップの出力命令を実行すると共に、そのステップにク
リア命令が立てられているときに計数部の計数値をクリ
アするクリア制御を行う制御部と、を具備することを特
徴とするものである。
Structure and Effects of the Invention The present invention has a counting section that counts clock inputs, and a storage means that stores a count setting value and an output state corresponding to the counting setting, and performs an output operation based on the count value of the counting section. The electronic preset counter has a series of steps including a count setting section for storing a count setting value, an output specifying section, and a clear command for clearing the input count value. The set value of the count setting section of the step is sequentially given, and the comparison means which compares it with the count value of the counter section, and the comparison means which sequentially reads out the series of steps of the step (1) and goes to the comparison means. The method is characterized by comprising a control unit that executes an output command of the step based on the output, and performs clear control to clear the count value of the counting unit when a clear command is issued for the step. It is something.

このような特徴を有する本発明によれば、ユーザプログ
ラムのステップ中にカウンタの計数値をクリアするクリ
ア命令が設けられており、そのステップの設定値に達す
るとその出力操作を実行すると共に、クリア命令の状態
によって計数部の計数値をクリアしている。従って外部
のり上21〜回路を必要とせずカウンタの計数値をクリ
アすることができる。更にカウンタの計数値がクリアさ
れても出力はそのまま保持されるため出力の利用に制約
を受けることがなく、計数値を所定位置でクリアしたり
相対位置制御を行う等、制御対象に応じた柔軟な制御シ
ステムを構成することが可能となる。
According to the present invention having such characteristics, a clear instruction is provided to clear the count value of the counter during a step of the user program, and when the set value of the step is reached, the output operation is executed and the clear instruction is also provided. The count value of the counter is cleared depending on the instruction status. Therefore, the count value of the counter can be cleared without requiring an external register 21 to circuit. Furthermore, even if the count value of the counter is cleared, the output remains as it is, so there are no restrictions on the use of the output, and it is flexible depending on the control target, such as clearing the count value at a predetermined position or performing relative position control. This makes it possible to configure a control system that is flexible.

実施例の説明 第2図は本発明よる電子式プリセン1−カウンタの一実
施例の構成を示すブロック図である。本図において制御
対象の移動等に対応してロータリー′i−ンコーダ等か
ら、)1故人力部1に入力信号が与え(三)れる。計数
人力部1はこの信号をレベル変換し、波形整形して入力
インターフェイス2を介して中央演算装置(以下CP 
Uという)3に伝えるものである。入力インターフェイ
ス2にはリセット信号やゲート信月をli−える制御入
力部4及びユーザかプログラムを書込むプログラム入力
部5か接続されている。又CPU3には記憶装置として
その演算処理手順を記1aするリードオンリノモリ (
以下ROMという)〔j、及びユーザプログラム等を記
fQするランダムアクセスメモリ (以下RAMとい・
う)7が設illられている。CPU3は後述するよう
にニーザブIJグラトで設定された計数値に達し7だと
きに所定の出力を出すものであって、その出力は出力イ
ンターフLイス8を介して表示部9と出力回路10にり
えられている。出力回路10には複数の出力端Y−か設
けられそれらが出力回路10によって選択的に制御され
る。l’i’i) RA M 7のデータはハソテリ1
1によってバックアップされ−(いる。
DESCRIPTION OF THE EMBODIMENTS FIG. 2 is a block diagram showing the structure of an embodiment of the electronic presen 1-counter according to the present invention. In this figure, an input signal (3) is applied from a rotary encoder or the like to the human power section 1 (3) in response to the movement of the controlled object. The counting unit 1 converts the level of this signal, shapes the waveform, and sends it to the central processing unit (hereinafter referred to as CP) via the input interface 2.
3) (referred to as U). Connected to the input interface 2 are a control input section 4 for receiving a reset signal and a gate signal, and a program input section 5 for writing a program by the user. In addition, the CPU 3 has a read-only memory (1a) as a storage device that records its calculation processing procedures.
(hereinafter referred to as ROM) [j, and random access memory (hereinafter referred to as RAM) that stores user programs, etc.
c) 7 is set. As will be described later, the CPU 3 outputs a predetermined output when the count value set by the Kneesab IJ Grad reaches 7, and the output is sent to the display section 9 and the output circuit 10 via the output interface LI 8. It is being revived. The output circuit 10 is provided with a plurality of output terminals Y-, which are selectively controlled by the output circuit 10. l'i'i) RAM 7 data is Hasoteri 1
Backed up by 1 -(.

第3図はRAM7の記憶内容を示すメモリマツプである
。RAM7には第3図ta)に示すようにステップトス
テツプNまでのプログラムを記憶したユーザプログラム
領域の他に、現在実行中のステップ番号を示すステップ
カウンタ領域、そのステップに書かれている設定値を記
憶する比較レジスタ領域、及び計数入力部1から与えら
れる入力に応じてインクリメントされ、入力パルス数を
計数する計数部を構成する入力カウンタ領域が設りられ
る。ユーザプログラムの各ステップは第3図(b)に詳
細に示すようにステップ番号を記憶する領域と、出力操
作をするための計数値を設定する設定値領域及び出力命
令と制御命令の領域が含まれる。出力命令は出力回路1
0の出力端を指定する出力端子領域と出力モード、例え
ばセント出力。
FIG. 3 is a memory map showing the contents stored in the RAM 7. As shown in Figure 3 (ta), the RAM 7 has a user program area that stores the program up to step N, a step counter area that shows the step number currently being executed, and a setting value written in that step. A comparison register area for storing data, and an input counter area which is incremented according to the input from the counting input section 1 and constitutes a counting section that counts the number of input pulses are provided. Each step of the user program includes an area for storing step numbers, a setting value area for setting count values for output operations, and an area for output commands and control commands, as shown in detail in FIG. 3(b). It will be done. Output command is output circuit 1
Output terminal area to specify the output terminal of 0 and output mode, for example, cent output.

リセット出力、一致出力やワンショット出力等の出力形
態を指定する出力モード領域が設けられ、又制御命令と
してはプログラムの終了を指定するエンドフラグと入力
カウンタの計数値をクリアするクリア命令の領域を有し
ている。
An output mode area is provided to specify output formats such as reset output, match output, and one-shot output, and an area for control instructions includes an end flag that specifies the end of the program, and a clear instruction area that clears the count value of the input counter. have.

第1図は本実施例における電子式プリセットカウンタの
動作を示すフローチャートである。このフローチャー1
−に、[、′いて引出線を用いて示す番号はCPU3の
動作ステップである。本図においてまずステップ21で
RA M 7のステップカウンタを1とする。そしてス
テップ22に進んでステップカウンタが示すステップの
設定値を比較レジスタに七ノドする。次いでステップ2
3に進んで制御入力部4よりリセソ1人力があるかとう
かをチェックする。リセット入力があればステップ24
.25においてRAM7の人力カウンタをクリアし、全
ての出力をオフとしてステップ26に進む。ステップ2
3においてリセット入力がなけれは、これらの処理を行
うことなく計数入力部1より計数入力があるかどうかを
チェックする(ステップ26)。計数入力があればステ
ップ27に進んで加算入力であるかど・うかをチェック
し、加算入力である場合にば入力カウンタをインクリメ
ントしくステップ28)、加算入力でなければ減算入力
であるのでステップ29において人力カウンタをデクリ
メン1〜しステップ30に進む。計数人力がなければこ
れらの処理を行うことなくステップ30に進んで人力カ
ウンタのd1数イ直がIt軸し/ジスタと ・致1.゛
ζいる力・と゛うかをチェックする。これが一致してい
なければステ。
FIG. 1 is a flowchart showing the operation of the electronic preset counter in this embodiment. This flowchar 1
The numbers shown using leader lines in - and [,' are operation steps of the CPU 3. In this figure, first, in step 21, the step counter of RAM 7 is set to 1. The process then proceeds to step 22, where the set value of the step indicated by the step counter is stored in the comparison register. Then step 2
Proceeding to step 3, it is checked from the control input section 4 whether or not there is one-man power for recessing. If there is a reset input, step 24
.. At step 25, the manual counter in the RAM 7 is cleared, all outputs are turned off, and the process proceeds to step 26. Step 2
If there is no reset input in step 3, it is checked whether there is a count input from the count input section 1 without performing these processes (step 26). If there is a count input, proceed to step 27 to check whether it is an addition input, and if it is an addition input, increment the input counter (step 28); if it is not an addition input, it is a subtraction input, so proceed to step 29. Decrement the manual counter from 1 to proceed to step 30. If there is no manual counting, the process proceeds to step 30 without performing these processes, and the manual counter's d1 number is set to the It axis. Check the power and whether there is ゛ζ. If this doesn't match, move on.

プ23に戻り、計数人力によって入力カウンタの値が比
較レジスタと一致するまで同様の処理を繰り返す。そし
て入力カウンタの計数値が比較レジスタに一致する場合
には、ステップ31に進んでステップカウンタが示すス
テップの出力命令によって指定された出力モードを指定
された出力端子に出力する。そしてステップ32に進ん
でそのステップの制御命令のクリアフラグが立っている
かどうかをチェックする。このフラグが立っていれば入
力カウンタをクリアしくステップ33)、このフラグか
立っていなければごの処理を行うことなくステップ34
に進んで制御命令のエン1:フラグが立っているかどう
かをチェックする。エンドフラグが立っていなげればス
テップカウンタをインクリメントしてステップ22に進
んで同様の処理を繰り返し、エンドフラグが立っている
場合には処理を終了する。こうずれはユーザプログラム
の所望の制御命令にクリアフラグを立てておくだ&Jで
出力回路10.1−りその制御動1′Iり1−1わlす
る、1.同■、“IO2二人力レシスタの計数値をクリ
゛ノ2することができ、新に計数を開始させて制御を続
けることか可能となる。
Returning to step 23, the same process is repeated until the value of the input counter matches the value of the comparison register by manual counting. If the count value of the input counter matches the comparison register, the process proceeds to step 31, where the output mode specified by the output command of the step indicated by the step counter is output to the specified output terminal. Then, the process proceeds to step 32, where it is checked whether the clear flag of the control command of that step is set. If this flag is set, clear the input counter (step 33); if this flag is not set, proceed to step 34).
Proceed to step 1 and check whether the control command En1: Flag is set. If the end flag is not set, the step counter is incremented and the process proceeds to step 22 to repeat the same process, and if the end flag is set, the process is terminated. To avoid this, set a clear flag in the desired control command of the user program. 2, "The count value of the IO2 two-man resistor can be reset, and it is possible to start counting anew and continue control.

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

第1図は本発明による電子式プリセットカウンタの一実
施例の動作を示すフローチャー1・、第2図はそのブロ
ック図、第3図(a)はRAM7の記憶内容を示す図、
第3図(blはその各ステップの内容を示ずメモリマツ
プてあり、第4図(al及び第4図(blは従来の電子
式ブリナノ1−カウンクを所定計数時にクリアするだめ
の外部回路をイ」加した例を示ずし1である。 1−=計数入力部 2 人力インターフェイス 3−−
−CPl、J 4=−制御入力部 5−−−−プログラ
ム入力部 6−−ROM 7一−RAM 8 出力イン
ターフェイス 9−表示部 10−−−出力回路 第2図 第3図(a)
FIG. 1 is a flowchart 1 showing the operation of an embodiment of the electronic preset counter according to the present invention, FIG. 2 is a block diagram thereof, and FIG. 3(a) is a diagram showing the storage contents of the RAM 7.
Figure 3 (bl is a memory map without showing the contents of each step), Figure 4 (al) and Figure 4 (bl) are an example of an external circuit for clearing the conventional electronic Blinano 1-count at a predetermined count time. ” is shown in 1. 1-=Count input section 2 Human interface 3--
-CPl, J 4=-Control input section 5----Program input section 6--ROM 71-RAM 8 Output interface 9-Display section 10--Output circuit Fig. 2 Fig. 3 (a)

Claims (1)

【特許請求の範囲】[Claims] (1)クロック入力を計数する計数部と、計数設定値及
び該計数設定に対応した出力状態を記f、gする記憶手
段とを有し、前記計数部の計数値に基づいて出力操作を
行う電子式プリセットカウンタにおいて、 前記記憶手段は計数設定値を記憶する計数設定部、出力
指定部及び入力計数値をクリアするクリア命令を含む一
連のステップを有するものであり、前記記憶手段の一連
のステップの計数設定部の設定値が順次与えられ、前記
計数部の計数値と比較する比較手段と、 順次前記記憶手段の一連のステップを読出して前記比較
手段に与え、前記比較器の一致出力に基づいてそのステ
ップの出力命令を実行すると共に、そのステップにクリ
ア命令が立てられているときに前記計数部の計数値をク
リアするクリア制御を行う制御部と、を具備することを
特徴とする電子式プリセットカウンタ。
(1) It has a counting section that counts clock inputs, and a storage means that records count setting values and output states corresponding to the counting settings, and performs output operations based on the counted values of the counting section. In the electronic preset counter, the storage means has a series of steps including a count setting section for storing a count setting value, an output specification section, and a clear command for clearing the input count value, and the series of steps of the storage means a comparison means for sequentially giving the setting value of the count setting section and comparing it with the count value of the counting section; and a control unit that executes the output command of the step and performs clear control to clear the counted value of the counting unit when a clear command is issued for the step. Preset counter.
JP59110561A 1984-05-29 1984-05-29 Electronic preset counter Expired - Lifetime JP2696811B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59110561A JP2696811B2 (en) 1984-05-29 1984-05-29 Electronic preset counter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59110561A JP2696811B2 (en) 1984-05-29 1984-05-29 Electronic preset counter

Publications (2)

Publication Number Publication Date
JPS60251721A true JPS60251721A (en) 1985-12-12
JP2696811B2 JP2696811B2 (en) 1998-01-14

Family

ID=14538950

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59110561A Expired - Lifetime JP2696811B2 (en) 1984-05-29 1984-05-29 Electronic preset counter

Country Status (1)

Country Link
JP (1) JP2696811B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5523559A (en) * 1978-08-09 1980-02-20 Toshiba Corp Schedule operation control unit
JPS5611503A (en) * 1979-07-11 1981-02-04 Japan Atom Energy Res Inst Control method of timing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5523559A (en) * 1978-08-09 1980-02-20 Toshiba Corp Schedule operation control unit
JPS5611503A (en) * 1979-07-11 1981-02-04 Japan Atom Energy Res Inst Control method of timing

Also Published As

Publication number Publication date
JP2696811B2 (en) 1998-01-14

Similar Documents

Publication Publication Date Title
JPH0764770A (en) Microcontroller apparatus provided with remotely writable eprom and writing method
JPH0256690B2 (en)
EP0182126A2 (en) Directing storage requests during master mode operation
DE19652290C2 (en) Microcomputer
JPS60251721A (en) Electronic preset counter
JPS62164299A (en) Microcomputer device
JPS60169906A (en) Programmable controller
JP3335728B2 (en) Programmable controller
JPS60232718A (en) Electronic type preset counter
JPS60232720A (en) Electronic type preset counter
JPH07334214A (en) Programmable controller
JP2918570B2 (en) Central processing unit
JP2762665B2 (en) Blog programming device for programmable controller
JPS6041133A (en) Correcting method of control program
JPS5931745B2 (en) Unused program number display method
JPS63166097A (en) Rom writer cartridge
JPH06175883A (en) Program debugger
JPS59153247A (en) Debugging device
JPH02136921A (en) Register access system
JPS63126007A (en) Programmable controller
JPS5866155A (en) Integrated circuit device
JPH08115253A (en) Memory unit and data rewrite method
JPS60550A (en) Magnetic bubble memory device
JPH01159752A (en) Input/output controller address setting system
JPH01204118A (en) Information processor