JP6486236B2 - Electromagnetic flowmeter converter and history recording method - Google Patents

Electromagnetic flowmeter converter and history recording method Download PDF

Info

Publication number
JP6486236B2
JP6486236B2 JP2015155895A JP2015155895A JP6486236B2 JP 6486236 B2 JP6486236 B2 JP 6486236B2 JP 2015155895 A JP2015155895 A JP 2015155895A JP 2015155895 A JP2015155895 A JP 2015155895A JP 6486236 B2 JP6486236 B2 JP 6486236B2
Authority
JP
Japan
Prior art keywords
time
date
count value
converter
rom
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.)
Active
Application number
JP2015155895A
Other languages
Japanese (ja)
Other versions
JP2017032524A (en
Inventor
喜彦 岡山
喜彦 岡山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Azbil Corp
Original Assignee
Azbil Corp
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 Azbil Corp filed Critical Azbil Corp
Priority to JP2015155895A priority Critical patent/JP6486236B2/en
Publication of JP2017032524A publication Critical patent/JP2017032524A/en
Application granted granted Critical
Publication of JP6486236B2 publication Critical patent/JP6486236B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、電磁流量計の変換器の履歴情報を記録する技術に係り、特に校正検査装置に内蔵されている時計を利用して履歴情報の日付時刻を補正することができる変換器および履歴記録方法に関するものである。   The present invention relates to a technique for recording history information of a transducer of an electromagnetic flow meter, and in particular, a converter capable of correcting the date and time of history information using a clock built in a calibration inspection apparatus, and history recording. It is about the method.

電磁流量計では、設定や調整値を変更したときや空検知や付着検知、流速オーバなどの診断異常を検出したときの日付時刻を把握したいという要求があるが、電池バックアップが必要な時計を電磁流量計の変換器に内蔵させることは使用環境やコストの面で難しいため今まで実装していなかった。   With electromagnetic flowmeters, there is a need to know the date and time when a setting or adjustment value is changed, or when a diagnostic error such as empty detection, adhesion detection, or overflow velocity is detected. It has not been implemented so far because it is difficult to incorporate it in the flowmeter converter in terms of operating environment and cost.

時計を内蔵しないで日付時刻の付いた履歴を記録する手段として、特許文献1に開示された履歴記録装置が知られている。この履歴記録装置は、時計を内蔵したホスト機器に電子機器が接続されたときに、電子機器の履歴メモリに記録された、電源投入時からのカウント値をホスト機器から求められる絶対時刻情報を用いて更新するようにしたものである。   As a means for recording a history with a date and time without incorporating a clock, a history recording apparatus disclosed in Patent Document 1 is known. This history recording apparatus uses absolute time information obtained from the host device for the count value from the time of power-on recorded in the history memory of the electronic device when the electronic device is connected to the host device incorporating the clock. Updated.

一方、電磁流量計では、電気部品の経年変化等により計測精度が悪化する恐れがあるため、電磁流量計が設置されている現場にて校正検査装置(以下、キャリブレータ)を使用して定期的に校正作業を行っている(特許文献2参照)。このキャリブレータには、時計が内蔵されている。   On the other hand, with an electromagnetic flow meter, the measurement accuracy may deteriorate due to aging of electrical components, etc., so periodically use a calibration inspection device (hereinafter referred to as a calibrator) at the site where the electromagnetic flow meter is installed. Calibration work is performed (see Patent Document 2). This calibrator has a built-in clock.

特許第4931213号公報Japanese Patent No. 493213 特開平7−146165号公報JP 7-146165 A

特許文献1に開示された履歴記録装置を電磁流量計の変換器に内蔵させて、キャリブレータをホスト機器として使用すれば、特許文献1に開示された技術により、電磁流量計の履歴情報に時刻情報を付加することが可能になる。   If the history recording device disclosed in Patent Document 1 is built in the converter of the electromagnetic flow meter and the calibrator is used as a host device, the time information is added to the history information of the electromagnetic flow meter by the technique disclosed in Patent Document 1. Can be added.

しかしながら、特許文献1に開示された履歴記録装置では、履歴情報を記録する履歴メモリとして複数の不揮発性リングバッファが必要であり、処理も複雑なため、電磁流量計の変換器に、特許文献1に開示された履歴記録装置を適用することが難しいという問題点があった。   However, since the history recording device disclosed in Patent Document 1 requires a plurality of non-volatile ring buffers as history memories for recording history information and the process is complicated, Patent Document 1 discloses a converter for an electromagnetic flow meter. There is a problem that it is difficult to apply the history recording apparatus disclosed in the above.

本発明は、上記課題を解決するためになされたもので、複数の不揮発性リングバッファを用いることなく、簡単な構成で履歴情報の日付時刻を補正することができる電磁流量計の変換器および履歴記録方法を提供することを目的とする。   The present invention has been made in order to solve the above-described problem. An electromagnetic flowmeter converter and a history capable of correcting the date and time of history information with a simple configuration without using a plurality of nonvolatile ring buffers. An object is to provide a recording method.

本発明の電磁流量計の変換器は、日付時刻をカウントする日付時刻カウンタと、カウント値の記録のための不揮発性メモリと、変換器の電源断発生時に前記日付時刻カウンタのカウント値をカウント値C1_ROMとして前記不揮発性メモリに記録する日付時刻カウント値記録手段と、変換器のイベント発生時に前記日付時刻カウンタのカウント値をタイムスタンプTm_ROMとして前記不揮発性メモリに記録するイベント記録手段と、変換器が校正検査装置と接続されたときに校正検査装置の時計から現在の日付時刻の情報を取得する日付時刻情報取得手段と、変換器が校正検査装置と接続されたときに、前記日付時刻情報取得手段が取得した現在の日付時刻に基づいて変換器の日付時刻が前記校正検査装置の時計と合うように補正したカウント値を前記日付時刻カウンタに対して設定する日付時刻補正手段と、変換器が校正検査装置と接続されたときに、変換器が校正検査装置と前回接続された日付時刻を示すカウント値C0_ROMを前記不揮発性メモリから取得して、このカウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのタイムスタンプTm_ROMを前記日付時刻情報取得手段が取得した現在の日付時刻に基づいて補正するイベント発生時刻補正手段とを備えることを特徴とするものである。   The converter of the electromagnetic flowmeter of the present invention includes a date / time counter that counts the date / time, a nonvolatile memory for recording the count value, and a count value of the date / time counter when the converter is powered off. A date and time count value recording means for recording in the nonvolatile memory as C1_ROM, an event recording means for recording the count value of the date and time counter in the nonvolatile memory as a time stamp Tm_ROM when an event of the converter occurs, and a converter, Date / time information acquisition means for acquiring current date / time information from the clock of the calibration inspection apparatus when connected to the calibration inspection apparatus, and the date / time information acquisition means when the converter is connected to the calibration inspection apparatus. Is corrected so that the date and time of the converter matches the clock of the calibration inspection device based on the current date and time acquired by When the date and time correction means for setting the count value for the date and time counter and the converter is connected to the calibration inspection apparatus, the count value C0_ROM indicating the date and time when the converter was previously connected to the calibration inspection apparatus is obtained. Based on the time stamp Tm_ROM, it is checked whether there is an event that has been acquired from the non-volatile memory and recorded in the count value C0_ROM and occurred after the previous connection with the calibration inspection device. And an event occurrence time correcting means for correcting the time stamp Tm_ROM of the event based on the current date and time acquired by the date and time information acquiring means when recorded.

また、本発明の電磁流量計の変換器の1構成例において、前記イベント発生時刻補正手段は、変換器が校正検査装置と接続されたときに、前記カウント値C1_ROMで記録されている電源断が、前記カウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生した場合、この電源断よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのタイムスタンプTm_ROMを前記日付時刻情報取得手段が取得した現在の日付時刻に基づいて補正することを特徴とするものである。   Further, in one configuration example of the converter of the electromagnetic flowmeter of the present invention, the event occurrence time correction means is configured such that when the converter is connected to the calibration inspection apparatus, the power interruption recorded in the count value C1_ROM is cut off. If the event occurs after the previous connection with the calibration inspection device recorded in the count value C0_ROM, it is checked based on the time stamp Tm_ROM whether there is an event occurring after this power-off. When an event is recorded, the time stamp Tm_ROM of this event is corrected based on the current date and time acquired by the date and time information acquisition means.

また、本発明の電磁流量計の変換器の1構成例は、さらに、イベントの発生時刻の正否を判定するイベント発生時刻正否記録手段を備え、前記日付時刻カウント値記録手段は、変換器の電源断発生時に、校正検査装置との接続後に最初に発生した電源断の日付時刻を示すカウント値C2_ROMを前記不揮発性メモリから取得して、前記カウント値C0_ROMで記録されている、校正検査装置との前回の接続の日付が、前記カウント値C2_ROMで記録されている日付よりも後の場合、前記日付時刻カウンタのカウント値を前記カウント値C2_ROMとして前記不揮発性メモリに記録し、前記イベント発生時刻正否記録手段は、変換器が校正検査装置と接続されたときに、前記カウント値C2_ROMで記録されている電源断よりも後に発生し、かつ前記カウント値C1_ROMで記録されている直前の電源断よりも前に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのOK/NGフラグTm_FlagをタイムスタンプTm_ROMが不正であることを示すNGに設定することを特徴とするものである。   In addition, one configuration example of the converter of the electromagnetic flowmeter of the present invention further includes event occurrence time correct / incorrect recording means for determining whether the event occurrence time is correct or not, and the date / time count value recording means is a power source of the converter. When the disconnection occurs, the count value C2_ROM indicating the date and time of the first power failure that occurs after connection with the calibration inspection apparatus is acquired from the nonvolatile memory, and recorded with the count value C0_ROM. When the date of the previous connection is later than the date recorded in the count value C2_ROM, the count value of the date / time counter is recorded in the nonvolatile memory as the count value C2_ROM, and the event occurrence time correct / incorrect record is recorded. When the converter is connected to the calibration inspection apparatus, the means is after the power interruption recorded in the count value C2_ROM. This event is checked if there is an event that has occurred and occurred before the previous power-off recorded in the count value C1_ROM, based on the time stamp Tm_ROM. The OK / NG flag Tm_Flag is set to NG indicating that the time stamp Tm_ROM is invalid.

また、本発明の電磁流量計の変換器の1構成例は、さらに、変換器の電源断の後で電源が投入されたときに、前記カウント値C1_ROMを前記日付時刻カウンタに対して設定する日付時刻カウント値再設定手段を備えることを特徴とするものである。
また、本発明の電磁流量計の変換器の1構成例において、前記日付時刻補正手段は、変換器が校正検査装置と接続されたときに、前記タイムスタンプの補正後に、前記日付時刻情報取得手段が取得した現在の日付時刻に対応するカウント値を前記カウント値C0_ROMとして前記不揮発性メモリに記録することを特徴とするものである。
また、本発明の電磁流量計の変換器の1構成例は、さらに、変換器の稼働時間をカウントする稼働時間カウンタと、変換器の電源断発生時に前記稼働時間カウンタのカウント値をカウント値S1_ROMとして前記不揮発性メモリに記録する稼働時間カウント値記録手段とを備えることを特徴とするものである。
また、本発明の電磁流量計の変換器の1構成例は、さらに、変換器の電源断の後で電源が投入されたときに、前記カウント値S1_ROMを前記稼働時間カウンタに対して設定する稼働時間カウント値再設定手段を備えることを特徴とするものである。
In addition, according to one configuration example of the converter of the electromagnetic flowmeter of the present invention, the date when the count value C1_ROM is set for the date / time counter when the power is turned on after the converter is turned off. A time count value resetting unit is provided.
Moreover, in one structural example of the converter of the electromagnetic flowmeter of this invention, the said date time correction means is the said date time information acquisition means after correction | amendment of the said time stamp, when a converter is connected with a calibration inspection apparatus. The count value corresponding to the current date and time acquired by is stored in the nonvolatile memory as the count value C0_ROM.
Further, one configuration example of the converter of the electromagnetic flowmeter of the present invention further includes an operation time counter for counting the operation time of the converter, and a count value S1_ROM for the count value of the operation time counter when a power failure of the converter occurs. Operating time count value recording means for recording in the non-volatile memory.
Further, according to one configuration example of the converter of the electromagnetic flowmeter of the present invention, the operation of setting the count value S1_ROM to the operation time counter when the power is turned on after the converter is turned off. A time count value resetting means is provided.

また、本発明の電磁流量計の変換器の履歴記録方法は、電磁流量計の変換器の電源断発生時に日付時刻カウンタのカウント値をカウント値C1_ROMとして不揮発性メモリに記録する日付時刻カウント値記録ステップと、変換器のイベント発生時に前記日付時刻カウンタのカウント値をタイムスタンプTm_ROMとして前記不揮発性メモリに記録するイベント記録ステップと、変換器が校正検査装置と接続されたときに校正検査装置の時計から現在の日付時刻の情報を取得する日付時刻情報取得ステップと、変換器が校正検査装置と接続されたときに、前記日付時刻情報取得ステップで取得した現在の日付時刻に基づいて変換器の日付時刻が前記校正検査装置の時計と合うように補正したカウント値を前記日付時刻カウンタに対して設定する日付時刻補正ステップと、変換器が校正検査装置と接続されたときに、変換器が校正検査装置と前回接続された日付時刻を示すカウント値C0_ROMを前記不揮発性メモリから取得して、このカウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのタイムスタンプTm_ROMを前記日付時刻情報取得ステップで取得した現在の日付時刻に基づいて補正するイベント発生時刻補正ステップとを含むことを特徴とするものである。   Further, according to the electromagnetic flow meter converter history recording method of the present invention, the date / time count value recording is performed in which the count value of the date / time counter is recorded in the nonvolatile memory as the count value C1_ROM when the electromagnetic flow meter converter is turned off. An event recording step of recording the count value of the date / time counter in the nonvolatile memory as a time stamp Tm_ROM when an event of the converter occurs, and a clock of the calibration inspection apparatus when the converter is connected to the calibration inspection apparatus A date / time information acquisition step for acquiring current date / time information from the date and time of the converter based on the current date / time acquired in the date / time information acquisition step when the converter is connected to the calibration inspection device. A count value corrected so that the time matches the clock of the calibration inspection apparatus is set for the date / time counter. When the converter is connected to the calibration inspection device, a count value C0_ROM indicating the date and time when the converter was last connected to the calibration inspection device is acquired from the nonvolatile memory, and this count is corrected. Based on the time stamp Tm_ROM, it is checked whether or not there is an event that has occurred after the previous connection with the calibration inspection device, which is recorded in the value C0_ROM. And an event occurrence time correction step of correcting the stamp Tm_ROM based on the current date time acquired in the date time information acquisition step.

本発明によれば、日付時刻カウンタと、不揮発性メモリと、日付時刻カウント値記録手段と、イベント記録手段と、日付時刻情報取得手段と、日付時刻補正手段とを設けることにより、変換器に電池バックアップされた内蔵時計がなくても、不揮発性リングバッファを使用しない簡単な構成でイベントの日付時刻を把握することができる。本発明では、変換器が校正検査装置と接続されたときに、変換器が校正検査装置と前回接続された日付時刻を示すカウント値C0_ROMを不揮発性メモリから取得して、カウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントのタイムスタンプTm_ROMを日付時刻情報取得手段が取得した現在の日付時刻に基づいて補正することにより、校正検査装置との前回の接続後、電源断が2回以上発生していないか、あるいは電源断が2回以上発生していても、1回目の電源断から校正検査装置との接続直前の電源断までの間にイベント発生がなければ、履歴情報である、イベントのタイムスタンプTm_ROMを適切に補正することができ、イベントの正しい発生時刻を把握することができる。   According to the present invention, the battery is provided in the converter by providing the date / time counter, the nonvolatile memory, the date / time count value recording means, the event recording means, the date / time information obtaining means, and the date / time correction means. Even without a backed-up internal clock, the date and time of the event can be grasped with a simple configuration that does not use a non-volatile ring buffer. In the present invention, when the converter is connected to the calibration inspection apparatus, the count value C0_ROM indicating the date and time when the converter was previously connected to the calibration inspection apparatus is acquired from the nonvolatile memory, and recorded in the count value C0_ROM. Whether the event occurred after the previous connection with the calibration inspection apparatus is checked based on the time stamp Tm_ROM, and the current date and time acquired by the date / time information acquisition means of the time stamp Tm_ROM of the corresponding event. By correcting based on the above, even if the power supply has not been cut off more than twice after the previous connection with the calibration inspection device, or the power supply cutout has occurred more than once, the calibration is performed from the first power-off. If no event occurs until the power is turned off immediately before connection to the inspection device, the event time stamp Tm_ROM, which is history information, is displayed. Sincerely can be corrected, it is possible to grasp the correct time of occurrence of the event.

また、本発明では、変換器が校正検査装置と接続されたときに、カウント値C1_ROMで記録されている電源断が、カウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生した場合、この電源断よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントのタイムスタンプTm_ROMを日付時刻情報取得手段が取得した現在の日付時刻に基づいて補正することにより、イベントの正しい発生時刻を把握することができる。   In the present invention, when the converter is connected to the calibration inspection apparatus, the power interruption recorded in the count value C1_ROM is more than the previous connection to the calibration inspection apparatus recorded in the count value C0_ROM. If it occurs later, whether or not there is an event that occurred after the power-off is checked based on the time stamp Tm_ROM, and the time stamp Tm_ROM of the corresponding event is determined based on the current date and time acquired by the date / time information acquisition means. By correct | amending, the correct generation | occurrence | production time of an event can be grasped | ascertained.

また、本発明では、イベント発生時刻正否記録手段を設けることにより、正しい日付時刻を表しているタイムスタンプTm_ROMと、複数回の電源断により日付時刻が正しく記録できていないタイムスタンプTm_ROMとを区別することができる。   In the present invention, the event occurrence time correct / incorrect recording means is provided to distinguish between the time stamp Tm_ROM indicating the correct date and time and the time stamp Tm_ROM in which the date and time cannot be correctly recorded due to multiple power interruptions. be able to.

また、本発明では、日付時刻カウント値再設定手段を設けることにより、変換器の電源断の後で電源が投入されたときに、日付時刻カウンタのカウント値を電源断発生時のカウント値に復帰させることができる。   Further, in the present invention, by providing a date / time count value resetting means, when the power is turned on after the converter power is turned off, the count value of the date / time counter is restored to the count value at the time when the power is cut off. Can be made.

また、本発明では、変換器が校正検査装置と接続されたときに、日付時刻補正手段が、日付時刻情報取得手段が取得した現在の日付時刻に対応するカウント値をカウント値C0_ROMとして不揮発性メモリに記録することにより、今回の校正検査装置との接続に対応してカウント値C0_ROMを更新することができる。   Further, in the present invention, when the converter is connected to the calibration inspection apparatus, the date / time correction means uses the count value corresponding to the current date / time acquired by the date / time information acquisition means as the count value C0_ROM as the nonvolatile memory. In this case, the count value C0_ROM can be updated corresponding to the connection with the current calibration inspection apparatus.

また、本発明では、日付時刻カウンタとは別に稼働時間カウンタを用意することで、変換器の電源が入っていた積算時間を把握することができる。   Further, in the present invention, by preparing an operating time counter separately from the date / time counter, it is possible to grasp the accumulated time during which the converter is turned on.

また、本発明では、稼働時間カウント値再設定手段を設けることにより、変換器の電源断の後で電源が投入されたときに、稼働時間カウンタのカウント値を電源断発生時のカウント値に復帰させることができる。   Further, in the present invention, by providing an operation time count value resetting means, when the power is turned on after the converter power is turned off, the count value of the operation time counter is restored to the count value at the time when the power is cut off. Can be made.

本発明の実施の形態に係る電磁流量計の変換器の構成を示すブロック図である。It is a block diagram which shows the structure of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の制御回路の機能ブロック図である。It is a functional block diagram of the control circuit of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 電磁流量計の校正方法を説明する図である。It is a figure explaining the calibration method of an electromagnetic flowmeter. 本発明の実施の形態に係る電磁流量計の変換器の初期調整時の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement at the time of the initial adjustment of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の電源断発生時の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement at the time of the power failure generation | occurrence | production of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の電源投入時の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement at the time of power activation of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器のイベント発生時の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement at the time of the event generation | occurrence | production of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. イベントの例を説明する図である。It is a figure explaining the example of an event. 本発明の実施の形態に係る電磁流量計の変換器の校正検査装置との接続時の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement at the time of the connection with the calibration inspection apparatus of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の履歴記録動作の例を説明する図である。It is a figure explaining the example of the log | history recording operation | movement of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の履歴記録動作の例を説明する図である。It is a figure explaining the example of the log | history recording operation | movement of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の履歴記録動作の例を説明する図である。It is a figure explaining the example of the log | history recording operation | movement of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態に係る電磁流量計の変換器の履歴記録動作の例を説明する図である。It is a figure explaining the example of the log | history recording operation | movement of the converter of the electromagnetic flowmeter which concerns on embodiment of this invention. 本発明の実施の形態において電磁流量計の変換器の電源断が発生した場合のOK/NGフラグの状態を示す図である。It is a figure which shows the state of the OK / NG flag when the power failure of the converter of an electromagnetic flowmeter generate | occur | produced in embodiment of this invention.

以下、本発明の実施の形態について図面を参照して説明する。図1は本発明の実施の形態に係る電磁流量計の変換器の構成を示すブロック図である。本実施の形態の変換器2は、励磁電流を出力する励磁回路20と、入力された流量信号を増幅する入力信号増幅回路21と、増幅された流量信号を流量値や流速値に変換するCPU(Central Processing Unit)からなる制御回路22と、変換器2の設定や電磁流量計のユーザへの情報表示のための設定・表示器23と、電源回路24と、HART(Highway Addressable Remote Transducer)通信などで校正検査装置(以下、キャリブレータ)3と通信を行なうための通信インタフェース(以下、通信I/F)25とから構成される。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a converter of an electromagnetic flow meter according to an embodiment of the present invention. The converter 2 of this embodiment includes an excitation circuit 20 that outputs an excitation current, an input signal amplification circuit 21 that amplifies the input flow rate signal, and a CPU that converts the amplified flow rate signal into a flow rate value and a flow velocity value. (Central Processing Unit), a control circuit 22, a setting / display unit 23 for setting the converter 2 and displaying information to the user of the electromagnetic flow meter, a power circuit 24, and a HART (Highway Addressable Remote Transducer) communication And a communication interface (hereinafter referred to as communication I / F) 25 for communicating with the calibration inspection apparatus (hereinafter referred to as calibrator) 3.

制御回路22は、図2に示すように、入力信号増幅回路21によって増幅された流量信号を取り込むA/D(Analog-to-Digital)変換器220と、制御回路22で算出した流量値に対応する4〜20mAの電流信号を出力するD/A(Digital to Analog)変換器221と、流量信号から流量値や流速値を算出する算出手段222と、不揮発性メモリであるEEPROM(Electrically Erasable Programmable Read-Only Memory)223と、日付時刻をカウントする32ビットの1秒カウンタである日付時刻カウンタ224と、変換器2の稼働時間をカウントする32ビットの1秒カウンタである稼働時間カウンタ225と、変換器2の電源断発生時に日付時刻カウンタ224のカウント値を電源断発生時日付時刻カウント値C1_ROMとしてEEPROM223に記録する日付時刻カウント値記録手段226と、変換器2の電源断発生時に稼働時間カウンタ225のカウント値を電源断発生時稼働時間カウント値S1_ROMとしてEEPROM223に記録する稼働時間カウント値記録手段227と、変換器2の電源断の後で電源が再投入されたときに、電源断発生時日付時刻カウント値C1_ROMを日付時刻カウンタ224に対して設定する日付時刻カウント値再設定手段228と、変換器2の電源断の後で電源が再投入されたときに、電源断発生時稼働時間カウント値S1_ROMを稼働時間カウンタ225に対して設定する稼働時間カウント値再設定手段229と、変換器2のイベント発生時に日付時刻カウンタ224のカウント値をタイムスタンプTm_ROMとしてEEPROM223に記録するイベント記録手段230と、変換器2がキャリブレータ3と接続されたときにキャリブレータ3の時計から現在の日付時刻の情報を取得する日付時刻情報取得手段231と、変換器2がキャリブレータ3と接続されたときに、日付時刻情報取得手段231が取得した現在の日付時刻に基づいて変換器2の日付時刻がキャリブレータ3の時計と合うように補正したカウント値を日付時刻カウンタ224に対して設定する日付時刻補正手段232と、変換器2がキャリブレータ3と接続されたときにタイムスタンプTm_ROMを補正するイベント発生時刻補正手段233と、イベントの発生時刻の正否を判定してOK/NGフラグTm_Flagを設定するイベント発生時刻正否記録手段234とから構成される。   As shown in FIG. 2, the control circuit 22 corresponds to an A / D (Analog-to-Digital) converter 220 that takes in the flow rate signal amplified by the input signal amplification circuit 21 and the flow rate value calculated by the control circuit 22. A D / A (Digital to Analog) converter 221 that outputs a current signal of 4 to 20 mA, a calculation means 222 that calculates a flow rate value and a flow velocity value from the flow rate signal, and an EEPROM (Electrically Erasable Programmable Read) that is a nonvolatile memory -Only Memory) 223, a date / time counter 224 that is a 32-bit 1-second counter that counts the date / time, an operation time counter 225 that is a 32-bit 1-second counter that counts the operation time of the converter 2, and a conversion The count value of the date / time counter 224 is recorded in the EEPROM 223 as the date / time count value C1_ROM at the occurrence of the power interruption when the power failure of the device 2 occurs. A date / time count value recording means 226 to perform, an operation time count value recording means 227 for recording the count value of the operation time counter 225 when the power failure of the converter 2 occurs in the EEPROM 223 as the operation time count value S1_ROM at the time of power failure occurrence, and conversion The date and time count value resetting means 228 for setting the date and time count value C1_ROM for the date and time counter 224 when the power is turned on after the power is turned off. An operation time count value resetting means 229 for setting the operation time count value S1_ROM at the time of power supply interruption to the operation time counter 225 when the power is turned on again after the power is turned off, and when an event of the converter 2 occurs The count value of the date / time counter 224 is recorded in the EEPROM 223 as the time stamp Tm_ROM. Event recording means 230, date / time information acquisition means 231 for acquiring current date / time information from the clock of the calibrator 3 when the converter 2 is connected to the calibrator 3, and the converter 2 is connected to the calibrator 3. The date and time counter 224 sets a count value corrected so that the date and time of the converter 2 matches the clock of the calibrator 3 based on the current date and time acquired by the date and time information acquisition unit 231. The time correction unit 232, the event occurrence time correction unit 233 that corrects the time stamp Tm_ROM when the converter 2 is connected to the calibrator 3, and the correctness of the event occurrence time are determined to set the OK / NG flag Tm_Flag. And event occurrence time correct / incorrect recording means 234.

EEPROM223には、変換器2がキャリブレータ3と前回接続された調整時の日付時刻を示す調整時日付時刻カウント値C0_ROMと、変換器2の電源断発生時の日付時刻を示す電源断発生時日付時刻カウント値C1_ROMと、キャリブレータ3との接続後に最初に発生した電源断の日付時刻を示す調整後初電源断発生時日付時刻カウント値C2_ROMと、イベント内容Imと、イベント発生時の日付時刻を示すタイムスタンプTm_ROMと、タイムスタンプTm_ROMの正否を示すOK/NGフラグTm_Flagと、電源断発生時の稼働時間を示す電源断発生時稼働時間カウント値S1_ROMとが記録される。   The EEPROM 223 includes an adjustment date / time count value C0_ROM indicating the date / time when the converter 2 was previously connected to the calibrator 3 and a power-off occurrence date / time indicating the date / time when the converter 2 was turned off. The count time C1_ROM, the date / time count value C2_ROM after the first power-off occurrence after adjustment indicating the power-off date / time that occurred first after connection of the calibrator 3, the event content Im, and the time indicating the date / time when the event occurred A stamp Tm_ROM, an OK / NG flag Tm_Flag indicating whether the time stamp Tm_ROM is correct, and an operation time count value S1_ROM at the time of power failure occurrence indicating the operation time at the time of power failure occurrence are recorded.

電源断発生時日付時刻カウント値C1_ROMは、変換器2の電源の再投入時に日付時刻カウンタ224のカウント値C1を継続カウントできるようにするための値である。調整後初電源断発生時日付時刻カウント値C2_ROMは、タイムスタンプTm_ROMの正否を区別するための値である。電源断発生時稼働時間カウント値S1_ROMは、変換器2の電源の再投入時に稼働時間カウンタ225のカウント値S1を継続カウントできるようにするための値である。   The date / time count value C1_ROM at the time of power-off occurrence is a value for enabling the count value C1 of the date / time counter 224 to be continuously counted when the converter 2 is powered on again. The date / time count value C2_ROM at the time of initial power-off occurrence after adjustment is a value for discriminating whether the time stamp Tm_ROM is correct or not. The operation time count value S1_ROM at the time of occurrence of power interruption is a value for enabling the count value S1 of the operation time counter 225 to be continuously counted when the converter 2 is powered on again.

A/D変換器220とD/A変換器221としては、コンピュータのCPUに内蔵されているものを用いる。このコンピュータのCPUは、EEPROM223に格納されたプログラムに従って以下のような処理を実行し、算出手段222と日付時刻カウンタ224と稼働時間カウンタ225と日付時刻カウント値記録手段226と稼働時間カウント値記録手段227と日付時刻カウント値再設定手段228と稼働時間カウント値再設定手段229とイベント記録手段230と日付時刻情報取得手段231と日付時刻補正手段232とイベント発生時刻補正手段233とイベント発生時刻正否記録手段234として機能する。   As the A / D converter 220 and the D / A converter 221, those incorporated in the CPU of the computer are used. The CPU of this computer executes the following processing according to the program stored in the EEPROM 223, and calculates the calculation means 222, the date / time counter 224, the operating time counter 225, the date / time count value recording means 226, and the operating time count value recording means. 227, date / time count value resetting means 228, operating time count value resetting means 229, event recording means 230, date / time information acquisition means 231, date / time correction means 232, event occurrence time correction means 233, and event occurrence time correct / incorrect recording. It functions as the means 234.

一方、キャリブレータ3は、変換器2から入力される励磁電流を受ける入力回路30と、励磁電流に同期した基準流量信号を生成するCPUからなる制御回路31と、制御回路31から出力された基準流量信号を差動信号に変換して変換器2に出力する出力回路32と、キャリブレータ3の設定や校正作業者への情報表示のための設定・表示器33と、電源回路34と、変換器2との通信のための通信I/F35とから構成される。   On the other hand, the calibrator 3 includes an input circuit 30 that receives the excitation current input from the converter 2, a control circuit 31 that includes a CPU that generates a reference flow rate signal synchronized with the excitation current, and a reference flow rate output from the control circuit 31. An output circuit 32 that converts a signal into a differential signal and outputs it to the converter 2, a setting / display 33 for setting the calibrator 3 and displaying information to a calibration operator, a power supply circuit 34, and the converter 2 And a communication I / F 35 for communication with the PC.

通常の計測時には、図3に示すように電磁流量計の検出器1と変換器2とを接続する。検出器1は、磁界を発生する励磁コイルと、励磁コイルから発生する磁界中に配置され、測定対象の流体がこの磁界中を流れることにより発生する起電力を検出してその流速に比例した流量信号を出力する測定管とから構成される。変換器2は、検出器1の励磁コイルに励磁電流を供給し、検出器1から入力される流量信号を流体の流量や流速を示すアナログ信号またはデジタル信号に変換する。   During normal measurement, the detector 1 and the converter 2 of the electromagnetic flow meter are connected as shown in FIG. The detector 1 is arranged in an excitation coil that generates a magnetic field and a magnetic field generated from the excitation coil, detects an electromotive force generated when a fluid to be measured flows in the magnetic field, and a flow rate proportional to the flow velocity. And a measuring tube that outputs a signal. The converter 2 supplies an excitation current to the excitation coil of the detector 1 and converts the flow rate signal input from the detector 1 into an analog signal or a digital signal indicating the flow rate or flow velocity of the fluid.

一方、変換器2と検出器1の校正や検査を行なう場合には、変換器2にキャリブレータ3を接続する。
以下、本実施の形態の変換器2の動作を図4〜図9を参照して説明する。図4は変換器2の初期調整時の動作を説明するフローチャートである。
On the other hand, when calibrating or inspecting the converter 2 and the detector 1, a calibrator 3 is connected to the converter 2.
Hereinafter, the operation of the converter 2 of the present embodiment will be described with reference to FIGS. FIG. 4 is a flowchart for explaining the operation of the converter 2 during initial adjustment.

まず、電磁流量計の検出器1と変換器2とが現場に設置されて、変換器2の電源が投入され初期調整されるとき、初期調整を行なうサービスマンは、変換器2にキャリブレータ3を接続する。そして、サービスマンは、キャリブレータ3の設定・表示器33を操作して、変換器2の日付時刻カウンタ224のカウント値C1と、EEPROM223に記録される調整時日付時刻カウント値C0_ROMと、電源断発生時日付時刻カウント値C1_ROMと調整後初電源断発生時日付時刻カウント値C2_ROMとを、この初期調整時の日付時刻を示す初期カウント値に設定し(図4ステップS1)、さらに稼働時間カウンタ225のカウント値S1を0に設定する(図4ステップS2)。   First, when the detector 1 and the converter 2 of the electromagnetic flow meter are installed on the site, and the power of the converter 2 is turned on and the initial adjustment is performed, the serviceman who performs the initial adjustment attaches the calibrator 3 to the converter 2. Connecting. Then, the service person operates the setting / display device 33 of the calibrator 3 to generate the count value C1 of the date / time counter 224 of the converter 2, the adjustment date / time count value C0_ROM recorded in the EEPROM 223, and the occurrence of power-off. The time / date / time count value C1_ROM and the adjusted initial power-off occurrence date / time count value C2_ROM are set as initial count values indicating the date / time at the time of the initial adjustment (step S1 in FIG. 4). The count value S1 is set to 0 (step S2 in FIG. 4).

日付時刻を示すカウント値は、2000年1月1日0時0分0秒を起点(カウント値0)として1秒毎にカウントした32ビットのカウント値である。
日付時刻カウンタ224と稼働時間カウンタ225とは、それぞれ自身に設定された初期カウント値からカウントアップ動作(1秒毎にカウント値が1増加)を行なう。
The count value indicating the date and time is a 32-bit count value that is counted every second from the starting point (count value 0) on January 1, 2000 at 0:00:00.
The date / time counter 224 and the operating time counter 225 each perform a count-up operation (the count value is incremented by 1 every second) from the initial count value set in itself.

図5は変換器2の電源断発生時の動作を説明するフローチャートである。変換器2の電源が切れる電源断が発生すると、変換器2の日付時刻カウント値記録手段226は、日付時刻カウンタ224のカウント値C1を電源断発生時日付時刻カウント値C1_ROMとして記録する(図5ステップS4)。稼働時間カウント値記録手段227は、稼働時間カウンタ225のカウント値S1を電源断発生時稼働時間カウント値S1_ROMとして記録する(図5ステップS5)。こうして、C1_ROM,S1_ROMの値が更新される。   FIG. 5 is a flowchart for explaining the operation of the converter 2 when a power interruption occurs. When a power failure occurs in which the power of the converter 2 is turned off, the date / time count value recording means 226 of the converter 2 records the count value C1 of the date / time counter 224 as the date / time count value C1_ROM at the time of power failure (FIG. 5). Step S4). The operating time count value recording means 227 records the count value S1 of the operating time counter 225 as the operating time count value S1_ROM at the time of power failure occurrence (step S5 in FIG. 5). Thus, the values of C1_ROM and S1_ROM are updated.

さらに、日付時刻カウント値記録手段226は、電源断が発生し、かつC2_ROM<C0_ROM、すなわち調整時日付時刻カウント値C0_ROMが調整後初電源断発生時日付時刻カウント値C2_ROMより大きい場合(図5ステップS6においてYES)、日付時刻カウンタ224のカウント値C1を調整後初電源断発生時日付時刻カウント値C2_ROMとして記録する(図5ステップS7)。こうして、キャリブレータ3との接続後最初の電源断発生時の日付時刻カウンタ224のカウント値C1がC2_ROMとして記録される。   Further, the date / time count value recording means 226 detects that the power is cut off and C2_ROM <C0_ROM, that is, the adjusted date / time count value C0_ROM is larger than the adjusted initial power / off time date / time count value C2_ROM (step in FIG. 5). In S6, YES), the count value C1 of the date / time counter 224 is recorded as the date / time count value C2_ROM at the time of initial power-off occurrence after adjustment (step S7 in FIG. 5). In this way, the count value C1 of the date / time counter 224 at the time of the first power failure after connection with the calibrator 3 is recorded as C2_ROM.

なお、変換器2の電源が切れると、制御回路22が動作不能になり、日付時刻カウンタ224と稼働時間カウンタ225のカウント値C1,S1も消失する。ただし、変換器2の電源スイッチがOFFになっても、変換器2の電源回路24から制御回路22に供給される電源電圧が制御回路22の動作不可能な電圧に低下するまで間があるので、日付時刻カウンタ224と稼働時間カウンタ225のカウント値C1,S1をEEPROM223に記録することは可能である。   When the power of the converter 2 is turned off, the control circuit 22 becomes inoperable, and the count values C1 and S1 of the date / time counter 224 and the operation time counter 225 are also lost. However, even if the power switch of the converter 2 is turned off, there is a period until the power supply voltage supplied from the power circuit 24 of the converter 2 to the control circuit 22 drops to a voltage at which the control circuit 22 cannot operate. The count values C 1 and S 1 of the date / time counter 224 and the operating time counter 225 can be recorded in the EEPROM 223.

図6は変換器2の電源投入時の動作を説明するフローチャートである。変換器2の電源が再投入されると、変換器2の日付時刻カウント値再設定手段228は、EEPROM223に記録されている電源断発生時日付時刻カウント値C1_ROMを日付時刻カウンタ224のカウント値C1として設定する(図6ステップS9)。稼働時間カウント値再設定手段229は、電源断発生時稼働時間カウント値S1_ROMを稼働時間カウンタ225のカウント値S1として設定する(図6ステップS10)。   FIG. 6 is a flowchart for explaining the operation of the converter 2 when the power is turned on. When the power of the converter 2 is turned on again, the date / time count value resetting means 228 of the converter 2 uses the date / time count value C1_ROM at the time of power-off occurrence recorded in the EEPROM 223 as the count value C1 of the date / time counter 224. (Step S9 in FIG. 6). The operating time count value resetting means 229 sets the operating time count value S1_ROM at the time of power failure occurrence as the count value S1 of the operating time counter 225 (step S10 in FIG. 6).

こうして、電源断により消失した日付時刻カウンタ224と稼働時間カウンタ225のカウント値C1,S1が電源断発生時のカウント値に復帰するので、日付時刻カウンタ224と稼働時間カウンタ225とは、ステップS9,S10で設定されたカウント値からカウントアップ動作を再開する。   Thus, since the count values C1 and S1 of the date / time counter 224 and the operating time counter 225 that have disappeared due to the power-off are restored to the count values at the time of the power-off occurrence, the date / time counter 224 and the operating time counter 225 The count-up operation is restarted from the count value set in S10.

図7は変換器2のイベント発生時の動作を説明するフローチャートである。変換器2のイベントが発生すると、変換器2のイベント記録手段230は、EEPROM223のタイムスタンプ領域に、イベント内容Im(mはイベントの番号)を記録し(図7ステップS12)、日付時刻カウンタ224のカウント値C1をタイムスタンプTm_ROMとして記録し(図7ステップS13)、OK/NGフラグTm_Flagを“OK”を示す値(例えば0)にする(図7ステップS14)。こうして、イベントの履歴情報をEEPROM223に記録することができる。   FIG. 7 is a flowchart for explaining the operation of the converter 2 when an event occurs. When the event of the converter 2 occurs, the event recording means 230 of the converter 2 records the event content Im (m is the event number) in the time stamp area of the EEPROM 223 (step S12 in FIG. 7), and the date / time counter 224. Is recorded as a time stamp Tm_ROM (step S13 in FIG. 7), and an OK / NG flag Tm_Flag is set to a value (eg, 0) indicating “OK” (step S14 in FIG. 7). Thus, event history information can be recorded in the EEPROM 223.

図8はイベントの例を説明する図である。電磁流量計の変換器2で起きるイベントとしては、異常検出と操作イベント(エラーなし)とがある。図8の例では、スパンオーバ、流速オーバ、コイル断線、空検知、付着検知といった異常が発生している。また、操作イベントとしては、変換器設定の変更、流速スパンの変更、検出器設定の変更、口径設定の変更といったイベントが発生している。これらイベントの種別を示すコードがイベント内容Imとして記録される。Im,Tm_ROM,Tm_Flagはイベント毎に記録される。   FIG. 8 is a diagram for explaining an example of an event. Events that occur in the electromagnetic flow meter converter 2 include abnormality detection and an operation event (no error). In the example of FIG. 8, abnormalities such as span over, flow over, coil disconnection, empty detection, and adhesion detection have occurred. In addition, as operation events, events such as a change in transducer settings, a change in flow velocity span, a change in detector settings, and a change in aperture setting have occurred. A code indicating the event type is recorded as the event content Im. Im, Tm_ROM, and Tm_Flag are recorded for each event.

次に、変換器2と検出器1の校正や検査を行なう場合には、変換器2にキャリブレータ3を接続する。図9は変換器2のキャリブレータ3との接続時の動作を説明するフローチャートである。
キャリブレータ3の制御回路31は、変換器2の制御回路22に設定されている設定調整パラメータや履歴などと共に、日付時刻カウンタ224のカウント値C1、調整時日付時刻カウント値C0_ROM、電源断発生時日付時刻カウント値C1_ROM、調整後初電源断発生時日付時刻カウント値C2_ROMおよびタイムスタンプTm_ROMの値を通信I/F35を介して読み出す。
Next, when the converter 2 and the detector 1 are calibrated or inspected, the calibrator 3 is connected to the converter 2. FIG. 9 is a flowchart for explaining the operation when the converter 2 is connected to the calibrator 3.
The control circuit 31 of the calibrator 3 together with the setting adjustment parameters and history set in the control circuit 22 of the converter 2, the count value C1 of the date / time counter 224, the adjustment date / time count value C0_ROM, the date when the power interruption occurs The values of the time count value C1_ROM, the date / time count value C2_ROM at the time of initial power-off occurrence after adjustment, and the time stamp Tm_ROM are read out via the communication I / F 35.

一方、キャリブレータ3の制御回路31は、時計を備えている。変換器2の日付時刻情報取得手段231は、変換器2とキャリブレータ3とが接続されると、通信I/F25を介してキャリブレータ3の時計から現在の日付時刻情報を取得する(図9ステップS16)。   On the other hand, the control circuit 31 of the calibrator 3 includes a timepiece. When the converter 2 and the calibrator 3 are connected, the date / time information acquisition unit 231 of the converter 2 acquires the current date / time information from the clock of the calibrator 3 via the communication I / F 25 (step S16 in FIG. 9). ).

続いて、変換器2の日付時刻補正手段232は、日付時刻情報取得手段231が取得した現在の日付時刻を現在日付時刻カウント値C0に変換する(図9ステップS17)。現在日付時刻カウント値C0は、2000年1月1日0時0分0秒を起点(カウント値0)として現在の日付時刻までの時間を1秒毎にカウントした32ビットのカウント値である。   Subsequently, the date / time correction unit 232 of the converter 2 converts the current date / time acquired by the date / time information acquisition unit 231 into a current date / time count value C0 (step S17 in FIG. 9). The current date / time count value C0 is a 32-bit count value obtained by counting the time until the current date / time every second from the starting point (count value 0) on January 1, 2000.

日付時刻補正手段232は、式(1)に示すように現在日付時刻カウント値C0と日付時刻カウンタ224のカウント値C1とのカウント差E1を計算する(図9ステップS18)。
E1=C0−C1 ・・・(1)
カウント差E1は、変換器2が電源断していた時間秒数に相当するカウント値である。
The date / time correction means 232 calculates a count difference E1 between the current date / time count value C0 and the count value C1 of the date / time counter 224 as shown in the equation (1) (step S18 in FIG. 9).
E1 = C0-C1 (1)
The count difference E1 is a count value corresponding to the number of time seconds when the converter 2 is powered off.

そして、日付時刻補正手段232は、式(2)のように日付時刻カウンタ224のカウント値C1にカウント差E1を加えたカウント値を計算し、計算したカウント値を日付時刻カウンタ224のカウント値C1の新たな値として設定する(図9ステップS19)。
C1=C1+E1 ・・・(2)
こうして、日付時刻カウンタ224のカウント値C1をカウント差E1で補正することができ、変換器2の日付時刻をキャリブレータ3の時計と合わせることができる。
Then, the date / time correction means 232 calculates a count value obtained by adding the count difference E1 to the count value C1 of the date / time counter 224 as shown in Expression (2), and uses the calculated count value as the count value C1 of the date / time counter 224. Is set as a new value (step S19 in FIG. 9).
C1 = C1 + E1 (2)
Thus, the count value C1 of the date / time counter 224 can be corrected by the count difference E1, and the date / time of the converter 2 can be synchronized with the clock of the calibrator 3.

次に、変換器2のイベント発生時刻補正手段233は、C1_ROM>C0_ROM、すなわち電源断発生時日付時刻カウント値C1_ROMで記録されている電源断が、調整時日付時刻カウント値C0_ROMで記録されている、キャリブレータ3との前回の接続よりも後に発生した場合(図9ステップS20においてYES)、この電源断よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ(図9ステップS21)、Tm_ROM>C1_ROM、すなわち電源断よりも後に発生したイベントが記録されている場合には、このイベントのタイムスタンプTm_ROMをカウント差E1で補正する(図9ステップS22)。
Tm_ROM=Tm_ROM+E1 ・・・(3)
Next, the event occurrence time correction unit 233 of the converter 2 records C1_ROM> C0_ROM, that is, the power interruption recorded as the power interruption occurrence date / time count value C1_ROM as the adjustment date / time count value C0_ROM. If it occurs after the previous connection with the calibrator 3 (YES in step S20 in FIG. 9), it is checked based on the time stamp Tm_ROM whether there is an event that has occurred after this power-off (step S21 in FIG. 9). , Tm_ROM> C1_ROM, that is, if an event that occurs after the power is turned off is recorded, the time stamp Tm_ROM of this event is corrected by the count difference E1 (step S22 in FIG. 9).
Tm_ROM = Tm_ROM + E1 (3)

具体的には、イベント発生時刻補正手段233は、式(3)のように補正対象のタイムスタンプTm_ROMにカウント差E1を加えたカウント値を計算し、計算したカウント値を補正対象のタイムスタンプTm_ROMの新たな値としてEEPROM223に設定する。   Specifically, the event occurrence time correction unit 233 calculates a count value obtained by adding the count difference E1 to the correction target time stamp Tm_ROM as in Expression (3), and uses the calculated count value as the correction target time stamp Tm_ROM. Is set in the EEPROM 223 as a new value.

変換器2のイベント発生時刻正否記録手段234は、C1_ROM>Tm_ROM>C2_ROM、すなわちキャリブレータ3との前回の接続後最初に発生した電源断よりも後に発生し、かつ電源断発生時日付時刻カウント値C1_ROMで記録されている直前の電源断よりも前に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ(図9ステップS23)、C1_ROM>Tm_ROM>C2_ROMに該当するイベントが記録されている場合には、このイベントのOK/NGフラグTm_Flagを“NG”を示す値(例えば1)にする(図9ステップS24)。OK/NGフラグTm_Flagを“NG”にする理由は、複数回の電源断のためにイベントの正確な発生時刻が分からなくなっているからである。   The event occurrence time correctness recording means 234 of the converter 2 is C1_ROM> Tm_ROM> C2_ROM, that is, occurs after the first power-off after the previous connection with the calibrator 3, and the date / time count value C1_ROM at the time of power-off occurrence Is checked based on the time stamp Tm_ROM (step S23 in FIG. 9) to see if there is an event corresponding to C1_ROM> Tm_ROM> C2_ROM. In this event, the OK / NG flag Tm_Flag of this event is set to a value (for example, 1) indicating “NG” (step S24 in FIG. 9). The reason why the OK / NG flag Tm_Flag is set to “NG” is that the exact occurrence time of the event is not known due to a plurality of power interruptions.

キャリブレータ3との前回の接続よりも前に電源断が発生した場合(C1_ROM<C0_ROM)、全て正しい日付時刻になっているが、キャリブレータ3の時計と合わせるため、イベント発生時刻補正手段233は、Tm_ROM>C0_ROM、すなわち調整時日付時刻カウント値C0_ROMで記録されている、キャリブレータ3との前回の接続よりも後に発生したイベントがある場合(図9ステップS25においてYES)、このイベントのタイムスタンプTm_ROMをカウント差E1で補正する(図9ステップS26)。   When the power is cut off before the previous connection with the calibrator 3 (C1_ROM <C0_ROM), all the date and time are correct. > C0_ROM, that is, when there is an event that has been recorded after the previous connection with the calibrator 3 recorded in the adjustment date / time count value C0_ROM (YES in step S25 in FIG. 9), the time stamp Tm_ROM of this event is counted. Correction is performed using the difference E1 (step S26 in FIG. 9).

このときのタイムスタンプTm_ROMの補正方法はステップS22と同じであり、補正対象のタイムスタンプTm_ROMにカウント差E1を加えたカウント値を計算し、計算したカウント値を補正対象のタイムスタンプTm_ROMの新たな値としてEEPROM223に設定する。   The correction method of the time stamp Tm_ROM at this time is the same as that in step S22. The count value obtained by adding the count difference E1 to the time stamp Tm_ROM to be corrected is calculated, and the calculated count value is used as a new time stamp Tm_ROM. The value is set in the EEPROM 223 as a value.

最後に、変換器2の日付時刻補正手段232は、ステップS17で算出した現在日付時刻カウント値C0を調整時日付時刻カウント値C0_ROMとして記録する(図9ステップS27)。こうして、C0_ROMの値が更新される。
変換器2は、以上のような図4〜図9の処理を実行する。
Finally, the date / time correction means 232 of the converter 2 records the current date / time count value C0 calculated in step S17 as the adjustment date / time count value C0_ROM (step S27 in FIG. 9). Thus, the value of C0_ROM is updated.
The converter 2 performs the processes of FIGS. 4 to 9 as described above.

図10(A)〜図10(D)は本実施の形態の変換器2の履歴記録動作の例を説明する図である。なお、カウント値の「0x」はカウント値が16進数表記であることを示している。図10(A)の例では、2015年01月01日00時00分00秒の初期調整時の電源投入で日付時刻カウンタ224のカウント値C1と調整時日付時刻カウント値C0_ROMと電源断発生時日付時刻カウント値C1_ROMと調整後初電源断発生時日付時刻カウント値C2_ROMとが0x1C374A80に設定されている。   FIGS. 10A to 10D are diagrams illustrating an example of the history recording operation of the converter 2 according to the present embodiment. The count value “0x” indicates that the count value is expressed in hexadecimal. In the example of FIG. 10A, the count value C1 of the date / time counter 224, the adjustment date / time count value C0_ROM, and the occurrence of a power cut-off when the power is turned on at the time of initial adjustment on 01/01/2015 The date / time count value C1_ROM and the post-adjustment initial power-off occurrence date / time count value C2_ROM are set to 0x1C374A80.

次に、2015年01月02日12時01分00秒、すなわち初期調整から12時間後にイベントが発生すると(図10(B))、このときの日付時刻カウンタ224のカウント値C1=0x1C37F37CがこのイベントのタイムスタンプT1_ROMとして記録され、OK/NGフラグT1_Flagが“OK”を示す値に設定される。   Next, when an event occurs on January 02, 2015, 12:01:00, that is, 12 hours after the initial adjustment (FIG. 10B), the count value C1 = 0x1C37F37C of the date / time counter 224 at this time is The event is recorded as the time stamp T1_ROM, and the OK / NG flag T1_Flag is set to a value indicating “OK”.

2015年01月02日13時01分00秒、すなわち図10(B)のイベント発生から1時間後(初期調整から13時間後)に変換器2の電源断が発生すると(図10(C))、電源断発生時日付時刻カウント値C1_ROM=0x1C38018Cが調整後初電源断発生時日付時刻カウント値C2_ROMに記録され、このときの日付時刻カウンタ224のカウント値C1=0x1C38018Cが電源断発生時日付時刻カウント値C1_ROMに記録される。   When the power supply to the converter 2 is cut off on January 02, 2015, 13:01:00, that is, 1 hour after the event occurrence in FIG. 10B (13 hours after the initial adjustment) (FIG. 10C). ), The date / time count value C1_ROM = 0x1C38018C at the time of power-off occurrence is recorded in the adjusted date / time count value C2_ROM at the time of initial power-off, and the count value C1 = 0x1C38018C of the date / time counter 224 at this time It is recorded in the count value C1_ROM.

2015年01月02日15時01分00秒、すなわち図10(C)の電源断から2時間後(初期調整から14時間後)に変換器2の電源が投入されたときに(図10(D))、調整時日付時刻カウント値C0_ROM、電源断発生時日付時刻カウント値C1_ROM、調整後初電源断発生時日付時刻カウント値C2_ROM、タイムスタンプT1_ROM、OK/NGフラグT1_Flagが変化することはない。   When the power of the converter 2 is turned on (January 02, 2015, 15:01:00, that is, 2 hours after the power-off in FIG. 10C (14 hours after the initial adjustment) (FIG. 10 ( D)), adjustment date / time count value C0_ROM, power-off occurrence date / time count value C1_ROM, adjusted initial power-off occurrence date / time count value C2_ROM, time stamp T1_ROM, OK / NG flag T1_Flag will not change. .

図10(D)の動作の続きを図11(A)〜図11(D)で説明する。2015年01月02日18時01分00秒、すなわち図10(D)の電源投入から3時間後にイベントが発生すると、このときの日付時刻カウンタ224のカウント値C1=0x1C382BBCがこのイベントのタイムスタンプT2_ROMとして記録され、OK/NGフラグT2_Flagが“OK”を示す値に設定される。   The continuation of the operation in FIG. 10D will be described with reference to FIGS. When an event occurs on January 02, 2015, 18:01:00, that is, 3 hours after the power-on in FIG. 10D, the count value C1 = 0x1C382BBC of the date / time counter 224 at this time is the time stamp of this event It is recorded as T2_ROM, and the OK / NG flag T2_Flag is set to a value indicating “OK”.

2015年01月02日19時01分00秒、すなわち図11(A)のイベント発生から1時間後に変換器2の電源断が発生すると(図11(B))、電源断発生時日付時刻カウント値C1_ROM=0x1C38018Cが調整後初電源断発生時日付時刻カウント値C2_ROMに記録され、このときの日付時刻カウンタ224のカウント値C1=0x1C3839CCが電源断発生時日付時刻カウント値C1_ROMに記録される。   On January 02, 2015, 19:01:00, that is, when the power of the converter 2 is turned off 1 hour after the occurrence of the event shown in FIG. The value C1_ROM = 0x1C38018C is recorded in the date / time count value C2_ROM at the time of initial power-off occurrence after adjustment, and the count value C1 = 0x1C3839CC of the date / time counter 224 at this time is recorded in the date / time count value C1_ROM at the time of power-off occurrence.

2015年01月02日20時01分00秒、すなわち図11(B)の電源断から1時間後に変換器2の電源が投入されたときに(図11(C))、調整時日付時刻カウント値C0_ROM、電源断発生時日付時刻カウント値C1_ROM、調整後初電源断発生時日付時刻カウント値C2_ROM、タイムスタンプT1_ROM,T2_ROM、OK/NGフラグT1_Flag,T2_Flagが変化することはない。   January 02, 2015 20:01:00, that is, when the power of the converter 2 is turned on one hour after the power-off in FIG. 11B (FIG. 11C), the adjustment date / time count The value C0_ROM, the date / time count value C1_ROM at the time of power-off occurrence, the date / time count value C2_ROM at the time of initial power-off after adjustment, the time stamps T1_ROM, T2_ROM, and the OK / NG flags T1_Flag, T2_Flag are not changed.

2015年01月02日22時01分00秒、すなわち図11(C)の電源投入から2時間後にイベントが発生すると(図11(D))、このときの日付時刻カウンタ224のカウント値C1=0x1C3855ECがこのイベントのタイムスタンプT3_ROMとして記録され、OK/NGフラグT3_Flagが“OK”を示す値に設定される。   When an event occurs on January 02, 2015 22:01:00, that is, two hours after the power-on in FIG. 11C (FIG. 11D), the count value C1 of the date / time counter 224 at this time = 0x1C3855EC is recorded as the time stamp T3_ROM of this event, and the OK / NG flag T3_Flag is set to a value indicating “OK”.

図11(D)の動作の続きを図12で説明する。2015年01月04日22時01分00秒、すなわち図11(D)のイベント発生から2日後に変換器2にキャリブレータ3が接続され、変換器2の定期検査が開始される(図12)。ただし、図12では、変換器2の日付時刻補正手段232、イベント発生時刻補正手段233およびイベント発生時刻正否記録手段234による補正が行なわれる前の状態を示している。   The continuation of the operation in FIG. 11D will be described with reference to FIG. January 04, 2015, 22:01:00, that is, two days after the occurrence of the event of FIG. 11D, the calibrator 3 is connected to the converter 2 and periodic inspection of the converter 2 is started (FIG. 12). . However, FIG. 12 shows a state before correction is performed by the date / time correction unit 232, the event occurrence time correction unit 233, and the event occurrence time correct / failure recording unit 234 of the converter 2.

次に、日付時刻補正手段232、イベント発生時刻補正手段233およびイベント発生時刻正否記録手段234の動作例について説明する。
2015年01月04日22時01分00秒に変換器2とキャリブレータ3とが接続されたとき、日付時刻補正手段232は、日付時刻情報取得手段231が取得した現在の日付時刻を現在日付時刻カウント値C0=0x1C3C749C(2015年01月04日22時01分00秒)に変換する(図9ステップS17)。
Next, operation examples of the date / time correction unit 232, the event occurrence time correction unit 233, and the event occurrence time correct / incorrect recording unit 234 will be described.
When the converter 2 and the calibrator 3 are connected on January 04, 2015 at 22:01:00, the date / time correction unit 232 uses the current date / time acquired by the date / time information acquisition unit 231 as the current date / time. The count value is converted to C0 = 0x1C3C749C (January 04, 2015, 22:01:00) (step S17 in FIG. 9).

日付時刻補正手段232は、カウント差E1を次式のように計算する(図9ステップS18)。
E1=C0−C1=0×17BB0 ・・・(4)
このカウント差E1は、キャリブレータ3との前回の接続からの変換器2の電源断が合計で27時間(97200秒)であることを示している。
The date / time correction means 232 calculates the count difference E1 as shown in the following equation (step S18 in FIG. 9).
E1 = C0-C1 = 0 × 17BB0 (4)
This count difference E1 indicates that the total power off of the converter 2 from the previous connection with the calibrator 3 is 27 hours (97200 seconds).

そして、日付時刻補正手段232は、次式のように日付時刻カウンタ224のカウント値C1にカウント差E1を加えたカウント値を計算し、計算したカウント値を日付時刻カウンタ224のカウント値C1の新たな値として設定する(図9ステップS19)。
C1=C1+E1=0x1C3C749C ・・・(5)
こうして、変換器2の日付時刻をキャリブレータ3の時計と合わせることができる。
Then, the date / time correction means 232 calculates a count value obtained by adding the count difference E1 to the count value C1 of the date / time counter 224 as in the following equation, and the calculated count value is a new value of the count value C1 of the date / time counter 224. This value is set as a correct value (step S19 in FIG. 9).
C1 = C1 + E1 = 0x1C3C749C (5)
Thus, the date and time of the converter 2 can be synchronized with the clock of the calibrator 3.

C0_ROM=0x1C374A80、C1_ROM=0x1C3839CC、T3_ROM=0x1C3855ECなので、C1_ROM>C0_ROM、T3_ROM>C1_ROMが成立し、イベント発生時刻補正手段233は、次式によりタイムスタンプT3_ROMをカウント差E1で補正する(図9ステップS22)。
T3_ROM=T3_ROM+E1=0x1C39D19C ・・・(6)
Since C0_ROM = 0x1C374A80, C1_ROM = 0x1C3839CC, and T3_ROM = 0x1C3855EC, C1_ROM> C0_ROM and T3_ROM> C1_ROM are satisfied, and the event occurrence time correction means 233 corrects the time stamp T3_ROM with the count difference E1 by the following equation (step S22 in FIG. 9). ).
T3_ROM = T3_ROM + E1 = 0x1C39D19C (6)

カウント値0x1C39D19Cは2015年01月02日22時01分00秒を表しており、図11(D)のイベント発生時刻と合うようにT3_ROMが正しく補正されたことが分かる。   The count value 0x1C39D19C represents January 02, 2015, 22:01:00, and it can be seen that T3_ROM was corrected correctly to match the event occurrence time in FIG.

C1_ROM=0x1C3839CC、T2_ROM=0x1C382BBC、C2_ROM=0x1C38018Cなので、C1_ROM>T2_ROM>C2_ROMが成立し、イベント発生時刻正否記録手段234は、タイムスタンプがT2_ROMのイベントのOK/NGフラグT2_Flagを“NG”を示す値にする(図9ステップS24)。   Since C1_ROM = 0x1C3839CC, T2_ROM = 0x1C382BBC, and C2_ROM = 0x1C38018C, C1_ROM> T2_ROM> C2_ROM is established, and the event occurrence time correct / incorrect recording means 234 has a value indicating an OK / NG flag T2_Flag indicating that the time stamp is T2_ROM. (Step S24 in FIG. 9).

最後に、日付時刻補正手段232は、現在日付時刻カウント値C0=0x1C3C749Cを調整時日付時刻カウント値C0_ROMとして記録する(図9ステップS27)。
以上の動作により、日付時刻カウンタ224のカウント値C1、タイムスタンプT3_ROM、OK/NGフラグT2_Flag、および調整時日付時刻カウント値C0_ROMは図13のようになる。
Finally, the date / time correction means 232 records the current date / time count value C0 = 0x1C3C749C as the adjustment date / time count value C0_ROM (step S27 in FIG. 9).
With the above operation, the count value C1 of the date / time counter 224, the time stamp T3_ROM, the OK / NG flag T2_Flag, and the adjustment date / time count value C0_ROM are as shown in FIG.

次に、変換器2がキャリブレータ3と接続される定期検査の間に変換器2の電源断が1回しか発生してない場合のOK/NGフラグの状態を図14(A)に示す。定期検査の間に電源断が1回しか発生してない場合、電源断の前と後にイベントが発生しても、OK/NGフラグT1_Flag,T2_Flagが“NG”になることはない。   Next, FIG. 14A shows the state of the OK / NG flag when the converter 2 is powered off only once during the periodic inspection in which the converter 2 is connected to the calibrator 3. If the power interruption occurs only once during the periodic inspection, the OK / NG flags T1_Flag and T2_Flag will not become “NG” even if an event occurs before and after the power interruption.

図14(B)のように定期検査の間に変換器2の電源断が2回以上(n回)発生したが、1〜(n−1)回目の電源断の間にイベントが発生していない場合も同様に、OK/NGフラグT1_Flag,T2_Flagが“NG”になることはない。   As shown in FIG. 14B, the converter 2 has been turned off twice or more (n times) during the periodic inspection, but an event has occurred between the first and (n-1) th power interruptions. Similarly, the OK / NG flags T1_Flag and T2_Flag do not become “NG” even when there is no such flag.

一方、図14(C)のように定期検査の間に変換器2の電源断が2回以上(n回)発生し、かつイベントが1〜(n−1)回目の電源断の間に発生した場合、前回の定期検査と1回目の電源断との間に発生したイベントのOK/NGフラグT1_Flag、今回の定期検査と直前の電源断との間に発生したイベントのOK/NGフラグT5_Flagについては“OK”のままであるものの、1〜(n−1)回目の電源断の間に発生したイベントのOK/NGフラグT2_Flag,T3_Flag,T4_Flagは“NG”となる。   On the other hand, as shown in FIG. 14C, the power supply of the converter 2 is interrupted twice or more (n times) during the periodic inspection, and the event is generated between the 1st and (n-1) th power interruptions. If this is the case, the OK / NG flag T1_Flag of the event that occurred between the previous periodic inspection and the first power-off, and the OK / NG flag T5_Flag of the event that occurred between the current periodic inspection and the previous power-off Remains “OK”, but the OK / NG flags T2_Flag, T3_Flag, and T4_Flag of the event that occurred during the 1st to (n−1) th power interruption are “NG”.

以上のように、本実施の形態では、EEPROM223に、調整時日付時刻カウント値C0_ROMを格納する領域を設けた。特許文献1に開示された履歴記録装置では、電源断のときのカウンタ値を保存して電源再投入でカウントを継続する手段しか備えていないが、本実施の形態では、電源断発生時日付時刻カウント値C1_ROMと調整後初電源断発生時日付時刻カウント値C2_ROMとを保持できるようにした。   As described above, in the present embodiment, the EEPROM 223 is provided with an area for storing the adjustment date / time count value C0_ROM. The history recording apparatus disclosed in Patent Document 1 has only a means for storing a counter value at the time of power-off and continuing the count when the power is turned on again. The count value C1_ROM and the date / time count value C2_ROM at the time of initial power-off occurrence after adjustment can be held.

特許文献1に開示された履歴記録装置では、履歴メモリとして複数の不揮発性リングバッファが必要であるが、本実施の形態では、履歴メモリとしてはEEPROM223が1個あればよく、調整時日付時刻カウント値C0_ROMと電源断発生時日付時刻カウント値C1_ROMとから、履歴情報である、イベントのタイムスタンプTm_ROMを補正することができる。   In the history recording device disclosed in Patent Document 1, a plurality of nonvolatile ring buffers are necessary as history memory. In this embodiment, only one EEPROM 223 is required as the history memory. The event time stamp Tm_ROM, which is history information, can be corrected from the value C0_ROM and the power-off occurrence date / time count value C1_ROM.

また、本実施の形態では、EEPROM223に格納されるタイムスタンプTm_ROMに、タイムスタンプTm_ROMの正否を示すOK/NGフラグTm_Flagを用意し、正しい日時を表しているタイムスタンプTm_ROMと不正なものとを区別できるようにした。   In this embodiment, an OK / NG flag Tm_Flag indicating whether the time stamp Tm_ROM is correct is prepared in the time stamp Tm_ROM stored in the EEPROM 223, and the time stamp Tm_ROM indicating the correct date and time is distinguished from an illegal one. I was able to do it.

本実施の形態では、変換器2に電池バックアップされた内蔵時計がなくても、イベント(変換器2の設定や調整値の変更、空検知や付着検知、流速オーバなどの診断異常)の日付時刻を把握することができる。本実施の形態では、キャリブレータ3との前回の接続後、電源断が2回以上発生していないか、あるいは電源断が2回以上発生していても、1回目の電源断からキャリブレータ3との接続直前の電源断までの間にイベント発生がなければ、イベントのタイムスタンプTm_ROMを適切に補正することができ、イベントの正しい発生時刻を把握することができる。   In the present embodiment, even if there is no battery-backed internal clock in the converter 2, the date and time of the event (diagnosis abnormality such as change in the setting of the converter 2, adjustment value change, empty detection or adhesion detection, flow rate over) Can be grasped. In the present embodiment, after the previous connection with the calibrator 3, even if the power supply has not been cut off twice or more, or the power supply cutout has occurred twice or more, the calibrator 3 and the calibrator 3 If no event occurs before the power is turned off immediately before connection, the time stamp Tm_ROM of the event can be corrected appropriately, and the correct occurrence time of the event can be grasped.

なお、キャリブレータ3との前回の接続と今回の接続との間に、電源断が複数回発生して、OK/NGフラグTm_Flagが“NG”のタイムスタンプTm_ROMがあったとしても、電源断の時間が短ければ、異常の発生頻度や傾向が把握できるので、実用上問題ない。   It should be noted that even if there is a time stamp Tm_ROM whose OK / NG flag Tm_Flag is “NG” between the previous connection and the current connection with the calibrator 3 and the OK / NG flag Tm_Flag is “NG”, If it is short, since the occurrence frequency and tendency of the abnormality can be grasped, there is no practical problem.

また、本実施の形態では、稼働時間カウンタ225を別に用意することで、変換器2の電源が入っていた積算時間を把握することができる。日付時刻カウンタ224のカウント値C1は、書き換えが発生するため、積算時間を示す値とはならない。   Further, in the present embodiment, by separately preparing the operation time counter 225, it is possible to grasp the accumulated time during which the converter 2 is turned on. The count value C1 of the date / time counter 224 is not a value indicating the accumulated time because rewriting occurs.

本発明は、電磁流量計の変換器の履歴情報を記録する技術に適用することができる。   The present invention can be applied to a technique for recording history information of a transducer of an electromagnetic flow meter.

1…検出器、2…変換器、3…校正検査装置、20…励磁回路、21…入力信号増幅回路、22,31…制御回路、23,33…設定・表示器、24,34…電源回路、25,35…通信インタフェース、30…入力回路、32…出力回路、220…A/D変換器、221…D/A変換器、222…算出手段、223…EEPROM、224…日付時刻カウンタ、225…稼働時間カウンタ、226…日付時刻カウント値記録手段、227…稼働時間カウント値記録手段、228…日付時刻カウント値再設定手段、229…稼働時間カウント値再設定手段、230…イベント記録手段、231…日付時刻情報取得手段、232…日付時刻補正手段、233…イベント発生時刻補正手段、234…イベント発生時刻正否記録手段。   DESCRIPTION OF SYMBOLS 1 ... Detector, 2 ... Converter, 3 ... Calibration inspection apparatus, 20 ... Excitation circuit, 21 ... Input signal amplification circuit, 22, 31 ... Control circuit, 23, 33 ... Setting / display device, 24, 34 ... Power supply circuit , 25, 35 ... communication interface, 30 ... input circuit, 32 ... output circuit, 220 ... A / D converter, 221 ... D / A converter, 222 ... calculation means, 223 ... EEPROM, 224 ... date time counter, 225 ... operation time counter, 226 ... date time count value recording means, 227 ... operation time count value recording means, 228 ... date time count value resetting means, 229 ... operation time count value resetting means, 230 ... event recording means, 231 ... date time information acquisition means, 232 ... date time correction means, 233 ... event occurrence time correction means, 234 ... event occurrence time correct / incorrect recording means.

Claims (8)

日付時刻をカウントする日付時刻カウンタと、
カウント値の記録のための不揮発性メモリと、
変換器の電源断発生時に前記日付時刻カウンタのカウント値をカウント値C1_ROMとして前記不揮発性メモリに記録する日付時刻カウント値記録手段と、
変換器のイベント発生時に前記日付時刻カウンタのカウント値をタイムスタンプTm_ROMとして前記不揮発性メモリに記録するイベント記録手段と、
変換器が校正検査装置と接続されたときに校正検査装置の時計から現在の日付時刻の情報を取得する日付時刻情報取得手段と、
変換器が校正検査装置と接続されたときに、前記日付時刻情報取得手段が取得した現在の日付時刻に基づいて変換器の日付時刻が前記校正検査装置の時計と合うように補正したカウント値を前記日付時刻カウンタに対して設定する日付時刻補正手段と、
変換器が校正検査装置と接続されたときに、変換器が校正検査装置と前回接続された日付時刻を示すカウント値C0_ROMを前記不揮発性メモリから取得して、このカウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのタイムスタンプTm_ROMを前記日付時刻情報取得手段が取得した現在の日付時刻に基づいて補正するイベント発生時刻補正手段とを備えることを特徴とする電磁流量計の変換器。
A date and time counter that counts the date and time;
A non-volatile memory for recording the count value;
A date / time count value recording means for recording the count value of the date / time counter in the nonvolatile memory as a count value C1_ROM at the time of occurrence of power failure of the converter;
Event recording means for recording a count value of the date / time counter in the nonvolatile memory as a time stamp Tm_ROM when an event of the converter occurs;
Date and time information acquisition means for acquiring current date and time information from the clock of the calibration inspection device when the converter is connected to the calibration inspection device;
When the converter is connected to the calibration inspection apparatus, the count value corrected so that the date and time of the converter matches the clock of the calibration inspection apparatus based on the current date and time acquired by the date and time information acquisition means. A date / time correction means for setting the date / time counter;
When the converter is connected to the calibration inspection apparatus, the count value C0_ROM indicating the date and time when the converter was last connected to the calibration inspection apparatus is acquired from the nonvolatile memory, and recorded in the count value C0_ROM. Whether or not there is an event that occurred after the previous connection with the calibration inspection device is checked based on the time stamp Tm_ROM, and when the corresponding event is recorded, the time stamp Tm_ROM of this event is stored in the date / time information. An electromagnetic flowmeter converter comprising: event occurrence time correction means for correcting the current date and time acquired by the acquisition means.
請求項1記載の電磁流量計の変換器において、
前記イベント発生時刻補正手段は、変換器が校正検査装置と接続されたときに、前記カウント値C1_ROMで記録されている電源断が、前記カウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生した場合、この電源断よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのタイムスタンプTm_ROMを前記日付時刻情報取得手段が取得した現在の日付時刻に基づいて補正することを特徴とする電磁流量計の変換器。
The transducer of the electromagnetic flowmeter according to claim 1,
The event occurrence time correction means is the last time that the power interruption recorded in the count value C1_ROM is recorded in the count value C0_ROM when the converter is connected to the calibration inspection apparatus. If the event occurred after the connection, the presence or absence of an event occurring after the power-off is checked based on the time stamp Tm_ROM. If the corresponding event is recorded, the time stamp Tm_ROM of the event is A converter for an electromagnetic flowmeter, wherein the correction is made based on the current date and time acquired by the date and time information acquisition means.
請求項1または2記載の電磁流量計の変換器において、
さらに、イベントの発生時刻の正否を判定するイベント発生時刻正否記録手段を備え、
前記日付時刻カウント値記録手段は、変換器の電源断発生時に、校正検査装置との接続後に最初に発生した電源断の日付時刻を示すカウント値C2_ROMを前記不揮発性メモリから取得して、前記カウント値C0_ROMで記録されている、校正検査装置との前回の接続の日付が、前記カウント値C2_ROMで記録されている日付よりも後の場合、前記日付時刻カウンタのカウント値を前記カウント値C2_ROMとして前記不揮発性メモリに記録し、
前記イベント発生時刻正否記録手段は、変換器が校正検査装置と接続されたときに、前記カウント値C2_ROMで記録されている電源断よりも後に発生し、かつ前記カウント値C1_ROMで記録されている直前の電源断よりも前に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのOK/NGフラグTm_FlagをタイムスタンプTm_ROMが不正であることを示すNGに設定することを特徴とする電磁流量計の変換器。
In the converter of the electromagnetic flowmeter according to claim 1 or 2,
Furthermore, an event occurrence time correct / incorrect recording means for determining whether the event occurrence time is correct or not is provided.
The date / time count value recording means acquires, from the non-volatile memory, a count value C2_ROM indicating a date / time of power-off first generated after connection to the calibration inspection device when the power-off of the converter occurs. When the date of the previous connection with the calibration inspection apparatus recorded in the value C0_ROM is later than the date recorded in the count value C2_ROM, the count value of the date / time counter is used as the count value C2_ROM. Record in non-volatile memory,
The event occurrence time correct / incorrect recording means occurs after the power-off recorded in the count value C2_ROM and immediately before being recorded in the count value C1_ROM when the converter is connected to the calibration inspection apparatus. Whether or not there is an event that occurred before the power-off is checked based on the time stamp Tm_ROM, and if the corresponding event is recorded, the OK / NG flag Tm_Flag of this event is invalid in the time stamp Tm_ROM. It is set to NG which shows that, The converter of the electromagnetic flowmeter characterized by the above-mentioned.
請求項1乃至3のいずれか1項に記載の電磁流量計の変換器において、
さらに、変換器の電源断の後で電源が投入されたときに、前記カウント値C1_ROMを前記日付時刻カウンタに対して設定する日付時刻カウント値再設定手段を備えることを特徴とする電磁流量計の変換器。
In the converter of the electromagnetic flowmeter according to any one of claims 1 to 3,
The electromagnetic flow meter further comprises a date / time count value resetting means for setting the count value C1_ROM to the date / time counter when the power is turned on after the converter is powered off. converter.
請求項1乃至4のいずれか1項に記載の電磁流量計の変換器において、
前記日付時刻補正手段は、変換器が校正検査装置と接続されたときに、前記タイムスタンプの補正後に、前記日付時刻情報取得手段が取得した現在の日付時刻に対応するカウント値を前記カウント値C0_ROMとして前記不揮発性メモリに記録することを特徴とする電磁流量計の変換器。
In the converter of the electromagnetic flowmeter according to any one of claims 1 to 4,
The date / time correction means calculates a count value corresponding to the current date / time acquired by the date / time information acquisition means after the correction of the time stamp when the converter is connected to the calibration inspection apparatus. As a record in the non-volatile memory.
請求項1乃至5のいずれか1項に記載の電磁流量計の変換器において、
さらに、変換器の稼働時間をカウントする稼働時間カウンタと、
変換器の電源断発生時に前記稼働時間カウンタのカウント値をカウント値S1_ROMとして前記不揮発性メモリに記録する稼働時間カウント値記録手段とを備えることを特徴とする電磁流量計の変換器。
In the converter of the electromagnetic flowmeter according to any one of claims 1 to 5,
Furthermore, an operating time counter that counts the operating time of the converter,
A converter for an electromagnetic flowmeter, comprising: an operating time count value recording means for recording the count value of the operating time counter in the nonvolatile memory as a count value S1_ROM when a power failure of the converter occurs.
請求項6記載の電磁流量計の変換器において、
さらに、変換器の電源断の後で電源が投入されたときに、前記カウント値S1_ROMを前記稼働時間カウンタに対して設定する稼働時間カウント値再設定手段を備えることを特徴とする電磁流量計の変換器。
The transducer of the electromagnetic flowmeter according to claim 6,
The electromagnetic flow meter further comprises an operation time count value resetting unit that sets the count value S1_ROM to the operation time counter when the power is turned on after the power supply of the converter is turned off. converter.
電磁流量計の変換器の電源断発生時に日付時刻カウンタのカウント値をカウント値C1_ROMとして不揮発性メモリに記録する日付時刻カウント値記録ステップと、
変換器のイベント発生時に前記日付時刻カウンタのカウント値をタイムスタンプTm_ROMとして前記不揮発性メモリに記録するイベント記録ステップと、
変換器が校正検査装置と接続されたときに校正検査装置の時計から現在の日付時刻の情報を取得する日付時刻情報取得ステップと、
変換器が校正検査装置と接続されたときに、前記日付時刻情報取得ステップで取得した現在の日付時刻に基づいて変換器の日付時刻が前記校正検査装置の時計と合うように補正したカウント値を前記日付時刻カウンタに対して設定する日付時刻補正ステップと、
変換器が校正検査装置と接続されたときに、変換器が校正検査装置と前回接続された日付時刻を示すカウント値C0_ROMを前記不揮発性メモリから取得して、このカウント値C0_ROMで記録されている、校正検査装置との前回の接続よりも後に発生したイベントがあるかどうかをタイムスタンプTm_ROMに基づいて調べ、該当するイベントが記録されている場合に、このイベントのタイムスタンプTm_ROMを前記日付時刻情報取得ステップで取得した現在の日付時刻に基づいて補正するイベント発生時刻補正ステップとを含むことを特徴とする電磁流量計の変換器の履歴記録方法。
A date and time count value recording step of recording the count value of the date and time counter as a count value C1_ROM in the nonvolatile memory when the power supply of the electromagnetic flow meter converter is interrupted;
An event recording step of recording the count value of the date / time counter in the nonvolatile memory as a time stamp Tm_ROM when an event of the converter occurs;
A date and time information acquisition step of acquiring current date and time information from the clock of the calibration inspection device when the converter is connected to the calibration inspection device;
When the converter is connected to the calibration inspection device, the count value corrected so that the date and time of the converter matches the clock of the calibration inspection device based on the current date and time acquired in the date and time information acquisition step. A date / time correction step set for the date / time counter;
When the converter is connected to the calibration inspection apparatus, the count value C0_ROM indicating the date and time when the converter was last connected to the calibration inspection apparatus is acquired from the nonvolatile memory, and recorded in the count value C0_ROM. Whether or not there is an event that occurred after the previous connection with the calibration inspection device is checked based on the time stamp Tm_ROM, and when the corresponding event is recorded, the time stamp Tm_ROM of this event is stored in the date / time information. An event generation time correction step of correcting based on the current date and time acquired in the acquisition step, and a history recording method for an electromagnetic flowmeter converter.
JP2015155895A 2015-08-06 2015-08-06 Electromagnetic flowmeter converter and history recording method Active JP6486236B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015155895A JP6486236B2 (en) 2015-08-06 2015-08-06 Electromagnetic flowmeter converter and history recording method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015155895A JP6486236B2 (en) 2015-08-06 2015-08-06 Electromagnetic flowmeter converter and history recording method

Publications (2)

Publication Number Publication Date
JP2017032524A JP2017032524A (en) 2017-02-09
JP6486236B2 true JP6486236B2 (en) 2019-03-20

Family

ID=57989355

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015155895A Active JP6486236B2 (en) 2015-08-06 2015-08-06 Electromagnetic flowmeter converter and history recording method

Country Status (1)

Country Link
JP (1) JP6486236B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4931213B2 (en) * 2007-01-10 2012-05-16 株式会社山武 History recording device
JP5760661B2 (en) * 2011-05-09 2015-08-12 セイコーエプソン株式会社 Sensor device and sensor system

Also Published As

Publication number Publication date
JP2017032524A (en) 2017-02-09

Similar Documents

Publication Publication Date Title
JP6058134B2 (en) Industrial process temperature transmitter with sensor stress diagnosis
EP2857805B1 (en) Field device
KR20200095069A (en) Portable error corection apparatuse for Internet of Things meter
JP5547437B2 (en) Electronic gas meter and timer setting method thereof
JP2007163203A (en) Coriolis mass flowmeter
JP6486236B2 (en) Electromagnetic flowmeter converter and history recording method
JP5477488B2 (en) Real-time clock and data recording method for real-time clock
US11519934B2 (en) Method for calibrating a sensor system
JP2017032525A (en) Converter of electromagnetic flow meter and history recording method
JP4788260B2 (en) Multivariate transmitter
Gaitan et al. A Dynamic uncertainty protocol for digital sensor networks
CN112286039A (en) Clock calibration method and device and readable storage medium
JP2010054412A (en) Real-time clock
JP2021025926A (en) Self-diagnosis method of vibration sensor, and vibration sensor system having self-diagnosis function
JP2004272403A (en) Process input/output device and monitor control system using the same
JP2015190951A (en) Integrated amount output device, integrated amount input device, integration pulse transmission device and method for detecting error of integration pulse transmission device
JP6158015B2 (en) Frequency detection device and frequency detection device calibration method
JP3546427B2 (en) Clock with calendar using binary counter
JP7117948B2 (en) Electronics
JP2017032526A (en) Calibration inspection system
JP6728796B2 (en) Vibration meter, vibration meter correction method, vibration meter correction program, vibration measurement system and control device
JP4403741B2 (en) Physical quantity measuring instrument with time recording function
JP2010051548A (en) Electronic device with pitch measuring function
JP2020038539A (en) Communication system and slave unit
JP3990331B2 (en) Time correction control circuit, time correction control method, and time correction control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180327

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181207

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190212

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190219

R150 Certificate of patent or registration of utility model

Ref document number: 6486236

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150