JP2016181118A - Pulse counter - Google Patents
Pulse counter Download PDFInfo
- Publication number
- JP2016181118A JP2016181118A JP2015060936A JP2015060936A JP2016181118A JP 2016181118 A JP2016181118 A JP 2016181118A JP 2015060936 A JP2015060936 A JP 2015060936A JP 2015060936 A JP2015060936 A JP 2015060936A JP 2016181118 A JP2016181118 A JP 2016181118A
- Authority
- JP
- Japan
- Prior art keywords
- value
- integrated value
- count
- counter
- pulse counter
- 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.)
- Pending
Links
Images
Landscapes
- Measurement Of Radiation (AREA)
Abstract
Description
ここに開示された技術は、パルス計数器に関するものである。 The technique disclosed herein relates to a pulse counter.
従来より、パルス数を計数するパルス計数器が知られている。 Conventionally, pulse counters that count the number of pulses are known.
例えば、特許文献1には、外部機器から出力されるパルス数を計数するパルス計数器が開示されている。 For example, Patent Document 1 discloses a pulse counter that counts the number of pulses output from an external device.
このようなパルス計数器は、例えば、IC等で構成される計数部を有している。この計数部は、計数できる上限値を有し、その結果、パルス計数器は、上限値よりも大きな値までパルス数を計数することができない。 Such a pulse counter has, for example, a counting unit composed of an IC or the like. The counting unit has an upper limit value that can be counted, and as a result, the pulse counter cannot count the number of pulses to a value larger than the upper limit value.
ここに開示された技術は、かかる点に鑑みてなされたものであり、その目的とするところは、計数部の上限値を超えた値までパルス数を計数することにある。 The technique disclosed here has been made in view of such a point, and an object thereof is to count the number of pulses to a value exceeding the upper limit value of the counting unit.
ここに開示されたパルス計数器は、上限計数値が設定され、パルス数を前記上限計数値まで計数すると、再び、パルス数を0から計数するように構成された計数部と、前記計数部の計数値を積算してパルスの積算値を演算する演算部とを備え、前記演算部は、前記計数値を積算して第1積算値を演算し、前記第1積算値が前記上限計数値に達すると、再び、前記第1積算値を0から積算し、前記第1積算値が前記上限計数値に達した回数であるオーバーフロー回数と前記第1積算値とに基づいて、前記パルスの積算値としての第2積算値を演算する。 The pulse counter disclosed herein is configured such that when an upper limit count value is set and the number of pulses is counted up to the upper limit count value, a counting unit configured to count the pulse number from 0 again, and the counting unit A calculation unit that integrates the count value to calculate the integrated value of the pulse, the calculation unit calculates the first integrated value by integrating the count value, and the first integrated value is set to the upper limit count value. When it reaches, the first integrated value is integrated again from 0, and the integrated value of the pulse is calculated based on the overflow count that is the number of times the first integrated value reaches the upper limit count value and the first integrated value. The second integrated value is calculated.
前記パルス計数器によれば、計数部の上限値を超えた値までパルス数を計数することができる。 According to the pulse counter, the number of pulses can be counted up to a value exceeding the upper limit value of the counting unit.
以下、例示的な実施形態を図面に基づいて詳細に説明する。 Hereinafter, exemplary embodiments will be described in detail with reference to the drawings.
《実施形態1》
以下、実施形態1に係るパルス計数器100について説明する。図1は、パルス計数器100のブロック図である。
Embodiment 1
Hereinafter, the
パルス計数器100は、電力計等の計測器に接続される。計測器は、その計測結果に応じたパルスを出力するように構成されている。計測器が電力計の場合、例えば、電力計は、10Whごとに1パルスを出力する。パルス計数器100は、パルスを計数するカウンタ1と、パルス計数器100の各部に電力を供給する電源2と、各種データを保存するメモリ3と、パルス数の積算値を演算する演算部4とを備える。
The
カウンタ1は、入力されるパルス数を計数する。カウンタ1が計数したパルス数を「計数値」と称する。カウンタ1は、上限計数値(計数できる上限値)Cmaxが設定され、計数値Cが上限計数値Cmaxに達すると、再び、0から計数を行う。例えば、上限計数値Cmaxは、28bitであり、カウンタ1は、28bitまで計数できる。カウンタ1は、入力されるパルス数を計数し続けており、演算部4からの要求に応じてそのときの計数値を出力する。カウンタ1は、例えば、CPLD(Complex Programmable Logic Device)である。カウンタ1は、計数部の一例である。
The counter 1 counts the number of input pulses. The number of pulses counted by the counter 1 is referred to as “count value”. The counter 1 counts from 0 again when the upper limit count value (upper limit value that can be counted) Cmax is set and the count value C reaches the upper limit count value Cmax. For example, the upper limit count value Cmax is 28 bits, and the counter 1 can count up to 28 bits. The counter 1 continues to count the number of input pulses, and outputs the count value at that time in response to a request from the
以下、計数値Cが上限計数値Cmaxに達して、0から計数を行うことを「オーバーフロー」するという。 Hereinafter, counting from 0 when the count value C reaches the upper limit count value Cmax is referred to as “overflow”.
電源2は、電池駆動と外部電源駆動とを切り替え可能に構成されている。つまり、電源2に電池がセットされた場合には電池駆動となる一方、電源2に外部電源が接続された場合には外部電源駆動となる。
The
メモリ3は、各種データを保存する。メモリ3は、例えば、FLASHメモリ等の半導体メモリである。
The
演算部4は、28bitまで計数できるカウンタ1の計数値Cを積算して、28bitを超えるビット数の積算値を演算して、出力する。例えば、演算部4は、32bitまでの積算値を積算するように構成されている。以下、演算部4の演算方法について説明する。
The
カウンタ1の計数値Cは、詳しくは後述するが、電源がオフになった場合などに途中でリセットされる場合があるので、演算部4は、カウンタ1の計数値Cを第1積算値X1として積算していく。第1積算値X1は、カウンタ1と同じ上限計数値Cmaxが設定されており、第1積算値X1が上限計数値Cmaxに達すると、第1積算値X1は0となり、0から積算が再開される。演算部4は、第1積算値X1が上限計数値Cmaxに達した回数をオーバーフロー回数nとして計数する。以下、計数値C又は第1積算値X1が上限計数値Cmaxに達して、値が0に戻ることを「オーバーフローする」という。
Although the count value C of the counter 1 will be described in detail later, there is a case where the count value C of the counter 1 is reset in the middle when the power is turned off. Will be accumulated. The first integrated value X1 is set to the same upper limit count value Cmax as that of the counter 1. When the first integrated value X1 reaches the upper limit count value Cmax, the first integrated value X1 becomes 0, and the integration is restarted from 0. The The
そして、最終的な第2積算値X2は、第1積算値X1を用いて以下の式(1)で表される。 Then, the final second integrated value X2 is expressed by the following formula (1) using the first integrated value X1.
X2=X1+Cmax×n ・・・(1) X2 = X1 + Cmax × n (1)
また、演算部4は、以下の式(2)により第1積算値X1を演算する。
Moreover, the calculating
X1=C−C’+X1’ ・・・(2) X1 = C−C ′ + X1 ′ (2)
ここで、Cは、演算タイミングにおけるカウンタ1の計数値であり、C’は、前回の計数値であり、X1’は、前回の第1積算値である。 Here, C is the count value of the counter 1 at the calculation timing, C ′ is the previous count value, and X1 ′ is the previous first integrated value.
演算部4は、演算した第1積算値X1を式(1)に代入することによって第2積算値X2を演算する。
The calculating
演算部4は、第1積算値X1及び第2積算値X2の演算を所定の演算タイミングで演算する。例えば、演算タイミングは、パルス計数器100内で管理する周期的なタイミングであってもよく、あるいは、パルス計数器100に無線又は有線で接続された外部機器からの要求指令があったときであってもよい。演算部4は、演算タイミングが到来したときに、カウンタ1から計数値Cを受け取り、その計数値C、前回の計数値C’、前回の第1積算値X1’及びオーバーフロー回数nを用いて、第1積算値X1及び第2積算値X2を演算する。演算部4は、基本的には、受け取った計数値C、並びに、演算した第1積算値X1及びオーバーフロー回数nを保持しており、それらを次回の演算に用いる。また、演算部4は、演算した第2積算値X2をパルス数の積算値として出力する。
The
尚、カウンタ1の計数値Cがオーバーフローした場合には、計数値Cは一旦、0に戻るので、計数値Cは、前回の計数値C’からの増加分を表せていない。そのため、カウンタ1の計数値Cがオーバーフローした場合には、演算部4は、式(2)ではなく、以下の式(3)により第1積算値X1を演算する。
When the count value C of the counter 1 overflows, the count value C once returns to 0, and thus the count value C cannot represent an increase from the previous count value C ′. Therefore, when the count value C of the counter 1 overflows, the
X1=Cmax−C’+C+X1’ ・・・(3) X1 = Cmax−C ′ + C + X1 ′ (3)
演算部4は、演算タイミングでカウンタ1から受け取った計数値Cが前回の計数値C’よりも小さい場合(ただし、内部リセット発生や電源オフ等の異常状態が発生していない場合に限る)には、オーバーフローが発生したと判定する。通常、カウンタ1がパルス数を0から上限計数値まで計数するのに要する時間(パルスの発生元のパルスの送信頻度及びカウンタ1の上限計数値に依存する)は、或る演算タイミングから次の演算タイミングまでの時間よりも十分に長い。そのため、オーバーフローが発生したにもかかわらず、受け取った計数値Cが前回の計数値C’よりも大きくなることはないので、以上のような判定ができる。
The
そして、第1積算値X1がオーバーフローした場合には、演算部4は、オーバーフロー回数nを1だけ増加させると共に、以下の式(4)により第1積算値X1を演算する。
When the first integrated value X1 overflows, the
X1=X1−Cmax ・・・(4) X1 = X1-Cmax (4)
これにより、第1積算値X1は、一旦、0に戻って積算を再開した値となる。こうして、第1積算値X1がオーバーフローする度にオーバーフロー回数nをインクリメントし、第1積算値X1を0に戻して積算を再開することによって、上限計数値より大きな値までパルス数を計数することができる。 As a result, the first integrated value X1 is a value that once returned to 0 and resumed integration. Thus, each time the first integrated value X1 overflows, the number of overflows n is incremented, the first integrated value X1 is returned to 0, and the integration is restarted, thereby counting the number of pulses to a value larger than the upper limit count value. it can.
ここで、演算部4は、電源2が電池駆動か外部電源駆動かによって具体的な積算値の演算方法を変更する。例えば、演算部4が異常な動作した場合等にパルス計数器100は内部リセットを行う場合があり、その場合の演算の処理が電池駆動と外部電源駆動とで異なる。さらに、例えば、電池が切れたり、外部電源が瞬時停電になったりして、電源2がオフになる場合があり、その後、電源オンになったときの演算の処理が電池駆動と外部電源駆動とで異なる。
Here, the
〈電池駆動〉
電源2が電池駆動の場合には、パルス計数器100の内部リセットが発生したときには、カウンタ1はリセットされず、演算部4が保持するオーバーフロー回数nがメモリ3に保存される。つまり、カウンタ1の計数値Cは保持される。内部リセット後の復帰時には、カウンタ1は、保持した計数値Cから計数を再開する。また、電源2がオフになって、カウンタ1がリセットされる場合、即ち、計数値Cがクリアされる場合には、オーバーフロー回数n、第1積算値X1及び第2積算値X2もクリアされ、0から計数及び積算が再開される。
<Battery drive>
When the
つまり、計数値Cは、電源2がオフになった場合にクリアされるが、このときには第1積算値X1もクリアされるので、第1積算値X1は、常に計数値Cと同じ値となる。当然ながら、前回の第1積算値X1’も常に前回の計数値C’と同じ値となる。
That is, the count value C is cleared when the
したがって、式(2)は、
X1=C ・・・(2)’
となるので、内部リセット後の復帰時に演算部4がカウンタ1から計数値Cを受け取ることが、第1積算値X1を求めることになる。そして、演算部4は、メモリ3に保存されたオーバーフロー回数nを読み出して、式(1)を用いて第2積算値X2を演算する。
Therefore, equation (2) is
X1 = C (2) ′
Therefore, when the
つまり、図2に示すように、パルス計数器100の内部リセットが発生しても、計数値C及び第1積算値X1はクリアされず、パルス計数器100の復帰後、保持された計数値C及び保存されたオーバーフロー回数nを用いて、第1積算値X1及び第2積算値X2の積算が再開される。こうして、パルス計数器100の内部リセットの有無にかかわらず、第1積算値X1及び第2積算値X2は、継続した積算値として演算される。
That is, as shown in FIG. 2, even if an internal reset of the
一方、図3に示すように、電源オフによりカウンタ1の計数値Cがクリアされるときには、第1積算値X1もクリアされ、第2積算値X2もクリアされる。そして、電源2がオンになると、カウンタ1は、0から計数値Cの計数を再開し、演算部4も、0から第1積算値X1、オーバーフロー回数n及び第2積算値X2の演算を再開する。
On the other hand, as shown in FIG. 3, when the count value C of the counter 1 is cleared by turning off the power, the first integrated value X1 is also cleared and the second integrated value X2 is also cleared. When the
〈外部電源駆動〉
一方、電源2が外部電電駆動の場合には、演算部4は、演算時とパルス計数器100の内部リセット発生時とに、演算部4が保持する第1積算値X1及びオーバーフロー回数nをメモリ3に保存する。また、パルス計数器100の内部リセット発生時と電源オフ時には、カウンタ1がリセットされ、カウンタ1の計数値Cがクリアされる。
<External power supply drive>
On the other hand, when the
内部リセット後の復帰時には、計数値Cは、0から計数が再開される。そして、内部リセット直後の演算タイミングにおいては、演算部4は、メモリ3に保存された第1積算値X1及びオーバーフロー回数nを参照して第1積算値X1及び第2積算値X2を演算する。
At the time of recovery after the internal reset, the count value C is restarted from 0. Then, at the calculation timing immediately after the internal reset, the
例えば、図4に示すように、演算タイミング(i)と(ii)との間で内部リセットが発生した場合には、内部リセット発生直後の演算タイミング(ii)では、演算部4は、そのときに受け取った計数値Cと、メモリ3に保存された第1積算値X1を前回の第1積算値X1’として用いて、式(2)により第1積算値X1を演算する。具体的には、前回の第1積算値X1’は、メモリ3に保存されている直近の第1積算値X1であり、内部リセット発生時の第1積算値X1である。計数値Cは、一旦クリアされるので、前回の計数値C’は0である。この演算により、内部リセット発生時の第1積算値X1に、内部リセット発生時から演算タイミング(ii)までの計数値Cの増加分が足されて、演算タイミング(ii)における第1積算値X1が求められる。さらに、演算部4は、演算した第1積算値X1とメモリ3に保存されたオーバーフロー回数n(この例では、0)を用いて、式(1)により第2積算値X2を演算する。これにより、第1積算値X1及び第2積算値X2は、継続した積算値として演算される。
For example, as shown in FIG. 4, when an internal reset occurs between the calculation timings (i) and (ii), at the calculation timing (ii) immediately after the occurrence of the internal reset, the
一方、電源2がオフになったときも、カウンタ1がリセットされ、計数値Cがクリアされる。その後、電源2がオンになったときには、計数値Cは、0から計数が再開される。そして、電源オンの直後の演算タイミングにおいては、演算部4は、メモリ3に保存された第1積算値X1及びオーバーフロー回数nを参照して第1積算値X1及び第2積算値X2を演算する。
On the other hand, when the
例えば、図4に示すように、演算タイミング(v)と(vi)との間で電源2が一旦オフになり、その後オンになった場合には、電源オン直後の演算タイミング(vi)では、演算部4は、そのときに受け取った計数値Cと、メモリ3に保存された前回の第1積算値X1を第1積算値X1’とを用いて、式(2)により第1積算値X1を演算する。具体的には、前回の第1積算値X1’は、メモリ3に保存されている直近の第1積算値X1である、演算タイミング(v)における第1積算値X1である。計数値Cは、一旦クリアされるので、前回の計数値C’は0である。この演算により、演算タイミング(v)における第1積算値X1に、電源オンから演算タイミング(vi)までの計数値Cの増加分が足されて、演算タイミング(vi)における第1積算値X1が求められる。つまり、前回の演算タイミングである(v)から電源オフになるまでの間の計数値Cの増加分を積算することはできないが、直近の演算タイミング(v)における第1積算値X1が保存されているので、それを利用して積算を継続することができる。さらに、演算部4は、演算した第1積算値X1とメモリ3に保存されたオーバーフロー回数n(この例では、2)を用いて、式(1)により第2積算値X2を演算する。これにより、第1積算値X1及び第2積算値X2は、継続した積算値として演算される。
For example, as shown in FIG. 4, when the
このように、外部電源駆動においては、瞬時停電等によって電源2が一旦オフになった後、オンになる場合があり得る。この場合、カウンタ1は計数値Cを保持できず、クリアせざるを得ない。そこで、カウンタ1と同じ計数能力を有する(即ち、同じ上限計数値を有する)第1積算値X1を設定し、計数値Cを第1積算値X1として積算していき、所定の保存タイミングで第1積算値X1及びオーバーフロー回数nをメモリ3の保存しておく。これにより、瞬時停電等によりカウンタ1がリセットされても、保存している第1積算値X1を用いてパルス数の積算を継続することができる。そして、第1積算値X1と、そのオーバーフロー回数nとで第2積算値X2を求めることによって、上限計数値Cmaxよりも大きな計数値までパルス数を計数することができる。ここで、保存タイミングは、例えば、演算タイミング及び内部リセット時である。
Thus, in external power supply driving, the
尚、内部リセット時においては、電池駆動の場合のように、カウンタ1の計数値Cを保持することもできる。しかし、内部リセット時にも計数値Cをクリアすることによって、内部リセット時も電源オフ時と同様の処理を演算を行うことができる。 At the time of internal reset, the count value C of the counter 1 can be held as in the case of battery drive. However, by clearing the count value C at the time of internal reset, it is possible to perform the same processing as at power-off at the time of internal reset.
以上のように、パルス計数器100は、上限計数値Cmaxが設定され、パルス数を上限計数値Cmaxまで計数すると、再び、パルス数を0から計数するように構成されたカウンタ1と、カウンタ1の計数値を積算してパルスの積算値を演算する演算部4とを備え、演算部4は、計数値を積算して第1積算値X1を演算し、第1積算値X1が上限計数値Cmaxに達すると、再び、第1積算値X1を0から積算し、第1積算値X1が上限計数値Cmaxに達した回数であるオーバーフロー回数nと第1積算値X1とに基づいて、パルスの積算値としての第2積算値X2を演算する。
As described above, the
この構成によれば、カウンタ1が上限計数値Cmaxまでしか計数できないとしても、第1積算値X1のオーバーフロー回数nを計数することによって、上限計数値Cmaxより大きな値までパルス数を計数することができる。 According to this configuration, even if the counter 1 can only count up to the upper limit count value Cmax, the number of pulses can be counted up to a value greater than the upper limit count value Cmax by counting the overflow count n of the first integrated value X1. it can.
具体的には、演算部4は、上限計数値Cmaxにオーバーフロー回数nを乗じた値に第1積算値X1を足すことによって、第2積算値X2を演算する。
Specifically, the
また、パルス計数器100は、データを保存するメモリ3をさらに備え、演算部4は、第1積算値X1及びオーバーフロー回数nを所定の保存タイミングでメモリ3に保存しており、カウンタ1がリセットされた後の演算時には演算を行うときのカウンタ1の計数値Cと、メモリ3に保存されている第1積算値X1及びオーバーフロー回数nとに基づいて第2積算値X2を演算する。
The
この構成によれば、カウンタ1の計数値Cが途中でクリアされても、メモリ3に保存されている第1積算値X1及びオーバーフロー回数nを参照して、第2積算値X2を継続した積算値として演算することができる。
According to this configuration, even if the count value C of the counter 1 is cleared halfway, the second integrated value X2 is continuously integrated with reference to the first integrated value X1 and the overflow count n stored in the
さらに、パルス計数器100は、外部電源で構成される電源2をさらに備え、カウンタ1は、電源2がオフになるとき及びパルス計数器が内部リセットされるときにリセットされる。
Further, the
また、パルス計数器100は、電池で構成される電源2と、データを保存するメモリ3とをさらに備え、カウンタ1は、パルス計数器100が内部リセットされるときにもリセットされず、計数値Cを保持し、演算部4は、オーバーフロー回数nを所定の保存タイミングでメモリ3に保存しておき、パルス計数器100が内部リセットされた後の演算時には演算を行うときのカウンタ1の計数値Cと、メモリ3に保存されているオーバーフロー回数nとに基づいて第2積算値X2を演算する。
Further, the
この構成によれば、パルス計数器100の内部リセットが発生したときにも、カウンタ1の計数値Cはクリアされない。そのため、オーバーフロー回数nをメモリ3に適宜保存しておけば、カウンタ1の計数値Cとメモリ3に保存されたオーバーフロー回数nを用いて第2積算値X2を演算することができる。
According to this configuration, even when the internal reset of the
さらに、パルス計数器100は、電池と外部電源とを切り替え可能な電源2と、データを保存するメモリ3とをさらに備え、電源2が電池の場合には、カウンタ1は、パルス計数器100が内部リセットされるときにもリセットされず、計数値Cを保持し、演算部4は、オーバーフロー回数nを所定の保存タイミングでメモリ3に保存しておき、パルス計数器100が内部リセットされた後の演算時には演算を行うときのカウンタ1の計数値Cと、メモリ3に保存されているオーバーフロー回数nとに基づいて第2積算値X2を演算する一方、電源2が外部電源の場合には、カウンタ1は、電源2がオフになるとき及びパルス計数器が内部リセットされるときにリセットされ、演算部4は、第1積算値X1及びオーバーフロー回数nを所定の保存タイミングでメモリ3に保存しており、カウンタ1がリセットされた後の演算時には演算を行うときのカウンタ1の計数値Cと、メモリ3に保存されている第1積算値X1及びオーバーフロー回数nとに基づいて第2積算値X2を演算する。
Further, the
この構成によれば、パルス計数器100は、電源2が電池か外部電源かによって演算処理を適宜切り替えることができる。
According to this configuration, the
尚、電源2が電池の場合には、電源2が外部電源の場合のように、演算部4が保持する第1積算値X1及びオーバーフロー回数nを毎回の演算時にメモリ3に保存することもできる。しかし、そのようにしないことにより、消費電流を抑えて、電池寿命を延ばすことができる。
When the
《実施形態2》
続いて、実施形態2に係るノード装置110について説明する。図5は、ノード装置110のブロック図であり、図6は、ネットワークシステム1000の概略図である。パルス計数器100は、ノード装置110に内蔵されている。ノード装置110は、ネットシステム(以下、「システム」と称する)1000を形成する。システム1000は、無線アドホックネットワークである。このシステム1000は、近接する小型無線端末が自律的にネットワークを構築するよう構成される。システム1000は、複数のノード装置110,110,…と、ユーザ機器120,120,…とを備えている。各ノード装置110には、ユーザ機器120が接続されている。ユーザ機器としては、PC(パーソナルコンピュータ)120A、計測器120B等が含まれる(以下、各ユーザ機器を区別しないときには、単に、「ユーザ機器120」と称する)。
<<
Next, the
複数のユーザ機器においては、PC120Aがマスタ機として機能し、それ以外の計測器120B,120B,…がスレーブ機として機能する。つまり、PC120Aが、計測器120B,120B,…を一方的に制御する。以下、PC120Aをマスタユーザ機器120Aと、計測器120Bをスレーブユーザ機器120Bとも称する。
In a plurality of user devices, the
複数のノード装置110,110,…間は、無線で結合される。すなわち、複数のノード装置110,110,…は、無線ネットワークを構築している。複数のノード装置110,110,…には、1つの基地局ノード装置110Aと、複数の子ノード装置110B,110B,…とが含まれている。基地局ノード装置110Aが親機であり、子ノード装置110Bが子機である。基地局ノード装置110Aには、前記マスタユーザ機器120Aが接続されている。子ノード装置110Bには、前記スレーブユーザ機器120Bが接続されている。以下、各ノード装置を区別しないときには、単に、「ノード装置110」と称する。
The plurality of
複数のノード装置110,110間の無線リンクは、例えば、920MHz帯を用いたIEEE802.15.4に準拠する短距離無線ネットワークであり得る。このIEEE802.15.4は、PAN(Personal Area Network)又はWPAN(Wireless Personal Area Network)と呼ばれる無線通信規格の一つであり、低コスト・低消費電力で、高い信頼性とセキュリティを持つ。また、無線リンクは、上述の特定の無線ネットワークに限定されず、典型的にはパケットの形で情報をやりとりできる任意の適切なネットワークであり得る。
The wireless link between the plurality of
また、ノード装置110は、自動中継機能を有し、通信環境を察知して自律的にネットワークを構成し得る。例示的なネットワークは、真メッシュであり、ホップ数も実質的に無制限である。換言すれば本発明の実施形態は、マルチホップの無線ネットワークを使用可能である。こうして、1つのノード装置110を1つの無線端末として、無線アドホックネットワークが構築される。
Further, the
ノード装置110は、基板上に取り付けられた、半導体素子を含む回路要素群によって典型的には実現され得る。典型的には、ノード装置110は、ユーザ機器からのアナログ信号、及び無線ネットワークのための高周波信号を扱うアナログ回路と、MCUを主要素とするデジタル回路との組み合わせによって実現され得る。
The
ノード装置110の制御は、典型的にはソフトウェアによって実現され得る。すなわち、ノード装置110の制御は、典型的にはコンピュータで読み取り可能な媒体に記憶されたソフトウェアによって実現され得る。コンピュータで読み取り可能な媒体には、ハードディスクドライブ、半導体メモリ等がある。代替として、ノード装置110の制御は、ソフトウェア及びハードウェアの組み合わせ、又はハードウェアのみによって実現され得る。
The control of the
計測器120Bは、各種の物理量(温度、湿度、電流、電圧、電力等)を計測・検出するものであって、任意の計測器であり得る。例えば、計測器120は、電力計である。計測器120Bは、その計測結果に応じたパルスを出力するように構成されている。例えば、計測器120Bが電力計であれば、10Whごとに1パルスを出力する。
The measuring
計測器120Bは、子ノード装置110Bに有線で結合される。子ノード装置110B、及び計測器120Bは、共通の通信規格(本実施形態では、RS485)のインタフェースを有している。
The measuring
PC120Aは、例えば、GUI(グラフィカルユーザインタフェース)を備えるソフトウェアを用いて、計測器120Bから受け取られたデータを視覚的に表示したり、統計的に処理したりできる。また、PC120Aは、例えば、ソフトウェアを用いて、計測器120Bに様々な制御信号を送信することができる。
The
ノード装置110は、RFユニット410及びアンテナ430を備える。RFユニット410には、ユーザ機器120からのデータが入力される。RFユニット410は、ユーザ機器120が出力した計測データを無線信号に変換して、アンテナ430から他のノード装置110、例えば上流ノード(基地局ノード装置110A等)へ送信する。
The
RFユニット410は、インタフェース440、DC(直流)電源445、MCU(Micro Controller Unit)450、ROM(読み出し専用メモリ)452、RAM(ランダムアクセスメモリ)454、タイマ456、無線送受信部458及びRFインタフェース460を有する。インタフェース440は、ユーザ機器120によって出力された信号をMCU450が処理できる適当な信号(例えば10ビットデジタル信号)に変換する。このインタフェース440は、ユーザ機器120の通信規格と共通のインタフェースであり、本実施形態では、RS485インタフェースである。DC電源445は、RFユニット410の各機能ブロックに直流電源を供給する。DC電源445は、例えば直流3Vを供給するリチウム電池であり得る。
The
MCU450は、ノード装置110の機能を実現するのに用いられるマイクロプロセッサである。ROM452又はRAM454は、ノード装置110の機能を実現するのに必要なプログラム及びデータを記憶している。タイマ456は、例えば電源をオフにするタイミングを計測し、所定時間が経過したときに、DC電源445からの電源供給を断つようMCU450をトリガする。MCU450は、ROM452、RAM454、及びタイマ456などの周辺素子をその中に含んでもよい。
The
無線送受信部458は、MCU450からのデータを他のノード装置110へ送る応答パケットに変換したり、他のノード装置110から受け取られた要求パケットをデータに変換したりする。RFインタフェース460は、無線送受信部458から出力されたパケットをRF信号に変換し、アンテナに出力したり、アンテナで受け取られたRF信号からパケットを再生し、無線送受信部458に出力したりする。
The wireless transmission /
尚、機能ブロック群の一部又は全ては、適宜、結合されることによって一体化されて実現されてもよい。例えば、RFユニット410は、ハイブリッドIC(集積回路)として実現されてもよい。さらには、RFユニット410及びアンテナ430を一つの基板に一体化して実現されてもよい。
Part or all of the functional block groups may be integrated and realized by being appropriately combined. For example, the
このように、パルス計数器100は、一例として、ネットワークシステム1000を構築するノード装置110に適用することができる。パルス計数器100は、ノード装置110に接続された計測器120Bから出力されるパルスを計数する。そして、パルス計数器100は、パルスの積算値を出力し、このパルスの積算値は、ノード装置110を介して、最終的にPC120Aに伝達される。例えば、PC120Aは、所定のアプリケーションにおいてバルスの積算値を利用する。このとき、PC120Aは、パルスの積算値を32bitのデータとして扱う。ここで、パルス計数器100のカウンタ1の上限計数値が28bitであったとしても、パルス計数器100は、28bitより大きな値までパルス数を積算して、上位機器のビット数に応じた積算値を出力する。換言すると、パルス計数器100は、28bitの計数値を32bitの積算値に変換する。
Thus, the
《その他の実施形態》
以上のように、本出願において開示する技術の例示として、前記実施形態を説明した。しかしながら、本開示における技術は、これに限定されず、適宜、変更、置き換え、付加、省略などを行った実施の形態にも適用可能である。また、上記実施形態で説明した各構成要素を組み合わせて、新たな実施の形態とすることも可能である。また、添付図面および詳細な説明に記載された構成要素の中には、課題解決のために必須な構成要素だけでなく、上記技術を例示するために、課題解決のためには必須でない構成要素も含まれ得る。そのため、それらの必須ではない構成要素が添付図面や詳細な説明に記載されていることをもって、直ちに、それらの必須ではない構成要素が必須であるとの認定をするべきではない。
<< Other Embodiments >>
As described above, the embodiment has been described as an example of the technique disclosed in the present application. However, the technology in the present disclosure is not limited to this, and can also be applied to an embodiment in which changes, replacements, additions, omissions, and the like are appropriately performed. Moreover, it is also possible to combine each component demonstrated by the said embodiment and it can also be set as new embodiment. In addition, among the components described in the accompanying drawings and detailed description, not only the components essential for solving the problem, but also the components not essential for solving the problem in order to exemplify the above technique May also be included. Therefore, it should not be immediately recognized that these non-essential components are essential as those non-essential components are described in the accompanying drawings and detailed description.
前記実施形態について、以下のような構成としてもよい。 About the said embodiment, it is good also as following structures.
前記の構成では、パルス計数器100の電源2は、電池と外部電源とが選択可能に構成されている。しかし、電源2は、電池及び外部電源の何れか一方だけが使用可能な構成であってもよい。その場合には、電源に応じた前述の演算方法が採用される。
In the above configuration, the
また、パルス計数器100は、ノード装置110に適用されているが、これに限られるものではない。パルスの計数が必要な任意の機器にパルス計数器100を適用することができる。
Further, although the
以上説明したように、ここに開示された技術は、パルス計数器について有用である。 As described above, the technique disclosed herein is useful for a pulse counter.
100 パルス計数器
1 カウンタ(計数部)
2 電源
3 メモリ
4 演算部
100 Pulse counter 1 Counter (counter)
2
Claims (6)
前記計数部の計数値を積算してパルスの積算値を演算する演算部とを備え、
前記演算部は、
前記計数値を積算して第1積算値を演算し、
前記第1積算値が前記上限計数値に達すると、再び、前記第1積算値を0から積算し、
前記第1積算値が前記上限計数値に達した回数であるオーバーフロー回数と前記第1積算値とに基づいて、前記パルスの積算値としての第2積算値を演算するパルス計数器。 When an upper limit count value is set and the number of pulses is counted up to the upper limit count value, a counting unit configured to count the pulse number from 0 again,
A calculation unit that calculates the integrated value of the pulse by integrating the count value of the counting unit,
The computing unit is
Calculating the first integrated value by integrating the count value;
When the first integrated value reaches the upper limit count value, the first integrated value is again integrated from 0,
A pulse counter that calculates a second integrated value as an integrated value of the pulse based on an overflow count that is the number of times the first integrated value reaches the upper limit count value and the first integrated value.
前記演算部は、前記上限計数値に前記オーバーフロー回数を乗じた値に前記第1積算値を加算することによって、前記第2積算値を演算するパルス計数器。 The pulse counter according to claim 1.
The calculation unit is a pulse counter that calculates the second integrated value by adding the first integrated value to a value obtained by multiplying the upper limit count value by the overflow count.
データを保存する記憶部をさらに備え、
前記演算部は、前記第1積算値及び前記オーバーフロー回数を所定の保存タイミングで前記記憶部に保存しておき、前記計数部がリセットされた後の演算時には演算を行うときの前記計数部の計数値と、前記記憶部に保存されている前記第1積算値及び前記オーバーフロー回数とに基づいて前記第2積算値を演算するパルス計数器。 The pulse counter according to claim 1 or 2,
A storage unit for storing data;
The calculation unit stores the first integrated value and the overflow count in the storage unit at a predetermined storage timing, and the calculation unit counts when performing the calculation after the counting unit is reset. A pulse counter that calculates the second integrated value based on a numerical value and the first integrated value and the overflow count stored in the storage unit.
外部電源で構成される電源をさらに備え、
前記計数部は、前記電源がオフになるとき及び前記パルス計数器が内部リセットされるときにリセットされるパルス計数器。 The pulse counter according to claim 3,
A power supply composed of an external power supply is further provided.
The counter is a pulse counter that is reset when the power is turned off and when the pulse counter is internally reset.
電池で構成される電源と、
データを保存する記憶部とをさらに備え、
前記計数部は、前記パルス計数器が内部リセットされるときにもリセットされず、前記計数値を保持し、
前記演算部は、前記オーバーフロー回数を所定の保存タイミングで前記記憶部に保存しておき、前記パルス計数器が内部リセットされた後の演算時には演算を行うときの前記計数部の計数値と、前記記憶部に保存されている前記オーバーフロー回数とに基づいて前記第2積算値を演算するパルス計数器。 The pulse counter according to claim 1 or 2,
A power source comprised of batteries;
A storage unit for storing data;
The counting unit is not reset even when the pulse counter is internally reset, holds the count value,
The arithmetic unit stores the overflow count in the storage unit at a predetermined storage timing, and the count value of the counter when performing the calculation at the time of calculation after the pulse counter is internally reset, A pulse counter that calculates the second integrated value based on the overflow count stored in the storage unit.
電池と外部電源とを切り替え可能な電源と、
データを保存する記憶部とをさらに備え、
前記電源が電池の場合には、
前記計数部は、前記パルス計数器が内部リセットされるときにもリセットされず、前記計数値を保持し、
前記演算部は、前記オーバーフロー回数を所定の保存タイミングで前記記憶部に保存しておき、前記パルス計数器が内部リセットされた後の演算時には演算を行うときの前記計数部の計数値と、前記記憶部に保存されている前記オーバーフロー回数とに基づいて前記第2積算値を演算する一方、
前記電源が外部電源の場合には、
前記計数部は、前記電源がオフになるとき及び前記パルス計数器が内部リセットされるときにリセットされ、
前記演算部は、前記第1積算値及び前記オーバーフロー回数を所定の保存タイミングで前記記憶部に保存しておき、前記計数部がリセットされた後の演算時には演算を行うときの前記計数部の計数値と、前記記憶部に保存されている前記第1積算値及び前記オーバーフロー回数とに基づいて前記第2積算値を演算するパルス計数器。 The pulse counter according to claim 1 or 2,
A power source capable of switching between a battery and an external power source;
A storage unit for storing data;
When the power source is a battery,
The counting unit is not reset even when the pulse counter is internally reset, holds the count value,
The arithmetic unit stores the overflow count in the storage unit at a predetermined storage timing, and the count value of the counter when performing the calculation at the time of calculation after the pulse counter is internally reset, While calculating the second integrated value based on the number of overflows stored in the storage unit,
When the power source is an external power source,
The counter is reset when the power is turned off and when the pulse counter is internally reset,
The calculation unit stores the first integrated value and the overflow count in the storage unit at a predetermined storage timing, and the calculation unit counts when performing the calculation after the counting unit is reset. A pulse counter that calculates the second integrated value based on a numerical value and the first integrated value and the overflow count stored in the storage unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015060936A JP2016181118A (en) | 2015-03-24 | 2015-03-24 | Pulse counter |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015060936A JP2016181118A (en) | 2015-03-24 | 2015-03-24 | Pulse counter |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019149645A Division JP6756883B2 (en) | 2019-08-19 | 2019-08-19 | Pulse counter |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2016181118A true JP2016181118A (en) | 2016-10-13 |
Family
ID=57132633
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015060936A Pending JP2016181118A (en) | 2015-03-24 | 2015-03-24 | Pulse counter |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2016181118A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005030787A (en) * | 2003-07-08 | 2005-02-03 | Mitsubishi Electric Corp | Rotator rotation angle detection device for permanent magnet synchronous motor |
JP2008085543A (en) * | 2006-09-27 | 2008-04-10 | Japan Aviation Electronics Industry Ltd | Counter circuit |
-
2015
- 2015-03-24 JP JP2015060936A patent/JP2016181118A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005030787A (en) * | 2003-07-08 | 2005-02-03 | Mitsubishi Electric Corp | Rotator rotation angle detection device for permanent magnet synchronous motor |
JP2008085543A (en) * | 2006-09-27 | 2008-04-10 | Japan Aviation Electronics Industry Ltd | Counter circuit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2402721B1 (en) | Power management system for wireless autonomous transducer solutions | |
US9893982B2 (en) | Routing control apparatus and routing control method | |
Fourty et al. | An advanced study of energy consumption in an IEEE 802.15. 4 based network: Everything but the truth on 802.15. 4 node lifetime | |
JP6282840B2 (en) | Wireless communication apparatus and wireless information collecting system | |
Khriji et al. | Measuring energy consumption of a wireless sensor node during transmission: Panstamp | |
WO2008082288A1 (en) | Method and system for estimating the lifetime of a battery | |
US9929898B2 (en) | System, communications node, and switching method | |
EP3637868B1 (en) | Apparatus and method for controlling time period related to operating mode in wireless communication system | |
JP2007158418A (en) | Ad hoc radio communication network, terminal unit therefor, method of setting active time, and method of setting transmission path | |
US20130294303A1 (en) | Reducing power consumption in a device operating as an access point of a wireless local area network | |
JP2019194928A (en) | Pulse counter | |
US20200363834A1 (en) | Pulse Counting Apparatus Operating at Low Power and Operation Method Thereof | |
JP2010245725A (en) | Sensor network system and sensor network control method | |
CN109076100B (en) | Cooperative transmission management for smart devices | |
JP2017037358A (en) | Observation system, repeating device and observation data reception method | |
JP6027503B2 (en) | Sensor network system | |
JP2016181118A (en) | Pulse counter | |
CN105788205B (en) | Acquisition terminal based on WIA-PA wireless communication module and power management monitoring method thereof | |
US9615332B2 (en) | Mobile terminal device and method for device network setting | |
Nguyen et al. | Low-power and cost-effective wifi sensor motes for wireless embedded internet applications | |
JP5227867B2 (en) | Host device | |
JP2019138646A (en) | Radiation measurement system, radiation measurement device, radiation monitoring system, and radiation monitoring method | |
JP5998909B2 (en) | Mesh wireless communication network system, wireless communication method, and wireless terminal | |
JP6560439B2 (en) | Wireless communication system, communication device, sensor device, and wireless communication method | |
CN112953493B (en) | Vibration wake-up circuit, electronic device, power saving method, device and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A711 Effective date: 20170619 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20170619 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180115 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20181121 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20181225 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190219 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190702 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20191224 |