JP2016181118A - Pulse counter - Google Patents

Pulse counter Download PDF

Info

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
Application number
JP2015060936A
Other languages
Japanese (ja)
Inventor
綱貴 川淵
Tsunaki Kawabuchi
綱貴 川淵
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.)
Sumitomo Precision Products Co Ltd
Original Assignee
Sumitomo Precision Products 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 Sumitomo Precision Products Co Ltd filed Critical Sumitomo Precision Products Co Ltd
Priority to JP2015060936A priority Critical patent/JP2016181118A/en
Publication of JP2016181118A publication Critical patent/JP2016181118A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Measurement Of Radiation (AREA)

Abstract

PROBLEM TO BE SOLVED: To count the number of pulses up to a value exceeding the upper-limit value of a count unit.SOLUTION: A pulse counter 100 comprises a counter 1 in which an upper-limit count value Cmax is set, and which is configured so as to count the number of pulses from 0 again when having counted the number of pulses up to the upper-limit count value Cmax; and an arithmetic unit 4 for integrating the count values of the counter 1 and calculating the integrated value of pulses. The arithmetic unit 4 integrates the count values and calculates a first integrated value X1, integrates the integrated value X1 from 0 again when the first integrated value X1 reaches the upper-limit count value Cmax, and calculates a second integrated value X2 as the integrated value of pulses on the basis of an overflow count n, which is the number of times the first integrated value X1 has reached the upper-limit count value Cmax, and the first integrated value X1.SELECTED DRAWING: Figure 4

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.

特開2007−17374号公報JP 2007-17374 A

このようなパルス計数器は、例えば、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.

図1は、パルス計数器のブロック図である。FIG. 1 is a block diagram of a pulse counter. 図2は、電池駆動において内部リセットが発生した場合の計数値及び積算値の変化の一例を示す図である。FIG. 2 is a diagram illustrating an example of changes in the count value and the integrated value when an internal reset occurs during battery driving. 図3は、電池駆動において電源オフ/オンが発生した場合の計数値及び積算値の変化の一例を示す図である。FIG. 3 is a diagram illustrating an example of changes in the count value and the integrated value when the power is turned off / on in battery driving. 図4は、外部電源駆動における計数値及び積算値の変化の一例を示す図である。FIG. 4 is a diagram illustrating an example of changes in the count value and the integrated value in the external power supply driving. 図5は、ノード装置のブロック図である。FIG. 5 is a block diagram of the node device. 図6は、ネットワークシステム概略図である。FIG. 6 is a schematic diagram of a network system.

以下、例示的な実施形態を図面に基づいて詳細に説明する。   Hereinafter, exemplary embodiments will be described in detail with reference to the drawings.

《実施形態1》
以下、実施形態1に係るパルス計数器100について説明する。図1は、パルス計数器100のブロック図である。
Embodiment 1
Hereinafter, the pulse counter 100 according to the first embodiment will be described. FIG. 1 is a block diagram of a pulse counter 100.

パルス計数器100は、電力計等の計測器に接続される。計測器は、その計測結果に応じたパルスを出力するように構成されている。計測器が電力計の場合、例えば、電力計は、10Whごとに1パルスを出力する。パルス計数器100は、パルスを計数するカウンタ1と、パルス計数器100の各部に電力を供給する電源2と、各種データを保存するメモリ3と、パルス数の積算値を演算する演算部4とを備える。   The pulse counter 100 is connected to a measuring instrument such as a wattmeter. The measuring instrument is configured to output a pulse corresponding to the measurement result. When the measuring instrument is a wattmeter, for example, the wattmeter outputs one pulse every 10 Wh. The pulse counter 100 includes a counter 1 that counts pulses, a power source 2 that supplies power to each part of the pulse counter 100, a memory 3 that stores various data, and an arithmetic unit 4 that calculates an integrated value of the number of pulses. Is provided.

カウンタ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 calculation unit 4. The counter 1 is, for example, a CPLD (Complex Programmable Logic Device). The counter 1 is an example of a counting unit.

以下、計数値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 power source 2 is configured to be able to switch between battery driving and external power driving. That is, when a battery is set in the power source 2, battery driving is performed, whereas when an external power source is connected to the power source 2, external power driving is performed.

メモリ3は、各種データを保存する。メモリ3は、例えば、FLASHメモリ等の半導体メモリである。   The memory 3 stores various data. The memory 3 is a semiconductor memory such as a FLASH memory, for example.

演算部4は、28bitまで計数できるカウンタ1の計数値Cを積算して、28bitを超えるビット数の積算値を演算して、出力する。例えば、演算部4は、32bitまでの積算値を積算するように構成されている。以下、演算部4の演算方法について説明する。   The calculation unit 4 integrates the count value C of the counter 1 that can count up to 28 bits, calculates an integrated value of the number of bits exceeding 28 bits, and outputs the calculated value. For example, the calculation unit 4 is configured to integrate up to 32 bits. Hereinafter, a calculation method of the calculation unit 4 will be described.

カウンタ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 calculation unit 4 counts the number of times that the first integrated value X1 has reached the upper limit count value Cmax as the overflow count n. Hereinafter, when the count value C or the first integrated value X1 reaches the upper limit count value Cmax and the value returns to 0 is referred to as “overflow”.

そして、最終的な第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 part 4 calculates the 1st integration value X1 by the following formula | equation (2).

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 unit 4 calculates the second integrated value X2 by substituting the calculated first integrated value X1 into the equation (1).

演算部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 calculation unit 4 calculates the first integrated value X1 and the second integrated value X2 at a predetermined calculation timing. For example, the calculation timing may be a periodic timing managed in the pulse counter 100, or when there is a request command from an external device connected to the pulse counter 100 wirelessly or by wire. May be. The calculation unit 4 receives the count value C from the counter 1 when the calculation timing arrives, and uses the count value C, the previous count value C ′, the previous first integrated value X1 ′, and the overflow count n, The first integrated value X1 and the second integrated value X2 are calculated. The calculation unit 4 basically holds the received count value C, the calculated first integrated value X1, and the overflow count n, and uses them for the next calculation. In addition, the calculation unit 4 outputs the calculated second integrated value X2 as an integrated value of the number of pulses.

尚、カウンタ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 calculation unit 4 calculates the first integrated value X1 not by the equation (2) but by the following equation (3).

X1=Cmax−C’+C+X1’ ・・・(3)   X1 = Cmax−C ′ + C + X1 ′ (3)

演算部4は、演算タイミングでカウンタ1から受け取った計数値Cが前回の計数値C’よりも小さい場合(ただし、内部リセット発生や電源オフ等の異常状態が発生していない場合に限る)には、オーバーフローが発生したと判定する。通常、カウンタ1がパルス数を0から上限計数値まで計数するのに要する時間(パルスの発生元のパルスの送信頻度及びカウンタ1の上限計数値に依存する)は、或る演算タイミングから次の演算タイミングまでの時間よりも十分に長い。そのため、オーバーフローが発生したにもかかわらず、受け取った計数値Cが前回の計数値C’よりも大きくなることはないので、以上のような判定ができる。   The calculation unit 4 is only when the count value C received from the counter 1 at the calculation timing is smaller than the previous count value C ′ (provided that an abnormal state such as an internal reset or power-off has not occurred). Determines that an overflow has occurred. Usually, the time required for the counter 1 to count the number of pulses from 0 to the upper limit count value (depending on the transmission frequency of the pulse from which the pulse is generated and the upper limit count value of the counter 1) It is sufficiently longer than the time until the calculation timing. For this reason, the received count value C does not become larger than the previous count value C ′ in spite of the occurrence of overflow, so the above determination can be made.

そして、第1積算値X1がオーバーフローした場合には、演算部4は、オーバーフロー回数nを1だけ増加させると共に、以下の式(4)により第1積算値X1を演算する。   When the first integrated value X1 overflows, the calculation unit 4 increases the overflow count n by 1 and calculates the first integrated value X1 by the following equation (4).

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 calculation unit 4 changes the specific calculation method of the integrated value depending on whether the power source 2 is driven by a battery or an external power source. For example, when the calculation unit 4 operates abnormally, the pulse counter 100 may perform an internal reset, and the calculation process in that case differs between battery driving and external power supply driving. Furthermore, for example, the power supply 2 may be turned off because the battery runs out or the external power supply becomes an instantaneous power failure. Thereafter, the calculation processing when the power is turned on is battery driving and external power driving. It is different.

〈電池駆動〉
電源2が電池駆動の場合には、パルス計数器100の内部リセットが発生したときには、カウンタ1はリセットされず、演算部4が保持するオーバーフロー回数nがメモリ3に保存される。つまり、カウンタ1の計数値Cは保持される。内部リセット後の復帰時には、カウンタ1は、保持した計数値Cから計数を再開する。また、電源2がオフになって、カウンタ1がリセットされる場合、即ち、計数値Cがクリアされる場合には、オーバーフロー回数n、第1積算値X1及び第2積算値X2もクリアされ、0から計数及び積算が再開される。
<Battery drive>
When the power source 2 is battery-driven, when the internal reset of the pulse counter 100 occurs, the counter 1 is not reset, and the overflow count n held by the arithmetic unit 4 is stored in the memory 3. That is, the count value C of the counter 1 is held. At the time of recovery after the internal reset, the counter 1 restarts counting from the held count value C. When the power supply 2 is turned off and the counter 1 is reset, that is, when the count value C is cleared, the overflow count n, the first integrated value X1, and the second integrated value X2 are also cleared. Counting and integration is resumed from 0.

つまり、計数値Cは、電源2がオフになった場合にクリアされるが、このときには第1積算値X1もクリアされるので、第1積算値X1は、常に計数値Cと同じ値となる。当然ながら、前回の第1積算値X1’も常に前回の計数値C’と同じ値となる。   That is, the count value C is cleared when the power source 2 is turned off. At this time, the first integrated value X1 is also cleared, so the first integrated value X1 is always the same value as the count value C. . Of course, the previous first integrated value X1 'is always the same value as the previous count value C'.

したがって、式(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 calculation unit 4 receives the count value C from the counter 1 when returning after the internal reset, the first integrated value X1 is obtained. And the calculating part 4 reads the overflow count n preserve | saved at the memory 3, and calculates the 2nd integrated value X2 using Formula (1).

つまり、図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 pulse counter 100 occurs, the count value C and the first integrated value X1 are not cleared, and the count value C retained after the pulse counter 100 returns. Then, the integration of the first integrated value X1 and the second integrated value X2 is resumed using the stored overflow count n. Thus, regardless of whether the pulse counter 100 is internally reset, the first integrated value X1 and the second integrated value X2 are calculated as continuous integrated values.

一方、図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 power source 2 is turned on, the counter 1 resumes counting the count value C from 0, and the computing unit 4 also resumes computing the first integrated value X1, the overflow count n, and the second integrated value X2 from 0. To do.

〈外部電源駆動〉
一方、電源2が外部電電駆動の場合には、演算部4は、演算時とパルス計数器100の内部リセット発生時とに、演算部4が保持する第1積算値X1及びオーバーフロー回数nをメモリ3に保存する。また、パルス計数器100の内部リセット発生時と電源オフ時には、カウンタ1がリセットされ、カウンタ1の計数値Cがクリアされる。
<External power supply drive>
On the other hand, when the power supply 2 is driven by external electric power, the calculation unit 4 stores the first integrated value X1 and the overflow count n held by the calculation unit 4 at the time of calculation and when the internal reset of the pulse counter 100 occurs. Save to 3. When the internal reset of the pulse counter 100 is generated and when the power is turned off, the counter 1 is reset and the count value C of the counter 1 is cleared.

内部リセット後の復帰時には、計数値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 calculation unit 4 calculates the first integrated value X1 and the second integrated value X2 with reference to the first integrated value X1 and the overflow count n stored in the memory 3.

例えば、図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 calculation unit 4 The first integrated value X1 is calculated by the equation (2) using the count value C received in the above and the first integrated value X1 stored in the memory 3 as the previous first integrated value X1 ′. Specifically, the previous first integrated value X1 'is the latest first integrated value X1 stored in the memory 3, and is the first integrated value X1 when an internal reset occurs. Since the count value C is once cleared, the previous count value C ′ is zero. By this calculation, the increment of the count value C from the occurrence of the internal reset to the calculation timing (ii) is added to the first integrated value X1 when the internal reset occurs, and the first integrated value X1 at the calculation timing (ii). Is required. Further, the calculating unit 4 calculates the second integrated value X2 by the equation (1) using the calculated first integrated value X1 and the overflow count n stored in the memory 3 (in this example, 0). Thus, the first integrated value X1 and the second integrated value X2 are calculated as continuous integrated values.

一方、電源2がオフになったときも、カウンタ1がリセットされ、計数値Cがクリアされる。その後、電源2がオンになったときには、計数値Cは、0から計数が再開される。そして、電源オンの直後の演算タイミングにおいては、演算部4は、メモリ3に保存された第1積算値X1及びオーバーフロー回数nを参照して第1積算値X1及び第2積算値X2を演算する。   On the other hand, when the power supply 2 is turned off, the counter 1 is reset and the count value C is cleared. Thereafter, when the power supply 2 is turned on, the count value C is restarted from 0. Then, at the calculation timing immediately after the power is turned on, the calculation unit 4 calculates the first integrated value X1 and the second integrated value X2 with reference to the first integrated value X1 and the overflow count n stored in the memory 3. .

例えば、図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 power source 2 is temporarily turned off between the computation timings (v) and (vi) and then turned on, the computation timing (vi) immediately after the power on is The calculation unit 4 uses the count value C received at that time and the first accumulated value X1 stored in the memory 3 as the first accumulated value X1 ′, and the first accumulated value X1 according to the equation (2). Is calculated. Specifically, the previous first integrated value X1 'is the first integrated value X1 at the calculation timing (v), which is the latest first integrated value X1 stored in the memory 3. Since the count value C is once cleared, the previous count value C ′ is zero. By this calculation, the increment of the count value C from the power-on to the calculation timing (vi) is added to the first integrated value X1 at the calculation timing (v), and the first integrated value X1 at the calculation timing (vi) is obtained. Desired. That is, the increment of the count value C from the previous calculation timing (v) until the power is turned off cannot be integrated, but the first integrated value X1 at the latest calculation timing (v) is stored. Therefore, the integration can be continued by using it. Further, the calculation unit 4 calculates the second integrated value X2 by the equation (1) using the calculated first integrated value X1 and the overflow count n stored in the memory 3 (2 in this example). Thus, the first integrated value X1 and the second integrated value X2 are calculated as continuous integrated values.

このように、外部電源駆動においては、瞬時停電等によって電源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 power supply 2 may be turned on after being turned off once due to an instantaneous power failure or the like. In this case, the counter 1 cannot hold the count value C and must be cleared. Therefore, a first integrated value X1 having the same counting ability as that of the counter 1 (that is, having the same upper limit count value) is set, the count value C is integrated as the first integrated value X1, and the first accumulated value X1 is accumulated at a predetermined storage timing. One accumulated value X1 and overflow count n are stored in the memory 3. Thereby, even if the counter 1 is reset due to an instantaneous power failure or the like, the accumulation of the number of pulses can be continued using the stored first accumulated value X1. Then, by obtaining the second integrated value X2 from the first integrated value X1 and the overflow count n, the number of pulses can be counted up to a count value larger than the upper limit count value Cmax. Here, the storage timing is, for example, a calculation timing and an internal reset time.

尚、内部リセット時においては、電池駆動の場合のように、カウンタ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 pulse counter 100 is configured such that when the upper limit count value Cmax is set and the number of pulses is counted up to the upper limit count value Cmax, the counter 1 configured to count the pulse number from 0 again and the counter 1 The calculation unit 4 calculates a first integrated value X1 by integrating the count value, and the first integrated value X1 is the upper limit count value. When Cmax is reached, the first integrated value X1 is again integrated from 0, and based on the overflow count n, which is the number of times the first integrated value X1 reaches the upper limit count value Cmax, and the first integrated value X1, A second integrated value X2 as an integrated value is calculated.

この構成によれば、カウンタ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 calculation unit 4 calculates the second integrated value X2 by adding the first integrated value X1 to the value obtained by multiplying the upper limit count value Cmax by the overflow count n.

また、パルス計数器100は、データを保存するメモリ3をさらに備え、演算部4は、第1積算値X1及びオーバーフロー回数nを所定の保存タイミングでメモリ3に保存しており、カウンタ1がリセットされた後の演算時には演算を行うときのカウンタ1の計数値Cと、メモリ3に保存されている第1積算値X1及びオーバーフロー回数nとに基づいて第2積算値X2を演算する。   The pulse counter 100 further includes a memory 3 for storing data, and the calculation unit 4 stores the first integrated value X1 and the overflow count n in the memory 3 at a predetermined storage timing, and the counter 1 is reset. After the calculation, the second integrated value X2 is calculated based on the count value C of the counter 1 when the calculation is performed, the first integrated value X1 stored in the memory 3, and the overflow count n.

この構成によれば、カウンタ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 memory 3. It can be calculated as a value.

さらに、パルス計数器100は、外部電源で構成される電源2をさらに備え、カウンタ1は、電源2がオフになるとき及びパルス計数器が内部リセットされるときにリセットされる。   Further, the pulse counter 100 further includes a power source 2 constituted by an external power source, and the counter 1 is reset when the power source 2 is turned off and when the pulse counter is internally reset.

また、パルス計数器100は、電池で構成される電源2と、データを保存するメモリ3とをさらに備え、カウンタ1は、パルス計数器100が内部リセットされるときにもリセットされず、計数値Cを保持し、演算部4は、オーバーフロー回数nを所定の保存タイミングでメモリ3に保存しておき、パルス計数器100が内部リセットされた後の演算時には演算を行うときのカウンタ1の計数値Cと、メモリ3に保存されているオーバーフロー回数nとに基づいて第2積算値X2を演算する。   Further, the pulse counter 100 further includes a power source 2 constituted by a battery and a memory 3 for storing data, and the counter 1 is not reset even when the pulse counter 100 is internally reset. C, and the calculation unit 4 stores the overflow count n in the memory 3 at a predetermined storage timing, and the counter 1 count value when performing the calculation after the pulse counter 100 is internally reset. Based on C and the number of overflows n stored in the memory 3, the second integrated value X2 is calculated.

この構成によれば、パルス計数器100の内部リセットが発生したときにも、カウンタ1の計数値Cはクリアされない。そのため、オーバーフロー回数nをメモリ3に適宜保存しておけば、カウンタ1の計数値Cとメモリ3に保存されたオーバーフロー回数nを用いて第2積算値X2を演算することができる。   According to this configuration, even when the internal reset of the pulse counter 100 occurs, the count value C of the counter 1 is not cleared. Therefore, if the overflow count n is appropriately stored in the memory 3, the second integrated value X2 can be calculated using the count value C of the counter 1 and the overflow count n stored in the memory 3.

さらに、パルス計数器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 pulse counter 100 further includes a power source 2 capable of switching between a battery and an external power source, and a memory 3 for storing data. When the power source 2 is a battery, the counter 1 includes the pulse counter 100 Even when the internal reset is performed, the count value C is not retained, and the calculation unit 4 stores the overflow count n in the memory 3 at a predetermined storage timing, and after the pulse counter 100 is internally reset. When calculating the second integrated value X2 based on the count value C of the counter 1 when performing the calculation and the overflow count n stored in the memory 3, while the power source 2 is an external power source, The counter 1 is reset when the power source 2 is turned off and when the pulse counter is internally reset, and the calculation unit 4 sets the first integrated value X1 and the overflow count n to a predetermined value. The count value C of the counter 1 when performing the calculation after the counter 1 is reset, the first integrated value X1 and the overflow count n stored in the memory 3 are stored in the memory 3 at the existing timing. Based on the above, the second integrated value X2 is calculated.

この構成によれば、パルス計数器100は、電源2が電池か外部電源かによって演算処理を適宜切り替えることができる。   According to this configuration, the pulse counter 100 can appropriately switch the arithmetic processing depending on whether the power source 2 is a battery or an external power source.

尚、電源2が電池の場合には、電源2が外部電源の場合のように、演算部4が保持する第1積算値X1及びオーバーフロー回数nを毎回の演算時にメモリ3に保存することもできる。しかし、そのようにしないことにより、消費電流を抑えて、電池寿命を延ばすことができる。   When the power supply 2 is a battery, the first integrated value X1 and the overflow count n held by the calculation unit 4 can be stored in the memory 3 at each calculation, as in the case where the power supply 2 is an external power supply. . However, by not doing so, current consumption can be suppressed and battery life can be extended.

《実施形態2》
続いて、実施形態2に係るノード装置110について説明する。図5は、ノード装置110のブロック図であり、図6は、ネットワークシステム1000の概略図である。パルス計数器100は、ノード装置110に内蔵されている。ノード装置110は、ネットシステム(以下、「システム」と称する)1000を形成する。システム1000は、無線アドホックネットワークである。このシステム1000は、近接する小型無線端末が自律的にネットワークを構築するよう構成される。システム1000は、複数のノード装置110,110,…と、ユーザ機器120,120,…とを備えている。各ノード装置110には、ユーザ機器120が接続されている。ユーザ機器としては、PC(パーソナルコンピュータ)120A、計測器120B等が含まれる(以下、各ユーザ機器を区別しないときには、単に、「ユーザ機器120」と称する)。
<< Embodiment 2 >>
Next, the node device 110 according to the second embodiment will be described. FIG. 5 is a block diagram of the node device 110, and FIG. 6 is a schematic diagram of the network system 1000. The pulse counter 100 is built in the node device 110. The node device 110 forms a network system (hereinafter referred to as “system”) 1000. System 1000 is a wireless ad hoc network. This system 1000 is configured such that adjacent small wireless terminals autonomously construct a network. The system 1000 includes a plurality of node devices 110, 110,... And user devices 120, 120,. A user device 120 is connected to each node device 110. The user equipment includes a PC (personal computer) 120A, a measuring instrument 120B, and the like (hereinafter simply referred to as “user equipment 120” when each user equipment is not distinguished).

複数のユーザ機器においては、PC120Aがマスタ機として機能し、それ以外の計測器120B,120B,…がスレーブ機として機能する。つまり、PC120Aが、計測器120B,120B,…を一方的に制御する。以下、PC120Aをマスタユーザ機器120Aと、計測器120Bをスレーブユーザ機器120Bとも称する。   In a plurality of user devices, the PC 120A functions as a master device, and the other measuring devices 120B, 120B,... Function as slave devices. That is, the PC 120A controls the measuring instruments 120B, 120B,. Hereinafter, the PC 120A is also referred to as a master user device 120A, and the measuring instrument 120B is also referred to as a slave user device 120B.

複数のノード装置110,110,…間は、無線で結合される。すなわち、複数のノード装置110,110,…は、無線ネットワークを構築している。複数のノード装置110,110,…には、1つの基地局ノード装置110Aと、複数の子ノード装置110B,110B,…とが含まれている。基地局ノード装置110Aが親機であり、子ノード装置110Bが子機である。基地局ノード装置110Aには、前記マスタユーザ機器120Aが接続されている。子ノード装置110Bには、前記スレーブユーザ機器120Bが接続されている。以下、各ノード装置を区別しないときには、単に、「ノード装置110」と称する。   The plurality of node devices 110, 110,... Are coupled wirelessly. That is, the plurality of node devices 110, 110,... Construct a wireless network. The plurality of node devices 110, 110,... Include one base station node device 110A and a plurality of child node devices 110B, 110B,. The base station node device 110A is a parent device, and the child node device 110B is a child device. The master user equipment 120A is connected to the base station node device 110A. The slave user device 120B is connected to the child node device 110B. Hereinafter, when each node device is not distinguished, it is simply referred to as “node device 110”.

複数のノード装置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 node devices 110 and 110 may be, for example, a short-range wireless network that conforms to IEEE 802.15.4 using the 920 MHz band. This IEEE 802.15.4 is one of wireless communication standards called PAN (Personal Area Network) or WPAN (Wireless Personal Area Network), and has low cost, low power consumption, high reliability and security. Also, the wireless link is not limited to the specific wireless network described above, and can be any suitable network that can exchange information typically in the form of packets.

また、ノード装置110は、自動中継機能を有し、通信環境を察知して自律的にネットワークを構成し得る。例示的なネットワークは、真メッシュであり、ホップ数も実質的に無制限である。換言すれば本発明の実施形態は、マルチホップの無線ネットワークを使用可能である。こうして、1つのノード装置110を1つの無線端末として、無線アドホックネットワークが構築される。   Further, the node device 110 has an automatic relay function, and can autonomously configure a network by sensing the communication environment. The exemplary network is a true mesh and the number of hops is virtually unlimited. In other words, embodiments of the present invention can use multi-hop wireless networks. Thus, a wireless ad hoc network is constructed using one node device 110 as one wireless terminal.

ノード装置110は、基板上に取り付けられた、半導体素子を含む回路要素群によって典型的には実現され得る。典型的には、ノード装置110は、ユーザ機器からのアナログ信号、及び無線ネットワークのための高周波信号を扱うアナログ回路と、MCUを主要素とするデジタル回路との組み合わせによって実現され得る。   The node device 110 can typically be realized by a circuit element group including a semiconductor element mounted on a substrate. Typically, the node device 110 can be realized by a combination of an analog circuit that handles an analog signal from a user device and a high-frequency signal for a wireless network, and a digital circuit having an MCU as a main element.

ノード装置110の制御は、典型的にはソフトウェアによって実現され得る。すなわち、ノード装置110の制御は、典型的にはコンピュータで読み取り可能な媒体に記憶されたソフトウェアによって実現され得る。コンピュータで読み取り可能な媒体には、ハードディスクドライブ、半導体メモリ等がある。代替として、ノード装置110の制御は、ソフトウェア及びハードウェアの組み合わせ、又はハードウェアのみによって実現され得る。   The control of the node device 110 can typically be realized by software. That is, the control of the node device 110 can be typically realized by software stored in a computer-readable medium. Examples of the computer readable medium include a hard disk drive and a semiconductor memory. Alternatively, the control of the node device 110 may be realized by a combination of software and hardware, or only by hardware.

計測器120Bは、各種の物理量(温度、湿度、電流、電圧、電力等)を計測・検出するものであって、任意の計測器であり得る。例えば、計測器120は、電力計である。計測器120Bは、その計測結果に応じたパルスを出力するように構成されている。例えば、計測器120Bが電力計であれば、10Whごとに1パルスを出力する。   The measuring instrument 120B measures and detects various physical quantities (temperature, humidity, current, voltage, power, etc.) and can be any measuring instrument. For example, the measuring instrument 120 is a wattmeter. The measuring instrument 120B is configured to output a pulse corresponding to the measurement result. For example, if the measuring instrument 120B is a wattmeter, one pulse is output every 10 Wh.

計測器120Bは、子ノード装置110Bに有線で結合される。子ノード装置110B、及び計測器120Bは、共通の通信規格(本実施形態では、RS485)のインタフェースを有している。   The measuring instrument 120B is coupled to the child node device 110B by wire. The child node device 110B and the measuring instrument 120B have a common communication standard (RS485 in this embodiment) interface.

PC120Aは、例えば、GUI(グラフィカルユーザインタフェース)を備えるソフトウェアを用いて、計測器120Bから受け取られたデータを視覚的に表示したり、統計的に処理したりできる。また、PC120Aは、例えば、ソフトウェアを用いて、計測器120Bに様々な制御信号を送信することができる。   The PC 120A can visually display or statistically process data received from the measuring instrument 120B using, for example, software including a GUI (graphical user interface). Further, the PC 120A can transmit various control signals to the measuring instrument 120B using, for example, software.

ノード装置110は、RFユニット410及びアンテナ430を備える。RFユニット410には、ユーザ機器120からのデータが入力される。RFユニット410は、ユーザ機器120が出力した計測データを無線信号に変換して、アンテナ430から他のノード装置110、例えば上流ノード(基地局ノード装置110A等)へ送信する。   The node device 110 includes an RF unit 410 and an antenna 430. Data from the user device 120 is input to the RF unit 410. The RF unit 410 converts measurement data output from the user equipment 120 into a radio signal, and transmits the radio signal to another node device 110, for example, an upstream node (such as the base station node device 110A).

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 RF unit 410 includes an interface 440, a DC (direct current) power supply 445, an MCU (micro controller unit) 450, a ROM (read only memory) 452, a RAM (random access memory) 454, a timer 456, a wireless transmission / reception unit 458, and an RF interface 460. Have The interface 440 converts the signal output by the user equipment 120 into an appropriate signal (for example, a 10-bit digital signal) that can be processed by the MCU 450. The interface 440 is an interface common to the communication standard of the user device 120, and is an RS485 interface in this embodiment. The DC power source 445 supplies a DC power source to each functional block of the RF unit 410. The DC power source 445 can be, for example, a lithium battery that supplies a direct current of 3V.

MCU450は、ノード装置110の機能を実現するのに用いられるマイクロプロセッサである。ROM452又はRAM454は、ノード装置110の機能を実現するのに必要なプログラム及びデータを記憶している。タイマ456は、例えば電源をオフにするタイミングを計測し、所定時間が経過したときに、DC電源445からの電源供給を断つようMCU450をトリガする。MCU450は、ROM452、RAM454、及びタイマ456などの周辺素子をその中に含んでもよい。   The MCU 450 is a microprocessor that is used to realize the functions of the node device 110. The ROM 452 or the RAM 454 stores programs and data necessary for realizing the functions of the node device 110. The timer 456 measures the timing of turning off the power, for example, and triggers the MCU 450 to cut off the power supply from the DC power supply 445 when a predetermined time has elapsed. MCU 450 may include peripheral elements such as ROM 452, RAM 454, and timer 456 therein.

無線送受信部458は、MCU450からのデータを他のノード装置110へ送る応答パケットに変換したり、他のノード装置110から受け取られた要求パケットをデータに変換したりする。RFインタフェース460は、無線送受信部458から出力されたパケットをRF信号に変換し、アンテナに出力したり、アンテナで受け取られたRF信号からパケットを再生し、無線送受信部458に出力したりする。   The wireless transmission / reception unit 458 converts data from the MCU 450 into a response packet to be sent to another node device 110, or converts a request packet received from the other node device 110 into data. The RF interface 460 converts the packet output from the wireless transmission / reception unit 458 into an RF signal and outputs the RF signal to the antenna, reproduces the packet from the RF signal received by the antenna, and outputs the packet to the wireless transmission / reception unit 458.

尚、機能ブロック群の一部又は全ては、適宜、結合されることによって一体化されて実現されてもよい。例えば、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 RF unit 410 may be realized as a hybrid IC (integrated circuit). Furthermore, the RF unit 410 and the antenna 430 may be integrated on a single substrate.

このように、パルス計数器100は、一例として、ネットワークシステム1000を構築するノード装置110に適用することができる。パルス計数器100は、ノード装置110に接続された計測器120Bから出力されるパルスを計数する。そして、パルス計数器100は、パルスの積算値を出力し、このパルスの積算値は、ノード装置110を介して、最終的にPC120Aに伝達される。例えば、PC120Aは、所定のアプリケーションにおいてバルスの積算値を利用する。このとき、PC120Aは、パルスの積算値を32bitのデータとして扱う。ここで、パルス計数器100のカウンタ1の上限計数値が28bitであったとしても、パルス計数器100は、28bitより大きな値までパルス数を積算して、上位機器のビット数に応じた積算値を出力する。換言すると、パルス計数器100は、28bitの計数値を32bitの積算値に変換する。   Thus, the pulse counter 100 can be applied to the node device 110 that constructs the network system 1000 as an example. The pulse counter 100 counts the pulses output from the measuring instrument 120B connected to the node device 110. Then, the pulse counter 100 outputs an integrated value of the pulse, and this integrated value of the pulse is finally transmitted to the PC 120A via the node device 110. For example, the PC 120A uses the integrated value of the pulse in a predetermined application. At this time, the PC 120A handles the integrated pulse value as 32-bit data. Here, even if the upper limit count value of the counter 1 of the pulse counter 100 is 28 bits, the pulse counter 100 accumulates the number of pulses up to a value larger than 28 bits, and the accumulated value according to the number of bits of the host device. Is output. In other words, the pulse counter 100 converts the 28-bit count value into a 32-bit integrated value.

《その他の実施形態》
以上のように、本出願において開示する技術の例示として、前記実施形態を説明した。しかしながら、本開示における技術は、これに限定されず、適宜、変更、置き換え、付加、省略などを行った実施の形態にも適用可能である。また、上記実施形態で説明した各構成要素を組み合わせて、新たな実施の形態とすることも可能である。また、添付図面および詳細な説明に記載された構成要素の中には、課題解決のために必須な構成要素だけでなく、上記技術を例示するために、課題解決のためには必須でない構成要素も含まれ得る。そのため、それらの必須ではない構成要素が添付図面や詳細な説明に記載されていることをもって、直ちに、それらの必須ではない構成要素が必須であるとの認定をするべきではない。
<< 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 power source 2 of the pulse counter 100 is configured to be able to select a battery or an external power source. However, the power source 2 may have a configuration in which only one of the battery and the external power source can be used. In that case, the above-described calculation method corresponding to the power source is employed.

また、パルス計数器100は、ノード装置110に適用されているが、これに限られるものではない。パルスの計数が必要な任意の機器にパルス計数器100を適用することができる。   Further, although the pulse counter 100 is applied to the node device 110, it is not limited to this. The pulse counter 100 can be applied to any device that needs to count pulses.

以上説明したように、ここに開示された技術は、パルス計数器について有用である。   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 Power supply 3 Memory 4 Calculation unit

Claims (6)

上限計数値が設定され、パルス数を前記上限計数値まで計数すると、再び、パルス数を0から計数するように構成された計数部と、
前記計数部の計数値を積算してパルスの積算値を演算する演算部とを備え、
前記演算部は、
前記計数値を積算して第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に記載のパルス計数器において、
前記演算部は、前記上限計数値に前記オーバーフロー回数を乗じた値に前記第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又は2に記載のパルス計数器において、
データを保存する記憶部をさらに備え、
前記演算部は、前記第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.
請求項3に記載のパルス計数器において、
外部電源で構成される電源をさらに備え、
前記計数部は、前記電源がオフになるとき及び前記パルス計数器が内部リセットされるときにリセットされるパルス計数器。
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.
請求項1又は2に記載のパルス計数器において、
電池で構成される電源と、
データを保存する記憶部とをさらに備え、
前記計数部は、前記パルス計数器が内部リセットされるときにもリセットされず、前記計数値を保持し、
前記演算部は、前記オーバーフロー回数を所定の保存タイミングで前記記憶部に保存しておき、前記パルス計数器が内部リセットされた後の演算時には演算を行うときの前記計数部の計数値と、前記記憶部に保存されている前記オーバーフロー回数とに基づいて前記第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.
請求項1又は2に記載のパルス計数器において、
電池と外部電源とを切り替え可能な電源と、
データを保存する記憶部とをさらに備え、
前記電源が電池の場合には、
前記計数部は、前記パルス計数器が内部リセットされるときにもリセットされず、前記計数値を保持し、
前記演算部は、前記オーバーフロー回数を所定の保存タイミングで前記記憶部に保存しておき、前記パルス計数器が内部リセットされた後の演算時には演算を行うときの前記計数部の計数値と、前記記憶部に保存されている前記オーバーフロー回数とに基づいて前記第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.
JP2015060936A 2015-03-24 2015-03-24 Pulse counter Pending JP2016181118A (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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