[go: up one dir, main page]

JPH0623921B2 - Counter device - Google Patents

Counter device

Info

Publication number
JPH0623921B2
JPH0623921B2 JP58245134A JP24513483A JPH0623921B2 JP H0623921 B2 JPH0623921 B2 JP H0623921B2 JP 58245134 A JP58245134 A JP 58245134A JP 24513483 A JP24513483 A JP 24513483A JP H0623921 B2 JPH0623921 B2 JP H0623921B2
Authority
JP
Japan
Prior art keywords
set value
value
counter
address
signal
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
JP58245134A
Other languages
Japanese (ja)
Other versions
JPS60140928A (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.)
Koyo Electronics Industries Co Ltd
Original Assignee
Koyo Electronics Industries Co 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 Koyo Electronics Industries Co Ltd filed Critical Koyo Electronics Industries Co Ltd
Priority to JP58245134A priority Critical patent/JPH0623921B2/en
Publication of JPS60140928A publication Critical patent/JPS60140928A/en
Publication of JPH0623921B2 publication Critical patent/JPH0623921B2/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

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、多段設定形のカウンタ装置に関するものであ
る。更に詳しくは、本発明は、軸の回転角や移動距離等
に応じて出力される例えばロータリエンコーダからのパ
ルスを計数し、あらかじめ設定した所定の計数値になつ
たら制御信号を出力するようなカウンタ装置に関するも
のである。
Description: TECHNICAL FIELD OF THE INVENTION The present invention relates to a multistage setting type counter device. More specifically, the present invention is a counter that counts the pulses output from, for example, a rotary encoder in accordance with the rotation angle of the shaft, the moving distance, etc., and outputs a control signal when a preset count value is reached. It relates to the device.

〔従来技術の説明〕[Description of Prior Art]

従来この種のカウンタ装置は、カムスイツチやリミツト
スイツチ等を使用して構成されたものであつて、そのた
め全体構成が複雑で、かつ大形なものであつた。また、
速度も遅く、精度的にも限界があるうえに、工程等を変
更する場合は、カムスイツチを入れ替える等、取扱いが
煩しいという種々の問題があつた。
Conventionally, this type of counter device has been constructed by using a cam switch, a limit switch or the like, so that the whole structure is complicated and large. Also,
There are various problems in that the speed is slow, there is a limit in accuracy, and when the process or the like is changed, the cam switch is replaced and the handling is complicated.

〔発明の概要〕[Outline of Invention]

本発明は、このような従来技術における問題点に鑑みて
なされたものであつて、設定値を電気的に設定、記憶さ
せることにより、設定点数、出力点数を多くとれ、しか
も高速、高精度で、装置の小形化を可能にしたカウンタ
装置を提供するものである。
The present invention has been made in view of the above problems in the prior art, and by electrically setting and storing a set value, a large number of set points and output points can be obtained, and high speed and high accuracy are achieved. The present invention provides a counter device that enables downsizing of the device.

本発明に係るカウンタ装置は、複数の設定値を所定の順
序、例えば小さい順又は大きい順に規則的に並べて予め
記憶しておく記憶装置を備えている。そして、この記憶
装置から、隣接する2つの設定値でかつカウンタ計数値
を挾み込む2つの設定値を呼び出し、この2つの設定値
を常に待機させる。そして、この2つの設定値とカウン
タ計数値とをそれぞれ比較して、一致信号が得られたな
らば、その旨の信号を送出するように構成している。
The counter device according to the present invention includes a storage device that stores a plurality of set values in a predetermined order, for example, in order of increasing or decreasing order. Then, from this storage device, two set values that are adjacent to each other and that sandwich the counter count value are called, and these two set values are always on standby. Then, the two set values and the counter count value are compared with each other, and if a coincidence signal is obtained, a signal to that effect is transmitted.

即ち、第1の発明に係るカウンタ装置は、直線運動に伴
つて発生するパルス信号を計数するハード構成のカウン
タと;複数の設定値が小さい順又は大きい順に配列され
て記憶されている設定値記憶手段と;第1の設定値と、
該第1の設定値より大きな値のアドレスに設定されてい
る第2の設定値とからなる2つの設定値であつて、かつ
前記カウンタの計数値を挾み込む2つの隣接する設定値
を、該設定値記憶手段から読み出して設定する設定値レ
ジスタと;前記カウンタの計数値と前記第1の設定値と
が一致したとき設定値に対応した制御出力信号を出力す
ると共に第1の一致信号を出力する前記第1の一致信号
を出力し、前記カウンタの計数値と前記第2の設定値と
が一致したとき設定値に対応した制御出力信号を出力す
ると共に第2の一致信号を出力する比較手段と;前記第
1の一致信号を入力すると、前記レジスタに読み出す設
定値のアドレス信号を1減少し、前記第2の一致信号を
入力すると、前記レジスタに読み出す設定値のアドレス
信号を1増加し、隣接した値の2つのアドレス信号を前
記設定値記憶手段に供給してそのアドレスに該当する2
つの設定値を前記設定値レジスタに設定させる設定値読
出しカウンタとを有するものであり、また、第2の発明
に係るカウンタ装置は、円運動に伴つて発生するパルス
信号を計数するハード構成のカウンタと;最小アドレス
値から最大アドレス値までの所定の領域に連続的に複数
の設定値が小さい順又は大きい順に配列されて記憶され
ている設定値記憶手段と;第1の設定値と、該第1の設
定値より大きな値のアドレスに設定されている第2の設
定値とからなる2つの設定値であつて、かつ前記カウン
タの計数値を挾み込む2つの隣接する設定値を、前記設
定値記憶手段から読み出して設定する設定値レジスタ
と;前記カウンタの計数値と前記第1の設定値とが一致
したとき設定値に対応した制御出力信号を出力すると共
に第1の一致信号を出力し、前記カウンタの計数値と前
記第2の設定値とが一致したとき設定値に対応した制御
出力信号を出力すると共に第2の一致信号を出力する比
較手段と; 前記第1の一致信号を入力すると、前記レジスタに読み
出す設定値のアドレス信号を1減少し、アドレス信号が
最小アドレス値より小となつたときは最大アドレス値を
設定し、また、前記第2の一致信号を入力すると、前記
レジスタに読み出す設定値のアドレス信号を1増加し、
アドレス信号が最大アドレス値より大となつたと時は最
小アドレス値を設定し、隣接した値の2つのアドレス信
号を前記設定値記憶手段に供給してそのアドレスに該当
する2つの設定値を前記設定値レジスタに設定させる設
定値読出しカウンタとを有するものである。
That is, the counter device according to the first aspect of the present invention includes a hard-structured counter that counts pulse signals generated along with linear movement; a set value storage in which a plurality of set values are arranged and stored in ascending or descending order. Means; a first set value,
Two adjacent set values, which are two set values consisting of a second set value set to an address larger than the first set value, and which sandwich the count value of the counter, A set value register which is read from the set value storage means and set; and when a count value of the counter and the first set value match, a control output signal corresponding to the set value is output and a first match signal is output. Outputting the first coincidence signal to be output, outputting a control output signal corresponding to the set value when the count value of the counter coincides with the second set value, and outputting a second coincidence signal Means; when the first match signal is input, the address signal of the set value to be read to the register is decremented by 1, and when the second match signal is input, the address signal of the set value to be read to the register is incremented by 1. , 2 the two address signals adjacent values is supplied to the setting value storing means corresponding to the address
And a set value read counter for setting one set value in the set value register, and the counter device according to the second invention is a hardware-structured counter that counts pulse signals generated with circular motion. A set value storage means in which a plurality of set values are continuously arranged and stored in a predetermined area from a minimum address value to a maximum address value in an ascending or descending order; a first setting value; The two setting values consisting of a second setting value set to an address larger than the setting value of 1 and two adjacent setting values that sandwich the count value of the counter are set as the setting values. A set value register which is read out from the value storage means and set; when a count value of the counter and the first set value match, a control output signal corresponding to the set value is output and a first match signal is output. Comparing means for outputting a control output signal corresponding to the set value and a second match signal when the count value of the counter and the second set value match; the first match signal; When the input signal is input, the address signal of the set value read out to the register is decremented by 1, the maximum address value is set when the address signal is smaller than the minimum address value, and when the second match signal is input, Increment the address signal of the set value read to the register by 1,
When the address signal becomes larger than the maximum address value, the minimum address value is set, and two address signals having adjacent values are supplied to the set value storage means to set the two set values corresponding to the address. And a set value read counter for setting the value register.

[実施例] 次に、本発明をその実施例に基づいて説明する。Example Next, the present invention will be described based on the example.

第1図は本発明の実施例に係るカウンタ装置の全体構成
を示すブロツク図で、第2図そのハード構成を示すブロ
ツク図である。
FIG. 1 is a block diagram showing the overall configuration of a counter device according to an embodiment of the present invention, and FIG. 2 is a block diagram showing its hardware configuration.

第1図において、(1)は図示していない例えばエンコー
ダからのパルス信号が供給され、これを計数するカウン
タで、ハード構成(デスクリート構成)からなつてい
る。(2)は、配列設定値記憶手段で、全設定値が小さい
順又は大きい順に並びかえられて配列され、記憶されて
いる。(3)は設定値レジスタで、配列設定値記憶手段(2)
から隣接する2つの設定値でかつカウンタ(1)の計数値
を挾み込むような2つの設定値を読出して設定する。
(4)は比較手段であり、カウンタ(1)の出力と設定値レジ
スタ(3)の設定値との一致についての比較を行ない、そ
の比較結果に応じた信号を送出する。(5)は設定値読出
しカウンタで、比較手段(4)からの信号に基づき、配列
設定値記憶手段(2)の多数の設定値の中で、次に比較用
設定値となる設定値が記憶されている番地信号を送出
し、配列設定値記憶手段(2)から設定値レジスタ(3)にそ
の設定値を送出させる。
In FIG. 1, (1) is a counter that is supplied with a pulse signal from an encoder (not shown) and counts the pulse signal, which has a hardware configuration (discrete configuration). (2) is an array set value storage means, in which all set values are rearranged and arranged and stored in ascending or descending order. (3) is a set value register, which is an array set value storage means (2)
From the two adjacent two set values, the two set values that sandwich the count value of the counter (1) are read and set.
(4) is a comparison means, which compares the output of the counter (1) with the set value of the set value register (3) and sends a signal according to the comparison result. (5) is a set value read counter, which stores the set value to be the next set value for comparison among the many set values in the array set value storage means (2) based on the signal from the comparison means (4). The specified address signal is sent out, and the set value is sent from the array set value storage means (2) to the set value register (3).

以上のカウンタ(1)、配列設定値記憶手段(2)、設定値レ
ジスタ(3)、比較手段(4)及び設定値読出しカウンタ(5)
は、本発明の主要部をなすものであり、その詳細は後述
するとおりである。
The above counter (1), array set value storage means (2), set value register (3), comparison means (4) and set value read counter (5)
Is the main part of the present invention, and the details thereof will be described later.

また、第1図において、(11)は各設定No(制御出力φ1
〜φn とそれに対応する設定値を入力する設定値入力
手段で、例えばキーボードが使用される。(12)は第1の
モード選択手段で、少なくとも運転モードと設定モード
とを選択でき、各モードを示す信号を送出する。(13)は
第2のモード選択手段で、一軸上動作と円周動作(周期
動作)とを選択でき、各モードを示す信号を送出する。
Further, in FIG. 1, (11) indicates each setting No. (control output φ1
A keyboard is used, for example, as a set value input means for inputting ~ φn and the set values corresponding thereto. (12) is a first mode selection means, which can select at least an operation mode and a setting mode, and sends a signal indicating each mode. (13) is a second mode selecting means, which can select one-axis operation and circumferential operation (periodic operation), and sends a signal indicating each mode.

(14)はデータ転送手段で、設定値入力手段(11)からの設
定値、及びモード選択手段(12),(13)からのモード信号
が供給され、これらの入力情報に基づいて各種のデータ
転送を行なう。(15)は設定値記憶手段で、データ転送手
段(14)を介して各設定Noに対応した設定値が多数記憶さ
れる。この記憶は、モード選択手段(12)が設定モードに
選択されている時に行なわれる。また、設定値記憶手段
(15)にランダムに入力された設定値は、データ転送手段
(14)を介して、その値の小さい順又は大きい順に並びか
えられて、配列設定値記憶手段(2)に記憶される。
(14) is a data transfer means, to which the set value from the set value input means (11) and the mode signal from the mode selection means (12) and (13) are supplied, and various data are supplied based on these input information. Transfer. A set value storage means (15) stores a large number of set values corresponding to each setting number via the data transfer means (14). This storage is performed when the mode selection means (12) is selected in the setting mode. Also, the set value storage means
The setting value randomly input in (15) is the data transfer means.
The values are sorted via the (14) in ascending or descending order and stored in the array set value storage means (2).

(16)は出力命令手段で、比較手段(4)からの一致信号及
びデータ転送手段(14)からの出力命令信号が供給され、
該当する出力番号の制御出力(オン又はオフ)の信号を
出力回路(17)に送出する。(18)は表示駆動手段で、カウ
ンタ(1)の出力(計数値)、データ転送手段(14)からの
設定値及び各制御出力の状態(オンかオフ)が供給さ
れ、これらの値が表示装置(19)にテイジタル値等によつ
て表示される。
(16) is an output command means, the match signal from the comparison means (4) and the output command signal from the data transfer means (14) are supplied,
The control output (ON or OFF) signal of the corresponding output number is sent to the output circuit (17). (18) is a display drive means, which is supplied with the output (count value) of the counter (1), the set value from the data transfer means (14) and the state of each control output (on or off), and displays these values. It is displayed on the device (19) by a digital value or the like.

次に、第1図と第2図の対応関係を説明する。Next, the correspondence between FIG. 1 and FIG. 2 will be described.

第2図において、カウンタ(1)は、第1図のカウンタ(1)
の他に比較手段(4)を内蔵している。(31)はカウンタ(1)
に結合しているマイクロプロセツサで、ROM(32)に記
憶されているプログラムに従つて各種の演算動作を行な
う。このマイクロプロセッサ(31)及びROM(32)は、第
1図における設定値レジスタ(3)、設定値読出しカウン
タ(5)、データ転送手段(14)、出力命令手段(16)及び表
示駆動手段(18)としての機能を有している。(33)はRA
Mであり、配列設定値記憶手段(2)及び設定値記憶手段
(15)としての機能を有している。そして、設定入力手段
に相当するキーボード(11)、モード選択スイツチ(12),
(13)、表示器(19)、ROM(32)及びRAM(33)がデータ
バスを介してマイクロプロセツサ(31)に結合している。
また、マイクロプロセツサ(31)には、出力回路(17)が結
合しており、カウンタ(1)内の比較手段の比較結果に基
づいて外部に制御出力を送出する。なお、第1図には図
示しなかつたが、カセツトインターフエイス(34)を設け
て、必要なプログラムをカセツトテープ(図示せず)に
録音したり、テープから自動的プログラムを書き込むよ
うにしてもよい。
In FIG. 2, the counter (1) is the counter (1) of FIG.
In addition to this, the comparison means (4) is incorporated. (31) is the counter (1)
The microprocessor connected to the CPU performs various arithmetic operations according to the program stored in the ROM (32). The microprocessor (31) and the ROM (32) include a set value register (3), a set value read counter (5), a data transfer means (14), an output command means (16) and a display drive means (shown in FIG. 1). It has the function as 18). (33) is RA
M, array setting value storage means (2) and setting value storage means
It has the function as (15). A keyboard (11) corresponding to the setting input means, a mode selection switch (12),
(13), display (19), ROM (32) and RAM (33) are coupled to the microprocessor (31) via a data bus.
Further, an output circuit (17) is coupled to the microprocessor (31) and sends a control output to the outside based on the comparison result of the comparison means in the counter (1). Although not shown in FIG. 1, even if a cassette interface (34) is provided to record a required program on a cassette tape (not shown) or write an automatic program from the tape, Good.

上記の実施例では、比較手段(4)をカウンタ(1)に内蔵し
た例を示したが、マイクロプロセツサ(31)とROM(32)
によつて構成してもよいし、また、別置の比較演算器に
よつて構成してもよい。設定値読出しカウンタ(5)も別
置のハード構成(デイスクリート構成)でもよい。
In the above embodiment, the comparison means (4) is incorporated in the counter (1), but the microprocessor (31) and the ROM (32) are included.
May be used, or a separate comparison calculator may be used. The set value read counter (5) may also have a separate hardware configuration (discrete configuration).

次に、本実施例に係る装置の動作を本発明の主要部を中
心に説明する。
Next, the operation of the apparatus according to this embodiment will be described focusing on the main part of the present invention.

最初、モード選択手段(12)は設定モードに選択され、設
定値が設定値入力手段(11)により入力され、データ転送
手段(14)を介して設定値記憶手段(15)に記憶される。次
に、その設定値は、データ転送手段(14)により小さい順
に読み出され、配列設定値記憶手段(2)に小さい順に並
べられて記憶される。この方法自体周知であるから、こ
こではその説明は省略する。
First, the mode selection means (12) is selected to the setting mode, the set value is input by the set value input means (11), and is stored in the set value storage means (15) via the data transfer means (14). Next, the set values are read by the data transfer means (14) in the ascending order, and are arranged and stored in the array set value storage means (2) in the ascending order. Since this method is well known, its explanation is omitted here.

次に、モード選択手段(12)が運転モードで、モード選択
手段(13)が一軸上の動作に選択されている場合について
説明する。
Next, the case where the mode selection means (12) is in the operation mode and the mode selection means (13) is selected for the operation on one axis will be described.

その説明に先だつて、第1図に示したブロツク図のう
ち、本発明の主要部をさらに詳細に図示したブロツク図
を第3図に示し、その概要を説明する。同図において、
第1図と同一符号は同一のものを示し、設定値カウンタ
(3)は2つの設定値レジスタ(3A),(3B)から構成され、
比較手段(4)は2つの比較回路器(4A),(4B)から構成さ
れ、そして、設定値読出しカウンタ(5)も2つの設定値
読出しカウンタ(5A),(5B)から構成されている。
Prior to the explanation, a block diagram showing the main part of the present invention in more detail among the block diagrams shown in FIG. 1 is shown in FIG. 3 and its outline will be described. In the figure,
The same reference numerals as those in FIG.
(3) consists of two set value registers (3A) and (3B),
The comparison means (4) is composed of two comparison circuit units (4A) and (4B), and the set value read counter (5) is also composed of two set value read counters (5A) and (5B). .

次に、上記の場合の動作を第4図のフローチヤートに基
づいて説明する。
Next, the operation in the above case will be described based on the flow chart of FIG.

配列設定値記憶手段(2)の最大番地n以下の値、Niお
よびNi+1をそれぞれ設定値読出しカウンタ(5A),(5
B)に書き込む。そしてNiで示される番地に入つている
配列設定値記憶手段(2)の設定値Aiを設定値レジスタ
(3A)に書き込み、Ni+1で示される番地の設定値Ai
+1を設定値レジスタ(3B)に書き込む。
The values of the array set value storage means (2) equal to or lower than the maximum address n, Ni and Ni + 1, are set value read counters (5A) and (5), respectively.
Write to B). Then, the set value Ai of the array set value storage means (2) contained in the address indicated by Ni is set in the set value register.
Write in (3A) and set value Ai of the address indicated by Ni + 1
Write +1 to the set value register (3B).

なお、ここでAiおよびAi+1の値は、設定値レジスタ(3
A)の値(Ai)<カウンタ(1)の値Nc(t))<設定値レジ
スタ(3B)の値(Ai+1)となるような値がCPU(31)
の上記操作により設定される(ステツプ1)。これは第
5図に示すような状態になる。
Here, the values of Ai and Ai + 1 are set value registers (3
A value such that (A) value (Ai) <counter (1) value Nc (t)) <setting value register (3B) value (Ai + 1)
Is set by the above operation (step 1). This results in the state shown in FIG.

次に、カウンタ(1)の値と設定値レジスタ(3A),(3B)の
値とが比較される(ステツプ2)。カウンタ(1)の値は
計数入力によつて刻々変化し、いずれか一方の設定値レ
ジスタ(3A),(3B)の値と一致すると、比較回路(4A),(4
B)は一致出力を送出する(ステツプ3)。設定値レジス
タ(3A)の値(Ai)とカウンタ(1)の値(Nc(t))とが一致
した場合には、設定値(Ai)に対応した制御出力が出力命
令手段(16)を介して出力回路(17)に送られ、また、表示
駆動手段(18)を介して表示器(19)に送られる(ステツプ
4;第1図参照)。そして比較回路(4A)の一致信号Aが
設定値読出しカウンタ(5A),(5B)に供給されて、各カウ
ンタの値を「1」だけ減じる(ステツプ5)。一方、設
定値レジスタ(3B)の値(Ai+1)とカウンタの値((Nc
(t))とが一致した場合には、設定値(Ai+1)に対応し
た制御出力が上記と同様に出力回路(17)及び表示器(19)
に送られる(ステツプ6)。そして、比較回路(4B)の一
致信号Bが設定値読出しカウンタ(5A),(5B)に供給され
て、各カウンタの値を「1」だけ増やす(ステツプ
7)。
Next, the value of the counter (1) and the values of the set value registers (3A) and (3B) are compared (step 2). The value of the counter (1) changes every moment according to the counting input, and if it matches the value of either one of the set value registers (3A) and (3B), the comparison circuits (4A) and (4
B) sends a coincidence output (step 3). When the value (Ai) of the set value register (3A) and the value (Nc (t)) of the counter (1) match, the control output corresponding to the set value (Ai) outputs the output command means (16). It is sent to the output circuit (17) through the display drive means (18) and to the display device (19) through the display drive means (18) (step 4; see FIG. 1). Then, the coincidence signal A of the comparison circuit (4A) is supplied to the set value reading counters (5A) and (5B), and the value of each counter is decremented by "1" (step 5). On the other hand, the set value register (3B) value (Ai + 1) and the counter value ((Nc
(t)) match, the control output corresponding to the set value (Ai + 1) is output circuit (17) and display (19) as above.
(Step 6). Then, the coincidence signal B of the comparison circuit (4B) is supplied to the set value read counters (5A) and (5B) to increase the value of each counter by "1" (step 7).

次に、各カウンタ(5A),(5B)のアドレス信号に対応する
配列記憶手段(2)の設定値を設定値カウンタ(3A),(3B)
にそれぞれ読出して、ステツプ2に戻る。従つて、一致
信号Aが発生したときには、カウンタ(1)の値と設定値
カウンタ(3A),(3B)との関係は第6A図に示すようにな
り、一致信号Bが発生したときは第6B図に示すように
なる。
Next, set values of the array storage means (2) corresponding to the address signals of the respective counters (5A) and (5B) are set value counters (3A) and (3B).
, And the process returns to step 2. Therefore, when the coincidence signal A is generated, the relationship between the value of the counter (1) and the set value counters (3A) and (3B) is as shown in FIG. 6A. As shown in FIG. 6B.

次に、選択モードが円周動作(周期動作)の場合を第7
A図及び第7B図に示したフローチヤートに基づいて説
明する。この場合、配列設定値記憶手段(2)には1番地
からn番地まで設定値が記憶されているものとする。
Next, if the selection mode is the circumferential operation (periodic operation),
Description will be made based on the flow chart shown in FIGS. In this case, it is assumed that the array set value storage means (2) stores set values from address 1 to address n.

第7A図に示されるステツプ1〜ステツプ7(〜)
第4図に示したステツプ内容と同一であるからその説明
省略する。
Steps 1 to 7 (to) shown in FIG. 7A
Since the contents are the same as the steps shown in FIG. 4, the description thereof will be omitted.

第7B図において、一致信号Aが発生している場合は設
定値読出しカウンタ(5B)の値が「1」より小であるか否
かについての比較が行なわれ(ステツプ8)、「1」よ
り小の場合には設定値読出しカウンタ(5B)に最大番地、
すなわち「n」が書き込まれる。一方、設定値読出しカ
ウンタ(5B)の値が「1」以上である場合は、設定値読出
しカウンタ(5A)の値が「1」より小であるか否かについ
ての比較が行なわれる(ステツプ10)。
In FIG. 7B, when the coincidence signal A is generated, a comparison is made as to whether or not the value of the set value read counter (5B) is smaller than "1" (step 8), and from "1". When the value is small, the maximum address is displayed in the set value read counter (5B).
That is, "n" is written. On the other hand, when the value of the set value read counter (5B) is "1" or more, a comparison is made as to whether the value of the set value read counter (5A) is smaller than "1" (step 10). ).

「1」より小の場合には、設定値読出しカウンタ(5A)に
「n」が書き込まれる(ステツプ11)。
If it is smaller than "1", "n" is written in the set value reading counter (5A) (step 11).

「1」以上の場合には設定読出しカウンタ(5A),(5B)の
値はそのまとし、変更しない。
If it is "1" or more, the values of the setting read counters (5A) and (5B) remain unchanged and are not changed.

また、一致信号Bが発生している場合は、設定値読出し
カウンタ(5A)の値が「n」より大であるか否かについて
の比較が行なわれ(ステツプ12)「n」より大の場合に
は設定値読出しカウンタ(5A)に「1」が書き込まれる
(ステツプ13)。一方、設定読出しカウンタ(5A)の値
が「n」以下である場合には、設定値読出しカウンタ(5
B)の値が「n」より大であるか否かについての比較が行
なわれる(ステツプ14)。「n」より大の場合には、
設定値読出しカウンタ(5B)に「1」が書き込まれる(ス
テツプ15)。「n」以下の場合には設定値読出しカウ
ンタ(5A),(5B)の値はそのままとし、変更しない。
When the coincidence signal B is generated, a comparison is made as to whether or not the value of the set value read counter (5A) is larger than "n" (step 12). "1" is written in the set value reading counter (5A) (step 13). On the other hand, when the value of the setting read counter (5A) is "n" or less, the set value read counter (5A)
A comparison is made as to whether the value of B) is greater than "n" (step 14). If greater than "n",
"1" is written in the set value read counter (5B) (step 15). If the value is "n" or less, the values of the set value read counters (5A) and (5B) remain unchanged and are not changed.

そして、設定値読出しカウンタ(5A),(5B)に示される番
地の設定値を設定値レジスタ(3A),(3B)に書き込み(ス
テツプ16)、ステツプ2に戻る。
Then, the set values of the addresses indicated by the set value read counters (5A) and (5B) are written into the set value registers (3A) and (3B) (step 16), and the process returns to step 2.

従つて、上述のカウンタ(1)と設定値読出しカウンタ(5
A),(5Bの値との関係を図面に基づいて説明すれば次の
とおりである。
Therefore, the counter (1) and set value read counter (5
The relationship between the values A) and (5B) will be described below with reference to the drawings.

(1)ステツプ1−2−3−4−5−8−9−16の場合;
ステツプ2では第8−1図(a)に示す状態で、ステツプ
16では第8−1図(b)に示す状態となる。
(1) In the case of step 1-2-3-4-5-8-9-16;
Step 2 is in the state shown in FIG. 8-1 (a), and step 16 is in the state shown in FIG. 8-1 (b).

(2)ステツプ1−2−3−4−5−8−10−11−1
6の場合;ステツプ2では第8−2図(a)に示す状態
で、ステツプ16では第8−2図(b)に示す状態とな
る。
(2) Step 1-2-3-4-5-8-10-11-1
Case 6; Step 2 is in the state shown in FIG. 8-2 (a), and Step 16 is in the state shown in FIG. 8-2 (b).

(3)ステツプ1−2−3−4−5−8−10−16の場
合;ステツプ2では第8−3図(a)に示す状態で、ステ
ツプ16では第8−3図(b)に示す状態となる。
(3) In the case of step 1-2-3-4-5-8-10-16; in the state shown in FIG. 8-3 (a) in step 2, and in the state shown in FIG. 8-3 (b) in step 16. It becomes the state shown.

(4)ステツプ1−2−3−6−7−12−13−16の
場合;ステツプ2では第8−4図(a)に示す状態で、ス
テツプ16では第8−4図(b)に示す状態となる。
(4) In the case of step 1-2-3-6-7-12-12-13-16; in the state shown in FIG. 8-4 (a) in step 2, and in the state shown in FIG. 8-4 (b) in step 16. It becomes the state shown.

(5)ステツプ1−2−3−6−7−12−14−15−
16の場合;ステツプ2では第8−5図(a)に示す状態
で、ステツプ16では第8−5図(b)に示す状態とな
る。
(5) Step 1-2-3-6-7-12-12-14-15
In the case of 16, the state shown in FIG. 8-5 (a) is obtained in step 2, and the state shown in FIG. 8-5 (b) is obtained in step 16.

(6)ステツプ1−2−3−6−7−12−14−16の
場合;ステツプ2では第8−6図(a)に示す状態で、ス
テツプ16では第8−6図(b)に示す状態となる。
(6) In the case of Step 1-2-3-6-7-12-12-14-16; in the state shown in FIG. 8-6 (a) in Step 2, and in the state shown in FIG. 8-6 (b) in Step 16 It becomes the state shown.

また、上記の説明は、マイクロプロセツサの主たる動作
である運転モードが選択されている状態の動作を説明し
たが、このモードの他には、停止、調整、設定及びカセ
ツト等の各モードを設けることが考えられる。ここで、
停止モードは、装置全体を停止させるモードであり、設
定モードは設定値入力手段から(11)から設定値を設定記
憶手段(15)に記憶させるモードであつて、調整モード
は、RAM(33)に記憶させた各設定値等を変更するモー
ドである。この調整モードは、運転継続中にキーボード
(11)より、変更データをRAM(33)に書き込むこととな
る。また、カセツトモードでは、カセツトインターフエ
イス(34)を介してカセツトテープにプログラムを録音し
たり、カセツトテープからプログラム等をRAM(33)書
き込んだりするモードである。
Further, the above description has explained the operation in the state where the operation mode, which is the main operation of the microprocessor, is selected, but in addition to this mode, each mode such as stop, adjustment, setting, and cassette is provided. It is possible. here,
The stop mode is a mode for stopping the entire apparatus, the setting mode is a mode for storing the set value from the set value input means (11) in the setting storage means (15), and the adjustment mode is the RAM (33). This is a mode for changing each set value and the like stored in. This adjustment mode is used when the keyboard is
From (11), the changed data will be written in the RAM (33). In the cassette mode, the program is recorded on the cassette tape via the cassette interface (34) and the program and the like are written from the cassette tape to the RAM (33).

このカセツトモードは、同一のプログラムを多数の装置
のRAM(33)内に書き込んだりする場合などにおいて有
効となる。
This cassette mode is effective when the same program is written in the RAM (33) of many devices.

このようにモード選択手段(12),(13)によつて、各種の
モードを選択できるようにすることによつて、多種、多
様の動作を行なわせることができ汎用性を高めることが
できる。
By thus selecting the various modes by the mode selecting means (12) and (13), it is possible to perform various kinds of operations and enhance versatility.

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

以上説明したように、本発明に係るカウンタ装置は、従
来のカムスイツチやリミツトスイツチ等を使用した装置
に比べ小形で構成が簡単になるばかりでなく、各工程に
応じた設定値を多数設定することができ、検出位置の設
定、調整、変更が容易で高精度の位置検出が可能であ
る。また、カウンタをハード構成にしたので、高速度の
計数が可能になつている。そして、設定値読出しカウン
タと配列設定値記憶手段との組合せにより、設定値レジ
スタの設定値入れかえに要する処理時間が短縮され、高
速度の計数及び出力処理が可能となつている。
As described above, the counter device according to the present invention is not only small in size and simple in structure as compared with a device using a conventional cam switch or limit switch, but also can set a large number of set values according to each process. In addition, the detection position can be set, adjusted, and changed easily, and highly accurate position detection can be performed. In addition, since the counter has a hardware configuration, high-speed counting is possible. The combination of the set value read counter and the array set value storage means shortens the processing time required to replace the set value in the set value register, and enables high-speed counting and output processing.

つまり、カウンタの計数値を定常的に隣接する2つの設
定値で挾み込むようにしたので、比較演算に要する時間
が短縮されている。
That is, since the count value of the counter is constantly sandwiched between two adjacent set values, the time required for the comparison calculation is shortened.

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

第1図は本発明の一実施例に係るカウンタ装置の全体構
成図、第2図はそのハード構成を示したブロツク図、第
3図は本発明の主要部の詳細を示したブロツク図、第4
図は運転モード(一軸動作)時のフローチヤート、第5
図、第6A図及び第6B図はカウンタ(1)と設定値読出
しカウンタ(設定値カウンタ)との関係を示した説明
図、第7A図及び第7B図は運転モード(円周動作)時
のフローチヤート、第8−1図(a)(b)〜第8−6図(a)
(b)はカウンタ(1)と設定値読出しカウンタとの関係を示
した説明図である。 (1)……カウンタ、(2)……配列設定値記憶手能、 (3)(3A,3B)……設定値レジスタ、(4)……比較手段、
(4A),(4B)……比較回路、(5)(5A,5B)……設定値読
出しカウンタ。
FIG. 1 is an overall configuration diagram of a counter device according to an embodiment of the present invention, FIG. 2 is a block diagram showing the hardware configuration thereof, and FIG. 3 is a block diagram showing details of main parts of the present invention. Four
The figure shows the flow chart in operating mode (uniaxial operation), No. 5
FIGS. 6A and 6B are explanatory views showing the relationship between the counter (1) and the set value read counter (set value counter), and FIGS. 7A and 7B show the operation mode (circumferential operation). Float chart, Fig.8-1 (a) (b) to Fig.8-6 (a)
(b) is an explanatory view showing the relationship between the counter (1) and the set value reading counter. (1) …… Counter, (2) …… Array set value storage function, (3) (3A, 3B) …… Set value register, (4) …… Comparison means,
(4A), (4B) …… Comparison circuit, (5) (5A, 5B) …… Set value read counter.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】直線運動に伴って発生するパルス信号を計
数するハード構成のカウンタと、 複数の設定値が小さい順又は大きい順に配列されて記憶
されている設定値記憶手段と、 第1の設定値と、該第1の設定値より大きな値のアドレ
スに設定されている第2の設定値とからなる2つの設定
値であって、かつ前記カウンタの計数値を挾み込む2つ
の隣接する設定値を、該設定値記憶手段から読み出して
設定する設定値レジスタと、 前記カウンタの計数値と前記第1の設定値とが一致した
とき設定値に対した制御出力信号を出力すると共に第1
の一致信号を出力する前記第1の一致信号を出力し、前
記カウンタの計数値と前記第2の設定値とが一致したと
き設定値に対応した制御出力信号を出力すると共に第2
の一致信号を出力する比較手段と、 前記第1の一致信号を入力すると、前記レジスタに読み
出す設定値のアドレス信号を1減少し、前記第2の一致
信号を入力すると、前記レジスタに読み出す設定値のア
ドレス信号を1増加し、隣接した値の2つのアドレス信
号を前記設定値記憶手段に供給してそのアドレスに該当
する2つの設定値を前記設定値レジスタに設定させる設
定値読出しカウンタと を有することを特徴とするカウンタ装置。
1. A counter having a hardware configuration for counting pulse signals generated with linear motion, a set value storage means in which a plurality of set values are arranged and stored in an ascending or descending order, and a first setting. Value and a second set value that is set to an address having a value larger than the first set value, and two adjacent settings that sandwich the count value of the counter. A set value register that reads out a value from the set value storage means and sets the value, and outputs a control output signal corresponding to the set value when the count value of the counter and the first set value coincide with each other.
The first coincidence signal is output, and when the count value of the counter coincides with the second set value, the control output signal corresponding to the set value is output, and the second
Comparing means for outputting the coincidence signal, and when the first coincidence signal is input, the address signal of the set value read out to the register is decremented by 1, and when the second coincidence signal is inputted, the set value read out to the register. Of the set value read counter for incrementing the address signal of 1 and supplying two address signals of adjacent values to the set value storage means to set two set values corresponding to the address in the set value register. A counter device characterized by the above.
【請求項2】円運動に伴って発生するパルス信号を計数
するハード構成のカウンタと、 最小アドレス値から最大アドレス値までの所定の領域に
連続的に複数の設定値が小さい順又は大きい順に配列さ
れて記憶されている設定値記憶手段と、 第1の設定値と、該第1の設定値より大きな値のアドレ
スに設定されている第2の設定値とからなる2つの設定
値であって、かつ前記カウンタの計数値を挾み込む2つ
の隣接する設定値を、前記設定値記憶手段から読み出し
て設定する設定値レジスタと、 前記カウンタの計数値と前記第1の設定値とが一致した
とき設定値に対応した制御出力信号を出力すると共に第
1の一致信号を出力し、前記カウンタの計数値と前記第
2の設定値とが一致したとき設定値に対応した制御出力
信号を出力すると共に第2の一致信号を出力する比較手
段と、 前記第1の一致信号を入力すると、前記レジスタに読み
出す設定値のアドレス信号を1減少し、アドレス信号が
最小アドレス値より小となったときは最大アドレス値を
設定し、また、前記第2の一致信号を入力すると、前記
レジスタに読み出す設定値のアドレス信号を1増加し、
アドレス信号が最大アドレス値より大となったと時は最
小アドレス値を設定し、隣接した値の2つのアドレス信
号を前記設定値記憶手段に供給してそのアドレスに該当
する2つの設定値を前記設定値レジスタに設定させる設
定値読出しカウンタと を有することを特徴とするカウンタ装置。
2. A hard-structured counter for counting pulse signals generated by circular motion, and a plurality of set values arranged in a predetermined area from a minimum address value to a maximum address value in ascending or descending order. Two set values including a set value storage means stored and stored, a first set value, and a second set value set to an address having a value larger than the first set value. And a set value register that reads and sets two adjacent set values that sandwich the counted value of the counter from the set value storage means, and the counted value of the counter and the first set value are the same. At this time, the control output signal corresponding to the set value is output, and at the same time, the first match signal is output, and when the count value of the counter and the second set value match, the control output signal corresponding to the set value is output. With the first When the first match signal is input, the address signal of the set value read out to the register is decreased by 1, and when the address signal becomes smaller than the minimum address value, the maximum address value And when the second match signal is input, the address signal of the set value read out to the register is incremented by 1,
When the address signal becomes larger than the maximum address value, the minimum address value is set, two address signals having adjacent values are supplied to the set value storage means, and the two set values corresponding to the address are set. And a set value read counter for setting the value register.
JP58245134A 1983-12-28 1983-12-28 Counter device Expired - Lifetime JPH0623921B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP58245134A JPH0623921B2 (en) 1983-12-28 1983-12-28 Counter device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58245134A JPH0623921B2 (en) 1983-12-28 1983-12-28 Counter device

Publications (2)

Publication Number Publication Date
JPS60140928A JPS60140928A (en) 1985-07-25
JPH0623921B2 true JPH0623921B2 (en) 1994-03-30

Family

ID=17129133

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58245134A Expired - Lifetime JPH0623921B2 (en) 1983-12-28 1983-12-28 Counter device

Country Status (1)

Country Link
JP (1) JPH0623921B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS596084B2 (en) * 1978-08-02 1984-02-09 株式会社日立製作所 Timer setting value setting device
JPS5533231A (en) * 1978-08-30 1980-03-08 Koyo Denshi Kogyo Kk Sequential controller
JPS57136207A (en) * 1981-02-17 1982-08-23 Citizen Watch Co Ltd Sequence controller
JPS5811810A (en) * 1981-07-14 1983-01-22 Matsushita Electric Ind Co Ltd cycle timer device
JPS58222306A (en) * 1982-06-18 1983-12-24 Sanyo Denki Kogyo Kk Programmable cam device

Also Published As

Publication number Publication date
JPS60140928A (en) 1985-07-25

Similar Documents

Publication Publication Date Title
US4241420A (en) Disk data control
JPH0475449B2 (en)
JPH0648297B2 (en) Pointer-type alarm clock
US5233573A (en) Digital data processor including apparatus for collecting time-related information
US5325341A (en) Digital timer apparatus and method
JPH0623921B2 (en) Counter device
US3846761A (en) Positioning controlling apparatus
JPS59210727A (en) Counter device
JP2544607B2 (en) Position signal generator
JP2961199B2 (en) Pulse train input processor
JPH04319723A (en) Encoder device
JPS6110231Y2 (en)
JPH02168598A (en) Interlock operation order determination circuit
JP2992151B2 (en) Bonding equipment
JPS6122461A (en) Magnetic tape device
SU1327114A1 (en) Apparatus for mating &#34;n&#34; pickups to computer
SU1607071A1 (en) Device for controlling stepping motor
JPH0323960B2 (en)
JPH0812660B2 (en) Vector data processor
JPH0679352B2 (en) Counter device for multipoint positioning
EP0576841A2 (en) Digital timer apparatus and method
JPH01280918A (en) interval timer
JPS63259476A (en) Jitter measurement circuit
JPH02166658A (en) Multiple optical disk device
JPH05258052A (en) Two-dimentional data rotation register circuit