JP2005025680A - Method and device for fetching bcd signal to controller - Google Patents

Method and device for fetching bcd signal to controller Download PDF

Info

Publication number
JP2005025680A
JP2005025680A JP2003270565A JP2003270565A JP2005025680A JP 2005025680 A JP2005025680 A JP 2005025680A JP 2003270565 A JP2003270565 A JP 2003270565A JP 2003270565 A JP2003270565 A JP 2003270565A JP 2005025680 A JP2005025680 A JP 2005025680A
Authority
JP
Japan
Prior art keywords
bcd
signal
controller
output
data
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
JP2003270565A
Other languages
Japanese (ja)
Inventor
Masatoshi Urabe
正敏 占部
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric 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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP2003270565A priority Critical patent/JP2005025680A/en
Publication of JP2005025680A publication Critical patent/JP2005025680A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Arrangements For Transmission Of Measured Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method and device for precisely fetching a BCD signal to a controller regardless of the presence of a strobe signal or reading process in a change in voltage. <P>SOLUTION: The device for fetching the BCD signal to the controller comprises a data matching property check processing means S2 for executing determination step S23 of determining whether or not the BCD signal outputted from a BCD transmission device to the controller is identical in a plurality of reading processes S21 and S22, and output step S24 of performing, when the signal is identical as the result of determination, a decimal conversion process thereto followed by outputting, and outputting the nearest established value when it is not identical. According to this, normal data can be outputted to the outside, and output of abnormal data can be prevented. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、BCD(Binary Coded Decimal:2進化10進数)信号を取り込んで演算処理を行うコントローラ取り込み方法および装置に関する。   The present invention relates to a controller fetching method and apparatus for fetching a BCD (Binary Coded Decimal) signal and performing arithmetic processing.

図3は、BCD発信装置とコントローラとの接続状態を示すブロック図である。
図において、1はカウンタやエンコーダなどのBCD信号を発生するBCD発信装置、2はBCD発信装置1から出力されたBCD信号の伝送路、3はBCD信号を演算処理するコントローラ、4は入出力インターフェースである。
BCD発信装置1から出力されたBCD信号は、伝送路2を通り、入出力インターフェース4を介してコントローラ3に入力される。
コントローラ3に入力されたBCD信号の処理フローを図4に示す。
図4において、入力されたBCD信号は、入力信号読込処理ステップS11にてコントローラ3内部で使用するデータに変換され、BCD→10進数変換処理ステップS12にて10進数に変換される。その結果を出力信号処理ステップS13にて外部出力し、入力信号読込処理ステップS11に戻る。コントローラ3の内部ではこのようなサイクル処理が行われている。
10進数に変換されたデータは、数値表示用データや流量等の帳票出力用差分計算用に使用される。
FIG. 3 is a block diagram showing a connection state between the BCD transmitter and the controller.
In the figure, 1 is a BCD transmission device for generating a BCD signal, such as a counter or an encoder, 2 is a transmission path for the BCD signal output from the BCD transmission device 1, 3 is a controller for processing the BCD signal, and 4 is an input / output interface. It is.
The BCD signal output from the BCD transmission device 1 passes through the transmission path 2 and is input to the controller 3 via the input / output interface 4.
A processing flow of the BCD signal input to the controller 3 is shown in FIG.
In FIG. 4, an input BCD signal is converted into data used in the controller 3 in an input signal reading processing step S11, and converted into a decimal number in a BCD → decimal number conversion processing step S12. The result is output to the outside in the output signal processing step S13, and the process returns to the input signal reading processing step S11. Such a cycle process is performed in the controller 3.
The data converted into the decimal number is used for calculation of a difference in form output such as numerical display data and flow rate.

10進数に変換されたデータが、あらかじめ設定された数値範囲に属するか否かを判定する手法として、特開平6−187125号公報(特許文献1)に開示されたものがある。これは、BCDデータの各桁を10進数値に変換するデコード手段と、この変換された各桁の10進数値が多くとも1〜8の各々に対して大か小かを判定して大小判定信号を出力する手段とを備え、デコード手段の出力と大小判定信号とを用いて、BCDデータが示す10進数値があらかじめ設定された数値範囲に属するか否かを判定するものである。   Japanese Patent Laid-Open No. 6-187125 (Patent Document 1) discloses a method for determining whether or not data converted into a decimal number belongs to a preset numerical range. This is a decoding means for converting each digit of the BCD data into a decimal value, and determining whether the converted decimal value of each digit is larger or smaller than each of 1 to 8 at most. And a means for outputting a signal, and using the output of the decoding means and the magnitude determination signal, it is determined whether or not the decimal value indicated by the BCD data belongs to a preset numerical range.

特開平6−187125号公報JP-A-6-187125

通常、BCD信号は、図5に示すように数値データとストローブ信号(データ読込可信号)で構成されているが、このストローブ信号がコントローラ3の1サイクル処理時間より短い場合や、ストローブ信号自体が無い場合がある。その場合、BCD信号は電圧信号であるため、図6に示すように、電圧信号の変化時に、コントローラ3の入力信号読込処理ステップS11が行われると、コントローラは正常なデータが取得できない。そのため、外部計器を設け、この外部計器によりBCD信号をコントローラに取り込める形にして信号取り込みを行っていた。しかし、外部計器という別の装置を設ける必要があり、構成が複雑化するとともに、コストアップの原因となっていた。
さらに、前掲の特許文献1に開示された方法は、BCD信号を正常に取り込んだ後の処理に関するものであり、正常にデータの取り込みができなかったときの対策を提供するものではない。
そこで、本発明は、ストローブ信号の有無、電圧変化時の読込処理に関係なく、BCD信号を正しくコントローラに取り込むことのできる方法および装置を提供することを目的とする。
Normally, the BCD signal is composed of numerical data and a strobe signal (data readable signal) as shown in FIG. 5, but when this strobe signal is shorter than the one-cycle processing time of the controller 3, the strobe signal itself is There may be no. In this case, since the BCD signal is a voltage signal, as shown in FIG. 6, when the input signal reading process step S11 of the controller 3 is performed when the voltage signal changes, the controller cannot acquire normal data. For this reason, an external instrument is provided, and the signal is captured by the external instrument in such a manner that the BCD signal can be captured by the controller. However, it is necessary to provide another device called an external instrument, which complicates the configuration and increases costs.
Furthermore, the method disclosed in the above-mentioned Patent Document 1 relates to the processing after the BCD signal is normally captured, and does not provide a countermeasure when the data cannot be captured normally.
Therefore, an object of the present invention is to provide a method and an apparatus that can correctly import a BCD signal into a controller regardless of the presence / absence of a strobe signal and the reading process at the time of voltage change.

上記課題を解決するために、本発明のBCD信号のコントローラ取り込み方法は、BCD発信装置からコントローラに出力されたBCD信号が、複数回の読込処理で同一かどうかを判定し、同一であれば10進数変換処理を行って出力し、同一でなければ直近の成立値を出力することを特徴とするものである。
また、本発明のBCD信号のコントローラ取り込み装置は、BCD発信装置からコントローラに出力されたBCD信号が、複数回の読込処理で同一かどうかを判定する判定ステップと、前記判定ステップによる判定の結果、同一であれば10進数変換処理を行って出力し、同一でなければ直近の成立値を出力する出力ステップとを実行するデータ整合性チェック処理手段を設けたことを特徴とするものである。
In order to solve the above-mentioned problem, the controller fetching method of the BCD signal according to the present invention determines whether or not the BCD signal output from the BCD transmitter to the controller is the same in a plurality of reading processes, A decimal conversion process is performed and output, and if they are not the same, the latest established value is output.
Further, the BCD signal controller fetching apparatus of the present invention includes a determination step for determining whether or not the BCD signal output from the BCD transmitter to the controller is the same in a plurality of reading processes, and a result of the determination in the determination step, If they are the same, a data consistency check processing means is provided for executing a decimal number conversion process and outputting, and if not the same, an output step for outputting the latest established value is provided.

本発明においては、上記の通り、本発明のデータ整合性チェック処理を行うことにより、正常なデータを外部に出力することができ、流量等の帳票出力用差分計算などで、異常データの出力を防ぐことができる。
また、本発明のデータ整合性チェック処理工程は、コントローラ及びBCD発信装置を選ばないため、既存設備の改造や計装計器の更新等では効果的である。
In the present invention, as described above, by performing the data consistency check process of the present invention, normal data can be output to the outside, and abnormal data is output in a difference calculation for report output such as flow rate. Can be prevented.
Moreover, since the data consistency check process of the present invention does not select a controller or a BCD transmitter, it is effective in remodeling existing equipment or updating instrumentation instruments.

以下、本発明の実施の形態を、図1を参照して説明する。
図1は本発明の実施の形態におけるコントローラの内部における処理のフロー図である。なお、BCD発信装置とコントローラとの接続状態は、図3に示す構成と同じであるので、説明を省略する。
図1において、入力信号読込処理ステップS1では、BCD発信装置1から出力されたBCD信号をコントローラ3内部で使用するデータに置換する。次のデータ整合性チェック処理ステップS2では、データの整合性を次の手法でチェックする。
すなわち、入力されたBCD信号Xをコントローラ3内のメモリ手段(図示せず)にXNとして格納し(ステップS21)、次のサイクル処理で取り込んだBCD信号XNをメモリ手段に取り込むときに、前回の値をX(N-1)と置き換える(ステップS22)。これを複数回のサイクル処理で繰り返す。
Hereinafter, an embodiment of the present invention will be described with reference to FIG.
FIG. 1 is a flowchart of processing inside the controller according to the embodiment of the present invention. The connection state between the BCD transmitter and the controller is the same as that shown in FIG.
In FIG. 1, in the input signal read processing step S <b> 1, the BCD signal output from the BCD transmission device 1 is replaced with data used inside the controller 3. In the next data consistency check processing step S2, data consistency is checked by the following method.
That is, the inputted BCD signal X is stored as X N in a memory means (not shown) in the controller 3 (step S21), and when the BCD signal X N taken in the next cycle processing is taken into the memory means, Replace the previous value with X (N-1) (step S22). This is repeated by a plurality of cycle processes.

たとえば複数回の回数を3とすれば、
(N-3)=X(N-2)→A
(N-2)=X(N-1)→B
(N-1)=XN →C
というA,B,Cの条件が成立したとき、つまり3回連続で同一値を読み取った場合にデータが正常であると判定し(ステップS23)、出力メモリ(図示せず)をXNで更新し出力する。
なお、複数回の回数はBCD信号の変化周期、コントローラのサイクル時間による。
データの整合性が正常であれば、次のBCD→10進数変換処理ステップS3の処理を実行し、その結果を出力信号処理ステップS4にて外部出力する。
データの整合性が正常ではなく、前記の条件が成立しないときは、ステップS3の処理を行わず、条件が成立するまで直近の条件成立データを出力する。
For example, if the number of multiple times is 3,
X (N-3) = X (N-2) → A
X (N-2) = X (N-1) → B
X (N-1) = X N → C
When the conditions A, B, and C are satisfied, that is, when the same value is read three times in succession, it is determined that the data is normal (step S23), and the output memory (not shown) is updated with X N And output.
The number of times depends on the change period of the BCD signal and the cycle time of the controller.
If the data consistency is normal, the next BCD → decimal number conversion processing step S3 is executed, and the result is output to the outside in the output signal processing step S4.
If the data consistency is not normal and the condition is not satisfied, the process of step S3 is not performed, and the most recent condition satisfaction data is output until the condition is satisfied.

このデータ整合性チェック処理ステップS2を行うことで、異常データは外部出力されなくなる。
このデータ整合性チェック処理ステップS2の具体例を図2に示す。図2(a)は一般化した例、(b)は実際の入力信号が3,4,5と変化した場合の出力信号を示している。
上述したように、本実施の形態によれば、コントローラの内部で、データ整合性チェック処理を行うことにより、BCD信号の複数回の読込処理での整合性をチェックするようにしたことにより、ストローブ信号の有無、電圧変化時の読込処理に関係なく正常なデータの検出を行うことができる。
By performing this data consistency check processing step S2, abnormal data is not output to the outside.
A specific example of this data consistency check processing step S2 is shown in FIG. FIG. 2A shows a generalized example, and FIG. 2B shows an output signal when the actual input signal changes to 3, 4 and 5. FIG.
As described above, according to the present embodiment, the data consistency check process is performed inside the controller, thereby checking the consistency of the BCD signal in a plurality of reading processes. Normal data can be detected regardless of the presence or absence of a signal and the reading process when the voltage changes.

本発明は、BCD信号のデータ整合性チェック処理を行うことにより、流量等の帳票出力用差分計算などで、異常データの出力を防いで正常なデータを外部に出力することができるコントローラとして利用することができる。   The present invention is used as a controller that can output normal data to the outside by preventing the output of abnormal data by performing a data consistency check process of a BCD signal, for example, for calculating a difference in a form output such as a flow rate. be able to.

本発明の実施の形態のコントローラ内部における処理のフロー図である。It is a flowchart of the process inside the controller of embodiment of this invention. 本発明のデータ整合性チェック処理と出力例の説明図である。It is explanatory drawing of the data consistency check process and output example of this invention. BCD発信装置とコントローラとの接続状態を示すブロック図である。It is a block diagram which shows the connection state of a BCD transmission apparatus and a controller. 従来のコントローラ内部における処理を示すフロー図である。It is a flowchart which shows the process inside the conventional controller. BCD信号に含まれるストローブ信号の説明図である。It is explanatory drawing of the strobe signal contained in a BCD signal. BCD電圧信号変化時のタイムチャートである。It is a time chart at the time of a BCD voltage signal change.

符号の説明Explanation of symbols

1 BCD発信装置
2 伝送路
3 コントローラ
4 入出力インターフェース
1 BCD transmitter 2 Transmission path 3 Controller 4 Input / output interface

Claims (2)

BCD発信装置からコントローラに出力されたBCD信号が、複数回の読込処理で同一かどうかを判定し、同一であれば10進数変換処理を行って出力し、同一でなければ直近の成立値を出力することを特徴とするBCD信号のコントローラ取り込み方法。   It is determined whether or not the BCD signal output from the BCD transmitter to the controller is the same in a plurality of reading processes, and if it is the same, a decimal number conversion process is performed and output. If not, the latest established value is output. A method for fetching a BCD signal from a controller. BCD発信装置からコントローラに出力されたBCD信号が、複数回の読込処理で同一かどうかを判定する判定ステップと、前記判定ステップによる判定の結果、同一であれば10進数変換処理を行って出力し、同一でなければ直近の成立値を出力する出力ステップとを実行するデータ整合性チェック処理手段を設けたことを特徴とするBCD信号のコントローラ取り込み装置。
If the BCD signal output from the BCD transmitter to the controller is the same in multiple reading processes, and if the result of the determination in the determination step is the same, the decimal conversion process is performed and output. A controller for capturing a BCD signal, comprising: a data consistency check processing means for executing an output step for outputting the latest established value if not the same.
JP2003270565A 2003-07-03 2003-07-03 Method and device for fetching bcd signal to controller Pending JP2005025680A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003270565A JP2005025680A (en) 2003-07-03 2003-07-03 Method and device for fetching bcd signal to controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003270565A JP2005025680A (en) 2003-07-03 2003-07-03 Method and device for fetching bcd signal to controller

Publications (1)

Publication Number Publication Date
JP2005025680A true JP2005025680A (en) 2005-01-27

Family

ID=34190484

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003270565A Pending JP2005025680A (en) 2003-07-03 2003-07-03 Method and device for fetching bcd signal to controller

Country Status (1)

Country Link
JP (1) JP2005025680A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101855522A (en) * 2007-10-22 2010-10-06 铁姆肯公司 Absolute position magnetic coder with the output of the scale-of-two and the decimal system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101855522A (en) * 2007-10-22 2010-10-06 铁姆肯公司 Absolute position magnetic coder with the output of the scale-of-two and the decimal system

Similar Documents

Publication Publication Date Title
CN1992508B (en) Encoder
CN106547470B (en) Log storage optimization method and device
CN105929723B (en) The control device of life prediction is carried out by error correction
EA200201010A1 (en) ELECTION DATA COMPRESSION FOR DIGITAL MESSAGE INFORMATION
US10727863B2 (en) Data compression device and data compression method
JP2005025680A (en) Method and device for fetching bcd signal to controller
KR100188147B1 (en) Error detecting circuit used for code
CN105320574B (en) Control device having error correction function corresponding to monitored operation condition
CN114443136A (en) Data transmission method, system, equipment and storage medium for upper computer and PLC
JP7161379B2 (en) inference device
JP5298823B2 (en) Alarm processing circuit and alarm processing method
JP2008076414A (en) Encoder and control apparatus of electric motor
JP2006121615A (en) D/a converter, electronic equipment with d/a converting unit and method of inspecting the d/a converter
WO2022201678A1 (en) Display device, control method for display device, information processing program, and recording medium
JP2021182335A (en) Debugging apparatus and debugging method
JP2008010959A (en) Signal processor and processing method
JP4206310B2 (en) Data processing method and apparatus
JP3990331B2 (en) Time correction control circuit, time correction control method, and time correction control program
JP2023047128A (en) Calculation error warning device and calculation error warning program
KR20210113474A (en) Evaluation device and evaluation method for the quantity of water using artifical intellegnece
JP2013168859A (en) Process input/output device diagnosis system, process input/output control apparatus and process input/output device diagnosis method
CN117804504A (en) Method, system and readable storage medium for improving output stability of instrument
JP2005045523A (en) Digital video data checker and method therefor
JP4206309B2 (en) Data processing method and apparatus
CN114639496A (en) Redundancy association method and device for nuclear power technological equipment