JP2009230722A - Counter system - Google Patents
Counter system Download PDFInfo
- Publication number
- JP2009230722A JP2009230722A JP2008078816A JP2008078816A JP2009230722A JP 2009230722 A JP2009230722 A JP 2009230722A JP 2008078816 A JP2008078816 A JP 2008078816A JP 2008078816 A JP2008078816 A JP 2008078816A JP 2009230722 A JP2009230722 A JP 2009230722A
- Authority
- JP
- Japan
- Prior art keywords
- input
- unit
- central processing
- count
- detection device
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、異なる入力信号を用いてカウント値を求めるカウンタシステムに関するものである。 The present invention relates to a counter system for obtaining a count value using different input signals.
カウント値を求めるカウンタは、例えば機器制御を行うPLCなど、さまざまな用途に用いられている。例えば自動昇降機の場合、カウンタによるカウント値が大きくなるにつれて上方に上がっていく制御が行われている。また、回転モータの場合、1回転ごとにカウンタがカウント値を1ずつ増やすことによってモータの回転数を制御している。 A counter for obtaining a count value is used in various applications such as a PLC that performs device control. For example, in the case of an automatic elevator, control is performed so as to increase upward as the count value by the counter increases. In the case of a rotary motor, the counter controls the number of rotations of the motor by incrementing the count value by one for each rotation.
従来、上記カウンタの機能を全て中央処理装置が有していた(例えば、特許文献1参照)。例えば、図11に示すように、中央処理装置7は、異なる入力信号S1〜Snが送信される入力線L1〜Lnが接続され、上記入力信号S1〜Snを用いて、予め設定されたカウント処理方式(入力方式)にしたがってカウント処理を行ってカウント値を求める。
Conventionally, the central processing unit has all the functions of the counter (for example, see Patent Document 1). For example, as shown in FIG. 11, the
上記カウント処理方式には、図12に示すように、単相入力方式(図12(a))、二相入力方式(図12(b))、個別入力方式(図12(c))、方向判別入力方式(図12(d))などがある。 As shown in FIG. 12, the count processing method includes a single-phase input method (FIG. 12 (a)), a two-phase input method (FIG. 12 (b)), an individual input method (FIG. 12 (c)), and a direction. There is a discrimination input method (FIG. 12D).
単相入力方式は、図12(a)に示すように、1つの入力信号の立上りエッジ(又は立下りエッジ)が検出されるごとに、カウント値を1ずつ増やしてカウントする方式である。 As shown in FIG. 12A, the single-phase input method is a method in which the count value is incremented by one every time a rising edge (or falling edge) of one input signal is detected.
二相入力方式は、図12(b)に示すように、2つの入力信号を用いてカウントする方式であり、一方(A相)の入力信号がオフ状態であるときに、他方(B相)の入力信号の立下りエッジが検出されるとカウント値を1増やし、B相の入力信号の立上りエッジが検出されるとカウント値を1減らすようにカウントする。A相の入力信号がオン状態であるときは、B相の入力信号のエッジは検出されない。 As shown in FIG. 12B, the two-phase input method is a method of counting using two input signals, and when one (A phase) input signal is in an OFF state, the other (B phase). When the falling edge of the input signal is detected, the count value is increased by 1. When the rising edge of the B-phase input signal is detected, the count value is decreased by 1. When the A-phase input signal is in the ON state, the edge of the B-phase input signal is not detected.
個別入力方式は、図12(c)に示すように、2つの入力信号を用いてカウントする方式であり、一方(A相)の入力信号の立上りエッジが検出されるとカウント値を1増やし、他方(B相)の入力信号の立上りエッジが検出されるとカウント値を1減らすようにカウントする方式である。 The individual input method is a method of counting using two input signals as shown in FIG. 12 (c), and when the rising edge of one (A phase) input signal is detected, the count value is increased by 1, When the rising edge of the other (B phase) input signal is detected, the count value is counted so as to be reduced by one.
方向判別方式は、図12(d)に示すように、2つの入力信号を用いてカウントする方式であり、一方(A相)の入力信号の立上りエッジが検出されたときに、他方(B相)の入力信号がオフ状態であるとカウント値を1増やし、B相の入力信号がオン状態であるとカウント値を1減らすようにカウントする方式である。
しかしながら、従来の中央処理装置7は、SRAMやFROM、入出力線、通信線、拡張バスなどの多くのデバイスが接続されているため、カウント処理に必要な入力信号S1〜Snが送信される入力線L1〜Lnを多数接続することができなかった。このため、従来の中央処理装置7では、多数の入力信号を用いたカウント処理を実現することができなかった。
However, since the conventional
本発明は上記の点に鑑みて為されたものであり、その目的は、多数の入力信号を用いたカウント処理を実現することができるカウンタシステムを提供することにある。 The present invention has been made in view of the above points, and an object of the present invention is to provide a counter system capable of realizing count processing using a large number of input signals.
請求項1の発明は、2値信号の入力信号をカウント処理方式にしたがってカウント処理することによって得られたカウント値を利用した処理を行う中央処理装置を備えるとともに、異なる2値信号の入力信号が送信される入力線がそれぞれに接続される複数の入力ポートと、前記複数の入力ポートを介して入力された入力信号ごとに当該入力信号の有効エッジを検出する検出手段と、前記中央処理装置との間で通信を行う第1の通信制御手段とを有する検出装置を備え、前記中央処理装置は、前記検出装置との間で通信を行う第2の通信制御手段を有し、前記中央処理装置又は前記検出装置の何れかには、前記入力信号ごとに予め設定されたカウント処理方式に応じた前記有効エッジの情報を取得し、前記予め設定されたカウント処理方式にしたがってカウント処理を行ってカウント値を更新するカウント手段が設けられることを特徴とする。
The invention of
請求項2の発明は、請求項1の発明において、複数種類のカウント処理方式から一のカウント処理方式を選択するための設定手段を備え、前記カウント手段は、前記設定手段で設定されたカウンタ処理方式にしたがってカウント処理を行うことを特徴とする。 According to a second aspect of the present invention, in the first aspect of the invention, there is provided a setting means for selecting one count processing method from a plurality of types of count processing methods, and the counting means is a counter process set by the setting means. Counting processing is performed according to a method.
請求項3の発明は、請求項1の発明において、前記検出手段が前記入力信号のエッジを検出してから一定レベルを継続して前記エッジを前記有効エッジとして取り込むまでの時間である入力時定数を設定するための設定手段を備えることを特徴とする。 According to a third aspect of the present invention, in the first aspect of the present invention, the input time constant is a time from when the detecting means detects an edge of the input signal until a certain level is continued and the edge is taken as the effective edge. It is characterized by comprising setting means for setting.
請求項4の発明は、請求項1の発明において、前記カウント値の開始値を設定するための設定手段を備え、前記カウント手段は、前記設定手段で設定されたカウント値の開始値から前記カウント処理を開始することを特徴とする。 According to a fourth aspect of the present invention, there is provided a setting means for setting a start value of the count value according to the first aspect of the invention, and the count means counts the count value from the start value of the count value set by the setting means. Processing is started.
請求項5の発明は、請求項1の発明において、前記カウント値の終了値を設定するための設定手段を備え、前記カウント手段は、前記設定手段で設定されたカウント値が前記終了値に達するまで前記カウント処理を行うことを特徴とする。 According to a fifth aspect of the present invention, in the first aspect of the invention, there is provided setting means for setting an end value of the count value, and the count means reaches the end value when the count value set by the setting means is reached. The count processing is performed until the above.
請求項6の発明は、請求項2乃至5の何れか1項の発明において、前記設定手段は前記中央処理装置に設けられることを特徴とする。
The invention of
請求項7の発明は、請求項2乃至5の何れか1項の発明において、前記設定手段を有し前記検出装置に接続されるスイッチを備え、前記検出装置は、前記設定手段で設定された設定内容を前記スイッチから受信することを特徴とする。
The invention according to
請求項8の発明は、請求項5の発明において、前記カウント手段で前記カウント値が前記終了値に達したときにその旨を他の機器に通知する通知手段を備えることを特徴とする。
The invention according to claim 8 is characterized in that, in the invention according to
請求項9の発明は、請求項8の発明において、前記検出装置は、前記カウント手段と、前記通知手段とを有し、前記通知手段は、前記中央処理装置に通知することを特徴とする。 The invention according to claim 9 is the invention according to claim 8, wherein the detection device includes the counting unit and the notification unit, and the notification unit notifies the central processing unit.
請求項10の発明は、請求項8の発明において、前記検出装置に接続される外部機器を備え、前記検出装置は、前記カウント手段と、前記通知手段とを有し、前記通知手段は、前記外部機器に通知することを特徴とする。
The invention of
請求項11の発明は、請求項1乃至8の何れか1項の発明において、前記カウント手段は前記中央処理装置に設けられ、前記検出装置は、前記検出手段で前記有効エッジが検出されたときに、前記有効エッジが検出された入力信号を識別する情報を前記有効エッジの情報として前記中央処理装置に送信することを特徴とする。 According to an eleventh aspect of the present invention, in the invention according to any one of the first to eighth aspects, the counting means is provided in the central processing unit, and the detecting device is configured to detect the effective edge by the detecting means. In addition, information for identifying an input signal in which the valid edge is detected is transmitted as the valid edge information to the central processing unit.
請求項12の発明は、請求項1乃至11の何れか1項の発明において、前記複数の入力ポートのそれぞれは割込入力ポートであることを特徴とする。 According to a twelfth aspect of the present invention, in any one of the first to eleventh aspects, each of the plurality of input ports is an interrupt input port.
請求項13の発明は、請求項1乃至12の何れか1項の発明において、前記中央処理装置は、割込入力ポートを有し、前記検出装置からの情報を前記割込入力ポートから取得することを特徴とする。
The invention according to
請求項14の発明は、請求項1乃至13の何れか1項の発明において、前記中央処理装置と前記検出装置とがパラレルバスで接続されることを特徴とする。
The invention of claim 14 is characterized in that, in the invention of any one of
請求項15の発明は、請求項1乃至13の何れか1項の発明において、前記中央処理装置と前記検出装置とがシリアルバスで接続されることを特徴とする。 A fifteenth aspect of the invention is characterized in that, in the invention of any one of the first to thirteenth aspects, the central processing unit and the detection device are connected by a serial bus.
請求項16の発明は、請求項1乃至15の何れか1項の発明において、前記中央処理装置と前記検出装置とがマスタ・スレーブ通信によって通信が行われることを特徴とする。 A sixteenth aspect of the invention is characterized in that, in the invention of any one of the first to fifteenth aspects, the central processing unit and the detection device communicate with each other by master / slave communication.
請求項1の発明によれば、入力信号ごとの入力線が検出装置の複数の入力ポートに接続され、検出装置の検出手段が入力信号の有効エッジを検出し、カウント手段が有効エッジを用いてカウント処理を行うことによって、複数の入力信号を用いたカウント処理を実現することができる。
According to the invention of
請求項2の発明によれば、ユーザが設定手段を操作することによって、各入力信号のカウンタ処理方式を任意に設定することができる。 According to the second aspect of the present invention, the counter processing method for each input signal can be arbitrarily set by the user operating the setting means.
請求項3の発明によれば、ユーザが設定手段を操作することによって、入力時定数を任意に設定することができる。これにより、入力信号に散発的に発生するノイズの影響を低減することができる。
According to the invention of
請求項4の発明によれば、ユーザが設定手段を操作することによって、各カウント値の初期値を任意に設定することができる。 According to the invention of claim 4, the user can arbitrarily set the initial value of each count value by operating the setting means.
請求項5の発明によれば、ユーザが設定手段を操作することによって、各カウント値の終了値を任意に設定することができる。
According to the invention of
請求項6の発明によれば、設定手段が中央処理装置に設けられるので、ユーザが、中央処理装置を介して設定内容を容易に設定することができる。
According to the invention of
請求項7の発明によれば、ユーザが、スイッチを介して設定内容を容易に設定することができる。
According to the invention of
請求項8の発明によれば、入力信号ごとにカウント値が終了値に達したときに通知手段が通知することによって、ユーザが、入力信号ごとにカウント値が終了値であることを知ることができる。 According to the invention of claim 8, the notification means notifies when the count value reaches the end value for each input signal, so that the user knows that the count value is the end value for each input signal. it can.
請求項9の発明によれば、ユーザは、入力信号ごとにカウント値が終了値であることを、中央処理装置を通して容易に知ることができる。 According to the invention of claim 9, the user can easily know through the central processing unit that the count value is the end value for each input signal.
請求項10の発明によれば、ユーザは、入力信号ごとにカウント値が終了値であることを、外部機器を通して容易に知ることができる。
According to the invention of
請求項11の発明によれば、有効エッジの情報を、有効エッジが検出された入力信号を識別する情報とすることによって、有効エッジの情報として入力信号ごとに1ビットずつ与えられたnビットの情報に比べて、ビット数を少なくすることができる。 According to the eleventh aspect of the invention, the effective edge information is information for identifying the input signal from which the effective edge is detected, so that n bits of 1 bit are provided for each input signal as the effective edge information. Compared to information, the number of bits can be reduced.
請求項12の発明によれば、検出装置は、レベル変化した入力信号を優先して取得することができるので、レベル変化した入力信号の有効エッジを確実に取りこぼすことなく確実に検出することができ、その結果、複数の入力信号を用いたカウント処理をより正確に行うことができる。 According to the twelfth aspect of the invention, since the detection device can preferentially acquire the input signal whose level has changed, the detection device can reliably detect the effective edge of the input signal whose level has changed. As a result, the counting process using a plurality of input signals can be performed more accurately.
請求項13の発明によれば、中央処理装置が他の処理を行っている場合であっても、検出装置からの割込入力によって、中央処理装置は、カウント処理を優先的に行うことができる。その結果、複数の入力信号を用いたカウント処理をより正確に行うことができる。
According to the invention of
請求項14の発明によれば、中央処理装置と検出装置とがパラレルバスで接続されることによって、中央処理装置と検出装置との間で伝達される情報を1ビットずつ順に送信する場合比べて、短時間で送信することができる。 According to the invention of claim 14, the information transmitted between the central processing unit and the detection device is transmitted one bit at a time by connecting the central processing unit and the detection device via a parallel bus. Can be sent in a short time.
請求項15の発明によれば、中央処理装置と検出装置とがシリアルバスで接続されることによって、中央処理装置がn個の入力信号を用いたカウント値を利用したい場合に、シリアルバスとして3本の信号線が中央処理装置に接続されるだけで、中央処理装置と検出装置との情報伝達を実現することができるので、入力信号の個数が多くなるほど、中央処理装置に入力信号の入力線が直接接続される場合に比べて、中央処理装置に接続される信号線の本数を少なくすることができ、その結果、中央処理装置に必要なポート数を低減することができる。 According to the fifteenth aspect of the present invention, when the central processing unit and the detection unit are connected by a serial bus, and the central processing unit wants to use a count value using n input signals, the serial bus is 3 Since the signal transmission between the central processing unit and the detection device can be realized only by connecting the signal lines to the central processing unit, the input signal input line to the central processing unit increases as the number of input signals increases. As compared with the case where the CPUs are directly connected, the number of signal lines connected to the central processing unit can be reduced, and as a result, the number of ports required for the central processing unit can be reduced.
請求項16の発明によれば、マスタ側が、自己に都合のよいタイミングでスレーブ側との間で情報伝達を行うことができる。 According to the invention of claim 16, the master side can transmit information to and from the slave side at a timing convenient for itself.
(実施形態1)
まず、実施形態1のカウンタシステムの構成について図1を用いて説明する。本実施形態のカウンタシステムは、カウント値を利用した処理を行う中央処理装置1と、複数の異なる2値信号の入力信号S1〜Snのエッジを検出する検出装置2とを備えている。
(Embodiment 1)
First, the configuration of the counter system according to the first embodiment will be described with reference to FIG. The counter system of this embodiment includes a
検出装置2は、入力信号S1〜Snが送信される入力線L1〜Lnがそれぞれに接続される複数の入力ポート20(201〜20n)と、複数の入力ポート20を介して入力された入力信号S1〜Snごとに上記入力信号S1〜Snの有効エッジを検出する検出部(検出手段)21と、中央処理装置1との情報伝達に用いられるサブ側入出力インタフェース22と、中央処理装置1との間で通信を行う通信制御部(第1の通信制御手段)23とを備えている。
The
各入力ポート20には、それぞれ対応する入力信号S1〜Snが入力される。具体的には、入力ポート201には入力信号S1が入力され、入力ポート202には入力信号S2が入力される。このようにして、入力ポート20nには入力信号Snが入力される。
Corresponding input signals S1 to Sn are input to each
検出部21は、各入力ポート201〜20nに入力される入力信号S1〜Snを入力ポート201から順に取得し、予め設定されたカウント処理方式にしたがって、取得した入力信号S1〜Snの有効エッジを検出する。本実施形態では、各入力信号S1〜Snのカウント処理方式を全て単相入力方式として説明する。例えば入力信号S1の場合について説明すると、検出部21は、図12(a)に示すように、入力信号S1の立上りエッジ(オフからオンへの変化)を有効エッジとして検出する。他の入力信号S2〜Snの場合も、検出部21は、入力信号S1の場合と同様の方法で有効エッジを検出する。
通信制御部23は、検出部21で有効エッジが検出された入力信号S1〜Snの識別情報(番号情報)を中央制御装置1に伝達する。
The
中央処理装置1は、プログラムによって演算処理及び機器制御を行うものであり、検出装置2のサブ側入出力インタフェース22に接続されるメイン側入出力インタフェース10と、検出装置2との間で通信を行う通信制御部(第2の通信制御手段)11と、入力信号S1〜Snごとにカウント処理方式にしたがってカウント処理を行ってカウント値を更新するカウント部(カウント手段)12とを備えている。
The
カウント部12は、検出装置2の検出部21で有効エッジが検出されたときに、メイン側入出力インタフェース10を介して、有効エッジが検出された入力信号S1〜Snの識別情報を取得する。本実施形態では、各入力信号S1〜Snのカウンタ処理方式が全て単相入力方式であるため、例えば入力信号S1の場合について説明すると、カウント部12は、検出部21で有効エッジが検出された入力信号S1の識別情報を取得するごとに、図12(a)に示すように、カウント値を1ずつ増やす。他の入力信号S2〜Snの場合も、カウント部12は、入力信号S1の場合と同様の方法でカウント値を更新する。
When the
ところで、本実施形態のカウンタシステムにおいて、中央処理装置1のメイン側入出力インタフェース10と検出装置2のサブ側入出力インタフェース22とは、パラレルバス30で接続されている。このとき、各入力信号S1〜Snの識別情報は、入力信号S1〜Snの個数をn個とすると、(log2n)ビットで表わすことができる。例えば、入力信号S1〜Snが2個の場合、1ビットであり、入力信号S1〜Snが3個又は4個の場合、2ビットであり、129個以上256個以下の場合、8ビットとなる。したがって、パラレルバス30に用いられる信号線は、パラレルバス30で送受信される信号のビット数と同じ本数であるため、入力信号S1〜Snの本数をn本とすると、(log2n)本となる。
By the way, in the counter system of this embodiment, the main side input /
また、メイン側入出力インタフェース10とサブ側入出力インタフェース22には、中央処理装置1と検出装置2との間でハンドシェイクをするために用いられる2本の信号線31,32が接続されている。信号線31では、ハンドシェイクを行いたい旨の信号であるA信号Saを検出装置2から中央処理装置1に送信される。信号線32では、中央処理装置1から検出装置2にB信号Sbが送信される。
In addition, two
以下、中央処理装置1と検出装置2との間での情報伝達動作について図2を用いて説明する。ここでは、入力信号S1を代表して説明するが、他の入力信号S2〜Snについても同様である。
Hereinafter, an information transmission operation between the
まず、検出装置2において、検出部21が入力信号S1の有効エッジを検出すると、通信制御部23は、有効エッジが検出された入力信号S1の識別情報をパラレルバス30で送信させる。上記識別情報の送信は、検出部21が入力信号S1〜Snの有効エッジを検出するまで継続して行われる。上記識別情報が継続して送信されている間、通信制御部23は、A信号Saをオフからオンにし、信号線31を介してオンのA信号Saを中央処理装置1に送信する。
First, in the
中央処理装置1の通信制御部11は、オンのA信号Saを受信すると、有効エッジが検出された入力信号S1の識別情報をパラレルバス30から取得する。上記識別情報を取得した後、通信制御部11は、B信号Sbをオフからオンにし、信号線32を介してオンのB信号Sbを検出装置2に送信する。
When the
その後、検出装置2の通信制御部23は、オンのB信号Sbを受信すると、A信号Saをオンからオフにし、信号線31を介してオフのA信号Saを中央処理装置1に送信する。
Thereafter, when receiving the ON B signal Sb, the
その後、中央制御装置1の通信制御部11は、オフのA信号Saを受信すると、B信号Sbをオンからオフにし、信号線32を介してオフのB信号Sbを検出装置2に送信する。また、カウント部12は、通信制御部11がパラレルバス30を介して取得した入力信号S1の識別情報に基づいて、入力信号S1のカウント値を更新する。
Thereafter, when receiving the OFF A signal Sa, the
その後、検出装置2の通信制御部23は、オフのB信号Sbを受信する。
Thereafter, the
上記より、中央処理装置1と検出装置2との間では、マスタ・スレーブ通信が行われる。本実施形態では、検出装置2がマスタであり、中央処理装置1がスレーブである。
As described above, master / slave communication is performed between the
以上、本実施形態によれば、入力信号S1〜Snごとの入力線L1〜Lnが検出装置2の複数の入力ポート20に接続され、検出装置2の検出部21が入力信号S1〜Snの有効エッジを検出し、中央処理装置1のカウント部12が有効エッジを用いてカウント処理を行うことによって、複数の入力信号S1〜Snを用いたカウント処理を実現することができる。
As described above, according to the present embodiment, the input lines L1 to Ln for the input signals S1 to Sn are connected to the plurality of
また、中央処理装置1と検出装置2とがパラレルバス30で接続されることによって、中央処理装置1がn個の入力信号S1〜Snを用いたカウント値を利用したい場合に、パラレルバス30としての(log2n)本の信号線と、ハンドシェイク用の2本の信号線31,32とを用意するだけで、中央処理装置1と検出装置2との情報の伝達を実現することができるので、入力信号S1〜Snの個数が多くなるほど、中央処理装置1に複数の入力信号S1〜Snの入力線L1〜Lnが直接接続される場合に比べて、中央処理装置1に接続される信号線の本数を少なくすることができ、その結果、中央処理装置1に必要なポート数を低減することができる。
In addition, when the
さらに、中央処理装置1と検出装置2とがマスタ・スレーブ通信によって通信が行われることによって、マスタ側が、自己に都合のよいタイミングでスレーブ側との間で情報伝達を行うことができる。
Furthermore, communication between the
また、本実施形態によれば、有効エッジの情報を、有効エッジが検出された入力信号S1〜Snを識別する情報とすることによって、有効エッジの情報として入力信号S1〜Snごとに1ビットずつ与えられたnビットの情報に比べて、ビット数を少なくすることができる。特に、有効エッジの情報を(log2n)ビットの情報とし、この情報をパラレルバス30で送信することによって、パラレルバス30としての(log2n)本の信号線と、ハンドシェイク用の2本の信号線31,32とを用意するだけで、検出装置2から中央処理装置1に有効エッジの情報を送信することができる。これにより、入力信号S1〜Snの数が多くなるほど、中央処理装置に複数の入力信号の入力線が直接接続される場合に比べて、中央処理装置1に接続される信号線の本数を少なくすることができ、その結果、中央処理装置1において検出装置2との通信に必要なポート数を低減することができる。
Further, according to the present embodiment, the valid edge information is information for identifying the input signals S1 to Sn in which the valid edge is detected, so that one bit is provided for each of the input signals S1 to Sn as the valid edge information. The number of bits can be reduced compared to the given n-bit information. In particular, effective edge information is (log 2 n) -bit information, and this information is transmitted by the
なお、実施形態1の変形例として、入力信号S1〜Snごとにカウント処理方式にしたがってカウント処理を行うカウント部(カウント手段)を中央処理装置1ではなく検出装置2に備える構成であってもよい。このような構成であっても、入力信号S1〜Snごとの入力線L1〜Lnが検出装置2の複数の入力ポート20に接続され、検出装置2の検出部21が入力信号S1〜Snの有効エッジを検出し、検出装置2のカウント部が各入力信号S1〜Snの有効エッジを用いてカウント処理を行うことによって、実施形態1と同様に、複数の入力信号S1〜Snを用いたカウント処理を実現することができる。
As a modification of the first embodiment, the
また、実施形態1の他の変形例として、各入力信号S1〜S2のカウント処理方式を二相入力方式や個別入力方式、方向判別入力方式などにしてもよい。以下の実施形態においても同様である。このとき、パラレルバス30で用いられる信号線の本数は、検出装置2から中央処理装置1への伝達する情報量に応じて適宜設定される。
As another modification of the first embodiment, the count processing method for each of the input signals S1 to S2 may be a two-phase input method, an individual input method, a direction determination input method, or the like. The same applies to the following embodiments. At this time, the number of signal lines used in the
二相入力方式の場合、図12(b)に示すように、A相の入力信号をS1、B相の入力信号をS2とすると、検出部21は、入力信号S1がオフであるときの入力信号S2の立上りエッジ(オフからオンへの変化)及び立下りエッジ(オンからオフへの変化)を有効エッジとして検出する。そして、カウント部12は、検出部21で検出された有効エッジの情報を取得すると、立下りエッジのときにカウント値を1増やし、立上りエッジのときにカウント値を1減らす。他の入力信号S2〜Snを組み合わせた二相入力方式の場合も、検出部21は、入力信号S1,S2の場合と同様の方法で有効エッジを検出し、カウント部12は、入力信号S1,S2の場合と同様の方法でカウント値を更新する。
In the case of the two-phase input method, as shown in FIG. 12 (b), when the A-phase input signal is S1 and the B-phase input signal is S2, the
個別入力方式の場合、図12(c)に示すように、A相の入力信号をS1、B相の入力信号をS2とすると、検出部21は、入力信号S1の立上りエッジ及び入力信号S2の立上りエッジを有効エッジとして検出する。そして、カウント部12は、検出装置2の検出部21で検出された有効エッジの情報を取得すると、有効エッジが入力信号S1の立上りエッジであるときにカウント値を1増やし、有効エッジが入力信号S2の立上りエッジであるときにカウント値を1減らす。他の入力信号S2〜Snを組み合わせた個別入力方式の場合も、検出部21は、入力信号S1,S2の場合と同様の方法で有効エッジを検出し、カウント部12は、入力信号S1,S2の場合と同様の方法でカウント値を更新する。
In the case of the individual input method, as shown in FIG. 12C, when the A-phase input signal is S1 and the B-phase input signal is S2, the
方向判別入力方式の場合、図12(d)に示すように、A相の入力信号をS1、B相の入力信号をS2とすると、検出部21は、有効エッジとして、入力信号S1の立上りエッジと、このときの入力信号S2のオンオフ状態とを検出する。そして、カウント部12は、検出装置2の検出部21で検出された有効エッジの情報を取得すると、有効エッジが入力信号S2のオフ状態時の入力信号S1の立上りエッジであるときにカウント値を1増やし、有効エッジが入力信号S2のオン状態時の入力信号S1の立上りエッジであるときにカウント値を1減らす。他の入力信号S2〜Snを組み合わせた方向判別入力方式の場合も、検出部21は、入力信号S1,S2の場合と同様の方法で有効エッジを検出し、カウント部12は、入力信号S1,S2の場合と同様の方法でカウント値を更新する。
In the case of the direction discrimination input method, as shown in FIG. 12D, when the A-phase input signal is S1 and the B-phase input signal is S2, the
(実施形態2)
実施形態2のカウンタシステムは、図3に示すように、中央処理装置1のメイン側入出力インタフェース10と検出装置2のサブ側入出力インタフェース22とがシリアルバス40で接続される点で、実施形態1のカウンタシステム(図1参照)と相違する。なお、実施形態1と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 2)
The counter system according to the second embodiment is implemented in that the main input /
シリアルバス40で送受信される信号のビット数は、入力信号S1〜Snの本数をn本とすると、(log2n)ビットとなる。例えば、入力信号S1〜Snが2本の場合、1ビットであり、入力信号S1〜Snが3,4本の場合、2ビットであり、129本以上256本以下の場合、8ビットとなる。一方、シリアルバス40に用いられる信号線は、シリアルバス40で送受信される信号のビット数に関係なく、3本である。
The number of bits of signals transmitted and received on the
以下、中央処理装置1と検出装置2との間での情報伝達動作について図4を用いて説明する。ここでは、入力信号S1を代表して説明するが、他の入力信号S2〜Snについても同様である。
Hereinafter, an information transmission operation between the
まず、検出装置2において、検出部21が入力信号S1の有効エッジを検出すると、通信制御部23は、有効エッジが検出された入力信号S1の検出コマンドを生成し、生成した検出コマンドをシリアルバス40で送信する。
First, in the
中央処理装置1の通信制御部11は、検出コマンドを受信し、有効エッジが検出された入力信号S1の識別情報を取得する。上記識別情報を取得した後、通信制御部11は、レスポンスを生成し、生成したレスポンスを検出装置2に送信する。
The
その後、検出装置2の通信制御部23は、レスポンスを受信する。
Thereafter, the
その後、中央制御装置1のカウント部12は、通信制御部11が取得した入力信号S1の識別情報に基づいて、入力信号S1のカウント値を更新する。
Thereafter, the
以上、本実施形態によれば、中央処理装置1と検出装置2とがシリアルバス40で接続されることによって、中央処理装置1がn個の入力信号S1〜Snを用いたカウント値を利用したい場合に、シリアルバス40として3本の信号線が中央処理装置1に接続されるだけで、中央処理装置1と検出装置2との情報伝達を実現することができるので、入力信号S1〜Snの個数が多くなるほど、中央処理装置1に入力信号S1〜Snの入力線L1〜Lnが直接接続される場合に比べて、中央処理装置1に接続される信号線の本数を少なくすることができ、その結果、中央処理装置1に必要なポート数を低減することができる。
As described above, according to the present embodiment, the
(実施形態3)
実施形態3のカウンタシステムは、図5に示すように、各入力信号S1〜Snのカウント処理方式を複数種類のカウント処理方式から選択するための設定部(設定手段)13を中央処理装置1に備える点で、実施形態1のカウンタシステム(図1参照)と相違する。なお、実施形態1と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 3)
As shown in FIG. 5, in the counter system of the third embodiment, the
設定部13では、入力信号の番号とカウント処理方式とが設定される。例えば各入力信号S1〜Snの番号を順に1〜nとし、カウント処理方式について、単相入力方式を0、二相入力方式を1、個別入力方式を2、方向判別方式を3とすると、入力信号S2のカウント処理方式を単相入力方式としたい場合、ユーザは設定部13を用いて入力信号S1〜Snの番号を2、カウント処理方式の番号を0と設定すればよい。なお、二相入力方式や個別入力方式、方向判別方式に設定する場合、隣接する2つの入力信号S1〜Snを用いるため、2つの入力信号S1〜Snのうち小さいほうの番号を設定すればよい。
In the
本実施形態のカウント部12は、設定部13で設定されたカウント処理方式にしたがってカウント処理を行う。また、本実施形態の通信制御部11は、設定部13で設定されたカウント処理方式をパラレルバス33で検出装置2に送信する。パラレルバス33の本数は、カウント処理方式の情報がNビットの場合、N本である。
The
本実施形態の通信制御部23は、設定部13で設定されたカウント処理方式を中央処理装置1から受信する。また、本実施形態の検出部21は、通信制御部23で受信されたカウント処理方式にしたがって入力信号S1〜Snの有効エッジを検出する。
The
次に、本実施形態のカウンタシステムにおけるカウント処理方式の設定動作について図6を用いて説明する。ここでは、入力信号S1を代表して説明するが、他の入力信号S2〜Snについても同様である。 Next, the setting operation of the count processing method in the counter system of this embodiment will be described with reference to FIG. Here, the input signal S1 will be described as a representative, but the same applies to the other input signals S2 to Sn.
まず、中央処理装置1において、設定部13で入力信号S1のカウント処理方式が設定されると、通信制御部11は、設定されたカウント処理方式に対応する入力信号S1の識別情報をパラレルバス30で送信する。また、通信制御部11は、入力信号S1のカウント処理方式をパラレルバス33で送信する。そして、通信制御部11は、A信号Saをオフからオンにし、信号線31を介してオンのA信号Saを検出装置2に送信する。
First, in the
検出装置2の通信制御部23は、入力信号S1の識別情報をパラレルバス30で受信し、設定されたカウント処理方式をパラレルバス33で受信する。検出部21は、通信制御部23で受信した入力信号S1のカウント処理方式を取得し、その後、割込禁止とする。その後、検出部21は、これまでの入力信号S1のカウント処理方式を、取得した入力信号S1のカウント処理方式に変更する。その後、検出部21は割込を許可し、B信号Sbをオフからオンにし、信号線32を介してオンのB信号Sbを中央処理装置1に送信する。
The
中央処理装置1の通信制御部11は、オンのB信号Sbを受信すると、A信号Saをオンからオフにし、信号線31を介してオフのA信号Saを検出装置2に送信する。
When receiving the ON B signal Sb, the
その後、検出装置2の通信制御部23は、オフのA信号Saを受信すると、B信号Sbをオンからオフにし、信号線32を介してオフのB信号Sbを中央処理装置1に送信する。
After that, when receiving the OFF A signal Sa, the
その後、中央制御装置1の通信制御部11は、オフのB信号Sbを受信する。
Thereafter, the
以上、本実施形態によれば、ユーザが設定部13を操作することによって、各入力信号S1〜Snのカウント処理方式を任意に設定することができる。また、本実施形態では、設定部13が中央処理装置1に備えられるので、ユーザが、中央処理装置1を介して各入力信号S1〜Snのカウント処理方式を容易に設定することができる。
As described above, according to the present embodiment, the user can arbitrarily set the count processing method of the input signals S1 to Sn by operating the
(実施形態4)
実施形態4のカウンタシステムは、図5に示す設定部(設定手段)13が、カウント処理方式を設定するためのものではなく、入力時定数を設定するためのものである点で、実施形態3のカウンタシステムと相違する。なお、実施形態3と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 4)
The counter system of the fourth embodiment is that the setting unit (setting means) 13 shown in FIG. 5 is not for setting the count processing method, but for setting an input time constant. It is different from the counter system. In addition, about the component similar to
入力時定数とは、検出部21が入力信号S1〜Snのエッジを検出してから一定レベルを継続してエッジを有効エッジとして取り込むまでの時間をいう。つまり、検出部21において入力信号S1〜Snのエッジに対する検出タイミングの目安を与える定数をいう。例えば、入力時定数を5ミリ秒とした場合、入力信号S1〜Snがレベル変化したときに、変化後のレベルが5ミリ秒継続すると、検出装置2の検出部21が入力信号S1〜Snのエッジを有効エッジとして検出する。これにより、入力信号S1〜Snに散発的に発生するノイズの影響を低減することができる。
The input time constant refers to the time from when the
本実施形態の通信制御部11は、設定部13で設定された入力時定数を検出装置2に送信する。
The
本実施形態の通信制御部23は、設定部13で設定された入力時定数を中央処理装置1から受信する。また、本実施形態の検出部21は、通信制御部23で受信された入力時定数が経過した後、入力信号S1〜Snの有効エッジを検出する。
The
なお、本実施形態のカウンタシステムにおける入力時定数の設定動作は、実施形態5において、図6の設定内容としてカウント処理方式を入力時定数とした場合と同様である。 The setting operation of the input time constant in the counter system of the present embodiment is the same as that in the fifth embodiment when the count processing method is the input time constant as the setting contents of FIG.
以上、本実施形態によれば、ユーザが設定部13を操作することによって、入力時定数を任意に設定することができる。また、本実施形態では、設定部13が中央処理装置1に備えられるので、ユーザが、中央処理装置1を介して入力時定数を容易に設定することができる。
As described above, according to the present embodiment, the user can arbitrarily set the input time constant by operating the
(実施形態5)
実施形態5のカウンタシステムは、図5に示す設定部(設定手段)13が、各入力信号S1〜Snのカウント値の初期値を設定するためのものである点で、実施形態3のカウンタシステムと相違する。なお、実施形態3と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 5)
The counter system of the fifth embodiment is that the setting unit (setting means) 13 shown in FIG. 5 is for setting initial values of the count values of the input signals S1 to Sn. Is different. In addition, about the component similar to
本実施形態のカウント部12は、設定部13で設定されたカウント値の初期値からカウント処理を開始する。
The
以上、本実施形態によれば、ユーザが設定部13を操作することによって、各入力信号S1〜Snのカウント値の初期値を任意に設定することができる。また、本実施形態では、設定部13が中央処理装置1に備えられるので、ユーザが、中央処理装置1を介してカウント値の初期値を容易に設定することができる。
As described above, according to the present embodiment, the user can arbitrarily set the initial values of the count values of the input signals S1 to Sn by operating the
(実施形態6)
実施形態6のカウンタシステムは、図5に示す設定部(設定手段)13が、各カウント値の終了値であるカウンタ目標値を設定するためのものである点で、実施形態3のカウンタシステムと相違する。なお、実施形態3と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 6)
The counter system of the sixth embodiment is different from the counter system of the third embodiment in that the setting unit (setting means) 13 shown in FIG. 5 is for setting a counter target value that is an end value of each count value. Is different. In addition, about the component similar to
本実施形態のカウント部12は、カウント値が、設定部13で設定されたカウンタ目標値に達するまでカウント処理を行う。
The
以上、本実施形態によれば、ユーザが設定部13を操作することによって、各カウント値のカウンタ目標値を任意に設定することができる。また、本実施形態では、設定部13が中央処理装置1に備えられるので、ユーザが、中央処理装置1を介してカウンタ目標値を容易に設定することができる。
As described above, according to the present embodiment, the user can arbitrarily set the counter target value of each count value by operating the
なお、実施形態3〜6では、中央処理装置1と検出装置2とがパラレルバス30で接続される場合について説明したが、実施形態2のように中央処理装置1と検出装置2とがシリアルバス40(図3参照)で接続される場合においても、実施形態3〜6の設定部13を備えてもよい。このような構成においても、実施形態3〜6と同様に、ユーザが設定部13を操作することによって、中央処理装置1を介して設定内容を設定することができる。
In the third to sixth embodiments, the case where the
(実施形態7)
実施形態7のカウンタシステムは、図7に示すように、検出装置2がカウント部24を備え、通信制御部23が通知手段としての機能を有する点で、実施形態6のカウンタシステム(図5参照)と相違する。なお、実施形態6と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 7)
As shown in FIG. 7, the counter system of the seventh embodiment includes the counter unit of the sixth embodiment (see FIG. 5) in that the
通信制御部23は、カウント部24で各入力信号S1〜Snのカウント値がカウンタ目標値に達したことを中央処理装置1に通知する。
The
次に、本実施形態のカウンタシステムにおける通知動作について図2を援用して説明する。ここでは、入力信号S1を代表して説明するが、他の入力信号S2〜Snについても同様である。 Next, the notification operation in the counter system of this embodiment will be described with reference to FIG. Here, the input signal S1 will be described as a representative, but the same applies to the other input signals S2 to Sn.
まず、検出装置2において、検出部21が有効エッジを検出し、カウント部24が有効エッジに基づいて、各入力信号S1〜Snのカウント値を更新する。ここで、カウント値がカウンタ目標値に達したとき、通信制御部23は、入力信号S1〜Snの識別情報をパラレルバス30で中央処理装置1に送信する。このとき、通信制御部23は、A信号Saをオフからオンにし、信号線31を介してオンのA信号Saを中央処理装置1に送信する。
First, in the
中央処理装置1の通信制御部11は、カウント値がカウンタ目標値に達した入力信号S1〜Snの識別情報を受信する。その後、通信制御部11は、B信号Sbをオフからオンにし、信号線32を介してオンのB信号Sbを検出装置2に送信する。
The
検出装置2の通信制御部23は、オンのB信号Sbを受信すると、A信号Saをオンからオフにし、信号線31を介してオフのA信号Saを中央処理装置1に送信する。
When receiving the ON B signal Sb, the
中央処理装置1の通信制御部11は、オフのA信号Saを受信すると、B信号Sbをオンからオフにし、信号線32を介してオフのB信号Sbを検出装置2に送信する。
When the
その後、検出装置2の通信制御部23は、オフのB信号Sbを受信する。
Thereafter, the
以上、本実施形態によれば、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを通信制御部23が通知することによって、ユーザが、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを知ることができる。特に本実施形態では、ユーザは、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを、中央処理装置1を通して容易に知ることができる。
As described above, according to the present embodiment, when the
なお、実施形態7では、中央処理装置1と検出装置2とがパラレルバス30で接続される場合について説明したが、実施形態2のように中央処理装置1と検出装置2とがシリアルバス40(図3参照)で接続される場合においても、実施形態3〜6と同様に、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを通信制御部23が通知することによって、ユーザが、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを知ることができる。特に本実施形態では、ユーザは、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを、中央処理装置1を通して容易に知ることができる。
In the seventh embodiment, the case where the
(実施形態8)
実施形態8のカウンタシステムは、図8に示すように、検出装置2に接続される外部機器5を備える点で、実施形態7のカウンタシステム(図7参照)と相違する。なお、実施形態7と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 8)
As shown in FIG. 8, the counter system of the eighth embodiment is different from the counter system of the seventh embodiment (see FIG. 7) in that it includes an
外部機器5は、検出装置2との情報伝達に用いられる入出力インタフェース50と、検出装置2との間で通信を行う通信制御部51と、カウント値がカウンタ目標値に達した入力信号S1〜Snを報知する報知部52とを備えている。
The
本実施形態の通信制御部23は、中央処理装置1との情報伝達を制御するとともに、外部機器5との情報伝達も制御する。通信制御部23は、カウント部24で入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを外部機器5に通知する。
The
次に、本実施形態のカウンタシステムにおける通知動作について説明する。ここでは、入力信号S1を代表して説明するが、他の入力信号S2〜Snについても同様である。 Next, the notification operation in the counter system of this embodiment will be described. Here, the input signal S1 will be described as a representative, but the same applies to the other input signals S2 to Sn.
まず、検出装置2において、検出部21が有効エッジを検出し、カウント部24が有効エッジに基づいて、各入力信号S1〜Snのカウント値を更新する。ここで、カウント値がカウンタ目標値に達したとき、通信制御部23は、入力信号S1〜Snの識別情報をパラレルバス30で外部機器5に送信する。このとき、通信制御部23は、A信号Saをオフからオンにし、信号線31を介してオンのA信号Saを外部機器5に送信する。
First, in the
外部機器5の通信制御部51は、カウント値がカウンタ目標値に達した入力信号S1〜Snの識別情報を受信する。その後、通信制御部51は、B信号Sbをオフからオンにし、信号線32を介してオンのB信号Sbを検出装置2に送信する。
The
検出装置2の通信制御部23は、オンのB信号Sbを受信すると、A信号Saをオンからオフにし、信号線31を介してオフのA信号Saを外部機器5に送信する。
When the
外部機器5の通信制御部51は、オフのA信号Saを受信すると、B信号Sbをオンからオフにし、信号線32を介してオフのB信号Sbを検出装置2に送信する。
When receiving the off A signal Sa, the
その後、検出装置2の通信制御部23は、オフのB信号Sbを受信する。
Thereafter, the
以上、本実施形態によれば、ユーザは、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを、外部機器5を通して知ることができる。
As described above, according to the present embodiment, the user can know through the
なお、実施形態8では、外部機器5と検出装置2とがパラレルバス30で接続される場合について説明したが、図9に示すように、外部機器5と検出装置2とがシリアルバス40(図3参照)で接続される場合においても、実施形態8と同様に、ユーザは、入力信号S1〜Snごとにカウント値がカウンタ目標値に達したことを、外部機器5を通して容易に知ることができる。
In the eighth embodiment, the case where the
(実施形態9)
実施形態9のカウンタシステムは、図9に示すように、検出装置2にパラレルバス30で接続されるスイッチ6を備え、検出装置2がカウント部24を備える点で、実施形態1のカウンタシステム(図1参照)と相違する。なお、実施形態1と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 9)
As shown in FIG. 9, the counter system of the ninth embodiment includes a
スイッチ6は、ディップスイッチであり、各入力信号S1〜Snのカウント処理方式を設定するための設定部(設定手段)60と、検出装置2との情報伝達に用いられる入出力インタフェース61と、検出装置2との間で通信を行う通信制御部62とを備えている。
The
本実施形態の通信制御部23は、設定部60で設定されたカウント処理方式をスイッチ6から受信する受信手段である。また、本実施形態の検出部21は、通信制御部23で受信されたカウント処理方式にしたがって入力信号S1〜Snの有効エッジを検出する。さらに、本実施形態のカウント部24は、通信制御部23で受信されたカウント処理方式にしたがってカウント処理を行う。
The
以上、本実施形態によれば、ユーザが、スイッチ6を介して各入力信号S1〜Snのカウント処理方式を容易に設定することができる。
As described above, according to the present embodiment, the user can easily set the count processing method of the input signals S1 to Sn via the
なお、実施形態9の変形例として、スイッチ6の設定内容を各入力信号S1〜Snのカウント処理方式に代えて、入力時定数、各入力信号S1〜Snのカウント値の初期値又は各カウント値のカウンタ目標値の何れかにしてもよい。このような場合であっても、ユーザが、スイッチ6を介して設定内容を容易に設定することができる。
As a modification of the ninth embodiment, the setting content of the
また、実施形態9では、スイッチ6と検出装置2とがパラレルバス30で接続される場合について説明したが、図10に示すように、スイッチ6と検出装置2とがシリアルバス40で接続される場合においても、実施形態9と同様に、ユーザは、スイッチ6を介して設定内容を容易に設定することができる。
In the ninth embodiment, the case where the
(実施形態10)
実施形態10のカウンタシステムは、図1に示すように、複数の入力ポート20のそれぞれが割込入力ポートである点で、実施形態1のカウンタシステムと相違する。なお、実施形態1と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 10)
As shown in FIG. 1, the counter system of the tenth embodiment is different from the counter system of the first embodiment in that each of the plurality of
以上、本実施形態によれば、検出装置2は、エッジが発生した入力信号S1〜Snを優先して取得することができるので、遅延なくエッジを検出することができ、その結果、複数の入力信号S1〜Snを用いたカウント処理をより正確に行うことができる。
As described above, according to the present embodiment, since the
(実施形態11)
実施形態11のカウンタシステムは、図1に示すように、メイン側入出力インタフェース10に割込入力ポートを含む点で、実施形態1のカウンタシステムと相違する。つまり、中央処理装置1は、検出装置2からの情報を割込入力ポートから取得する。なお、実施形態1と同様の構成要素については、同一の符号を付して説明を省略する。
(Embodiment 11)
The counter system of the eleventh embodiment is different from the counter system of the first embodiment in that an interrupt input port is included in the main input /
以上、本実施形態によれば、中央処理装置1が他の処理を行っている場合であっても、検出装置2からの割込入力によって、中央処理装置1は、カウント処理を優先的に行うことができる。その結果、複数の入力信号S1〜Snを用いたカウント処理をより正確に行うことができる。
As described above, according to the present embodiment, even when the
なお、実施形態10,11の変形例として、実施形態2〜9においても適用することができる。また、実施形態10のような割込入力ポートである入力ポート20と、実施形態11のような割込入力ポートを含むメイン側入出力インタフェース10とを併用したものであってもよい。
In addition, it can apply also in Embodiment 2-9 as a modification of
1 中央処理装置
10 メイン側入出力インタフェース
11 通信制御部
12 カウント部
2 検出装置
20 入力ポート
21 検出部
22 サブ側入出力インタフェース
23 通信制御部
S1〜Sn 入力信号
DESCRIPTION OF
Claims (16)
異なる2値信号の入力信号が送信される入力線がそれぞれに接続される複数の入力ポートと、前記複数の入力ポートを介して入力された入力信号ごとに当該入力信号の有効エッジを検出する検出手段と、前記中央処理装置との間で通信を行う第1の通信制御手段とを有する検出装置を備え、
前記中央処理装置は、前記検出装置との間で通信を行う第2の通信制御手段を有し、
前記中央処理装置又は前記検出装置の何れかには、前記入力信号ごとに予め設定されたカウント処理方式に応じた前記有効エッジの情報を取得し、前記予め設定されたカウント処理方式にしたがってカウント処理を行ってカウント値を更新するカウント手段が設けられる
ことを特徴とするカウンタシステム。 A central processing unit that performs processing using the count value obtained by counting the input signal of the binary signal according to the count processing method;
A plurality of input ports to which input lines to which input signals of different binary signals are transmitted are connected to each other, and detection for detecting an effective edge of the input signal for each input signal input through the plurality of input ports And a detection device having first communication control means for communicating with the central processing unit,
The central processing unit has a second communication control means for communicating with the detection device,
Either the central processing unit or the detection device acquires information on the valid edge according to a preset count processing method for each input signal, and performs count processing according to the preset count processing method. The counter system is provided with a counting means for updating the count value by performing.
前記カウント手段は、前記設定手段で設定されたカウンタ処理方式にしたがってカウント処理を行う
ことを特徴とする請求項1記載のカウンタシステム。 A setting means for selecting one count processing method from a plurality of types of count processing methods,
The counter system according to claim 1, wherein the counting unit performs a counting process according to a counter processing method set by the setting unit.
前記カウント手段は、前記設定手段で設定されたカウント値の開始値から前記カウント処理を開始する
ことを特徴とする請求項1記載のカウンタシステム。 Comprising setting means for setting a start value of the count value;
The counter system according to claim 1, wherein the counting unit starts the counting process from a start value of the count value set by the setting unit.
前記カウント手段は、前記設定手段で設定されたカウント値が前記終了値に達するまで前記カウント処理を行う
ことを特徴とする請求項1記載のカウンタシステム。 Setting means for setting an end value of the count value;
The counter system according to claim 1, wherein the counting unit performs the counting process until the count value set by the setting unit reaches the end value.
前記検出装置は、前記設定手段で設定された設定内容を前記スイッチから受信する
ことを特徴とする請求項2乃至5の何れか1項に記載のカウンタシステム。 A switch having the setting means and connected to the detection device;
The counter system according to any one of claims 2 to 5, wherein the detection device receives the setting content set by the setting unit from the switch.
前記通知手段は、前記中央処理装置に通知する
ことを特徴とする請求項8記載のカウンタシステム。 The detection device includes the counting unit and the notification unit,
The counter system according to claim 8, wherein the notification unit notifies the central processing unit.
前記検出装置は、前記カウント手段と、前記通知手段とを有し、
前記通知手段は、前記外部機器に通知する
ことを特徴とする請求項8記載のカウンタシステム。 An external device connected to the detection device;
The detection device includes the counting unit and the notification unit,
The counter system according to claim 8, wherein the notification unit notifies the external device.
前記検出装置は、前記検出手段で前記有効エッジが検出されたときに、前記有効エッジが検出された入力信号を識別するビットの情報を前記有効エッジの情報として前記中央処理装置に送信する
ことを特徴とする請求項1乃至8の何れか1項に記載のカウンタシステム。 The counting means is provided in the central processing unit,
When the detection means detects the valid edge, the detection device transmits bit information identifying the input signal from which the valid edge is detected to the central processing unit as the valid edge information. The counter system according to any one of claims 1 to 8, characterized in that:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008078816A JP2009230722A (en) | 2008-03-25 | 2008-03-25 | Counter system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008078816A JP2009230722A (en) | 2008-03-25 | 2008-03-25 | Counter system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009230722A true JP2009230722A (en) | 2009-10-08 |
Family
ID=41245977
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008078816A Withdrawn JP2009230722A (en) | 2008-03-25 | 2008-03-25 | Counter system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009230722A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107942894A (en) * | 2016-10-13 | 2018-04-20 | 中国石油天然气集团公司 | Primary input output sub-module and its diagnostic method, programmable logic controller |
-
2008
- 2008-03-25 JP JP2008078816A patent/JP2009230722A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107942894A (en) * | 2016-10-13 | 2018-04-20 | 中国石油天然气集团公司 | Primary input output sub-module and its diagnostic method, programmable logic controller |
CN107942894B (en) * | 2016-10-13 | 2019-12-10 | 中国石油天然气集团公司 | Main input/output submodule, diagnosis method thereof and editable logic controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2009272704A5 (en) | ||
JP5177297B2 (en) | Interface circuit, inverter device, inverter system, and transmission / reception method | |
JP2009230722A (en) | Counter system | |
CN116737642A (en) | SPI (serial peripheral interface) master device, interrupt method and system | |
US9791850B2 (en) | Numerical control system | |
JP2017513283A (en) | TX / RX mode control in a serial half-duplex transceiver away from the communicating host | |
JP2011123569A (en) | Processor | |
JP2007228338A (en) | Electronic control unit and transmitting method of electronic control unit | |
JPH109894A (en) | Method for detecting abnormality of encoder signal in motor control device | |
JP6511457B2 (en) | Multiple communication device | |
US9361788B2 (en) | Receiver of remote control device | |
EP1520760A2 (en) | Rotation detecting device | |
CN112923957B (en) | Signal processing method and device for servo driver and encoder | |
KR20160108654A (en) | High speed counter | |
JP6918849B2 (en) | system | |
CN109753020B (en) | Motor control device, control system, and motor control method | |
CN109768738A (en) | Control device of electric motor, control system and method for motor control | |
KR101565584B1 (en) | Method and Apparatus for Transmitting Data Based on SPI Communication | |
JP2019071554A (en) | Electronic control device | |
JP4507888B2 (en) | Microcomputer | |
JP2005275452A (en) | Data transfer control system | |
KR20130055962A (en) | System and method for controlling roof for vehicle | |
JP4463533B2 (en) | Rotary encoder detection device | |
JP6428474B2 (en) | Relay device | |
JP2010140244A (en) | Control system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20100811 |
|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20110607 |