JP2001203579A - Analog module - Google Patents

Analog module

Info

Publication number
JP2001203579A
JP2001203579A JP2000014535A JP2000014535A JP2001203579A JP 2001203579 A JP2001203579 A JP 2001203579A JP 2000014535 A JP2000014535 A JP 2000014535A JP 2000014535 A JP2000014535 A JP 2000014535A JP 2001203579 A JP2001203579 A JP 2001203579A
Authority
JP
Japan
Prior art keywords
parameter
range
analog
area
gain
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.)
Granted
Application number
JP2000014535A
Other languages
Japanese (ja)
Other versions
JP3893830B2 (en
Inventor
Motoharu Suzuki
元治 鈴木
Soichi Arai
聡一 新井
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2000014535A priority Critical patent/JP3893830B2/en
Publication of JP2001203579A publication Critical patent/JP2001203579A/en
Application granted granted Critical
Publication of JP3893830B2 publication Critical patent/JP3893830B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an analog module that processes analog data as digital data within a range easily utilized in a system and can restore a parameter to convert an input value into an output value to have a precision set at factory shipment at an optional point of time. SOLUTION: The analog module is provided with a parameter storage means 2 that has a user's area 3 to which a written value by a user is stored and a manufacturer's area 4 to which values written by the manufacture and to be bolded in the module are stored and with a means 5 that copies the values stored in the manufacture's area 4 to the user's area 3.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は産業用コントローラ
に係り、更に詳しくは例えばセンサから与えられるアナ
ログ信号を、コントローラ内で利用しやすい範囲のディ
ジタル信号に変換するためのアナログ入力モジュール、
またはその逆の動作を行うアナログ出力モジュールに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an industrial controller, and more particularly, to an analog input module for converting, for example, an analog signal supplied from a sensor into a digital signal within a range easily usable in the controller.
Or, it relates to an analog output module that performs the reverse operation.

【0002】[0002]

【従来の技術】アナログモジュールの従来例の構成を図
14に示す。同図はアナログ入力信号をシステム内で利
用しやすい範囲のディジタル信号に変換して出力するア
ナログ入力モジュールの例である。逆の動作を行うアナ
ログモジュールとしてアナログ出力モジュールも用いら
れるが、本発明ではアナログ入力モジュールを例として
本発明の内容を説明する。なお図14のアナログ入力モ
ジュールでは、入力アナログ信号として、例えば単一の
レンジを持つ電圧値が入力されるものとする。
2. Description of the Related Art FIG. 14 shows a configuration of a conventional analog module. FIG. 1 shows an example of an analog input module that converts an analog input signal into a digital signal within a range that can be easily used in the system and outputs the digital signal. Although an analog output module is also used as an analog module that performs the reverse operation, the present invention will be described using an analog input module as an example. In the analog input module of FIG. 14, for example, a voltage value having a single range is input as an input analog signal.

【0003】図15は、図14のアナログ入力モジュー
ルにおいてアナログ入力信号をディジタル信号に変換し
た後、その変換値に加工を行い、出力信号を得る場合の
変換のパラメータとしてのゲインとオフセットとの説明
図である。同図においては、アナログ入力信号として−
10〜+10Vレンジの電圧に対応して、モジュールか
らディジタル変換値−500〜+500(digit)が出力
さるものとする。
FIG. 15 is a diagram illustrating gain and offset as conversion parameters when an analog input signal is converted into a digital signal in the analog input module of FIG. 14 and then converted into a converted value to obtain an output signal. FIG. In the figure, the analog input signal
It is assumed that a digitally converted value of -500 to +500 (digit) is output from the module corresponding to a voltage in the 10 to +10 V range.

【0004】図14のアナログ入力モジュール50にお
いて、アナログ入力信号は入力部51を介してA/D変
換部52によってディジタル信号に変換され、変換値加
工53によって、EEPROM58に格納されている変
換用のパラメータとしてのゲイン59aおよびオフセッ
ト59bを用いて加工され、ディジタル信号としてシス
テムバス54に出力される。この変換値加工53の動作
については後述する。
In the analog input module 50 shown in FIG. 14, an analog input signal is converted into a digital signal by an A / D converter 52 via an input unit 51, and converted by a conversion value processing 53 into a conversion signal stored in an EEPROM 58. Processing is performed using the gain 59a and the offset 59b as parameters, and output to the system bus 54 as digital signals. The operation of the conversion value processing 53 will be described later.

【0005】ゲイン設定60aは外部スイッチ56がオ
ンとなった時点で動作し、A/D変換部52の出力をゲ
イン59aとしてEEPROM58に書き込み、またオ
フセット設定60bは外部スイッチ57がオンとなった
時に動作し、A/D変換部52の出力をオフセット59
bとしてEEPROM58に書き込む。通常の場合、ア
ナログモジュールに対しては、製造者によって工場出荷
時にゲイン59a、およびオフセット59bのデフォル
ト値が書き込まれている。
The gain setting 60a operates when the external switch 56 is turned on, writes the output of the A / D converter 52 as a gain 59a into the EEPROM 58, and sets the offset setting 60b when the external switch 57 is turned on. It operates and outputs the output of the A / D converter 52 to the offset 59.
Write it to the EEPROM 58 as b. Normally, the default values of the gain 59a and the offset 59b are written to the analog module at the time of shipment from the factory by the manufacturer.

【0006】マイコン55はアナログ入力モジュール5
0全体の動作を制御するものであり、ハードウェアの初
期化、モジュール内の変換値処理、EEPROM58へ
の書込み、およびシステムバス54へのデータ送出など
を制御する。すなわち変換値加工53、ゲイン設定60
a、およびオフセット設定60bの各ブロックはハード
ウェアではなく、マイコン55によるソフトウェア処理
である。
The microcomputer 55 includes an analog input module 5
0 controls the entire operation of the hardware, such as hardware initialization, conversion value processing in the module, writing to the EEPROM 58, and data transmission to the system bus 54. That is, conversion value processing 53, gain setting 60
Each block of a and the offset setting 60b is not hardware but software processing by the microcomputer 55.

【0007】ゲインとオフセットは、変換値加工53に
よって行われる、A/D変換部52の出力からシステム
バス54に出力するディジタル信号への変換に用いられ
るパラメータであるが、このゲインとオフセットをユー
ザに設定可能とさせる機能がアナログモジュールに与え
られている場合がある。
The gain and offset are parameters used for conversion from the output of the A / D converter 52 to a digital signal output to the system bus 54 by the conversion value processing 53. In some cases, a function that allows setting to be performed is given to an analog module.

【0008】これはアナログモジュールがシステム機器
に組み込まれたり、プラントに組み込まれたりして動作
する時に、接続相手先との間で入力レンジのフルスケー
ルの分だけ印加電圧や印加電流をふることができない場
合があるためであり、その原因は回路上のリーク電流
や、接続ケーブルの抵抗などである。
[0008] This is because when the analog module is installed in a system device or installed in a plant and operates, an applied voltage or an applied current may be applied to a connection partner by an amount corresponding to a full scale of an input range. This may not be possible because of leakage current in the circuit or resistance of the connection cable.

【0009】そのような場合に備えて、ユーザがアナロ
グモジュールを動作させる前に、接続先から出力される
最小出力値を例えばゲイン、最小出力値をオフセットと
して、アナログモジュールに記憶させて動作させるゲイ
ン、オフセット設定機能が必要となる。
In order to prepare for such a case, before the user operates the analog module, the minimum output value output from the connection destination is stored in the analog module, for example, as a gain, and the minimum output value is output as an offset. , An offset setting function is required.

【0010】次にゲインとオフセットを使用した変換値
加工53の動作について説明する。変換値加工53は、
前述のように実際にはハードウェアではなく、マイコン
55によって行われるソフトウェア処理である。その機
能は2つあり、第1の機能はA/D変換部52の出力に
対するゲインとオフセットを使ったフルスケール変換で
あり、第2の機能はフルスケールを越える範囲での上限
値、下限値張り付けの処理である。
Next, the operation of the conversion value processing 53 using the gain and the offset will be described. The conversion value processing 53
As described above, it is not actually hardware but software processing performed by the microcomputer 55. The first function is a full scale conversion using a gain and an offset with respect to the output of the A / D converter 52, and the second function is an upper limit value and a lower limit value in a range exceeding the full scale. This is the attachment process.

【0011】図15を用いて具体的な処理例を説明す
る。まず第1の手順として入力に+10Vを与えて外部
スイッチ56を押す。この時A/D変換部52は+60
0を出力し、この値はゲイン59aとしてEEPROM
58に書き込まれる。第2の手順として入力に0Vを与
えて外部スイッチ57が押される。この時のA/D変換
部52の出力+10が、オフセット59bとしてEEP
ROM58に書き込まれる。これらの手順はアナログモ
ジュール50を初めて使用する時に一度行えばよいもの
であり、例えば製造者によって工場出荷時に実行され
る。
A specific processing example will be described with reference to FIG. First, as a first procedure, +10 V is applied to the input and the external switch 56 is pressed. At this time, the A / D conversion section 52 has +60
0, and this value is used as the gain 59a in the EEPROM.
58 is written. As a second procedure, 0 V is applied to the input and the external switch 57 is pressed. At this time, the output +10 of the A / D converter 52 is used as the
The data is written to the ROM 58. These procedures need only be performed once when the analog module 50 is used for the first time, and are executed, for example, by a manufacturer at the time of factory shipment.

【0012】ユーザによる通常の使用時においてアナロ
グ入力電圧として+5Vが与えられるとすると、A/D
変換部52の出力は+305となる。この出力値に対し
て次式による変換値加工を行って、システムバス54へ
の出力Xを求めるのが変換値加工53の機能である。
When +5 V is supplied as an analog input voltage during normal use by a user, A / D
The output of the converter 52 is +305. The function of the conversion value processing 53 is to perform conversion value processing on the output value by the following equation to obtain an output X to the system bus 54.

【0013】 X=(A/D変換部出力値−オフセット)×分解能/(ゲイン−オフセット) ・・・・・(1) IF X>500 THEN X=500 ←上限値張り付け IF X<−500 THEN X=−500 ←下限値張り付け この処理によって得られた値が、ディジタル出力として
システムバス54に与えられる。前述のゲインとオフセ
ットの値を代入し、分解能を500として(1)式を計
算すると、システムバス54への出力値Xとして、25
0(digit)が得られる。
X = (A / D converter output value−offset) × resolution / (gain−offset) (1) IF X> 500 THEN X = 500 ← Upper limit value pasting IF X <−500 THEN X = −500 ← Past lower limit value The value obtained by this processing is given to the system bus 54 as a digital output. By substituting the above-mentioned gain and offset values and calculating equation (1) with a resolution of 500, the output value X to the system bus 54 is 25
0 (digit) is obtained.

【0014】次に図14のEEPROM58としては、
多くの場合アナログモジュールに対するコストとスペー
スの制約のために値段が安く、小さいパッケージのシリ
アルEEPROMが使われることが多い。図16はその
ようなシリアルEEPROMとマイコンとの接続例を示
し、図17はシリアルEEPROMに対するアクセスの
例を示す。
Next, as the EEPROM 58 of FIG.
In many cases, the cost is low due to cost and space constraints on analog modules, and serial EEPROMs in small packages are often used. FIG. 16 shows an example of connection between such a serial EEPROM and a microcomputer, and FIG. 17 shows an example of access to the serial EEPROM.

【0015】シリアルEEPROMとしては、わずか8
ピンしかないパッケージの中に256ワード×16ビッ
ト(1024×16などメモリ容量は色々ある。)のメ
モリが格納されており、図16に示すように *CS信号
を与えながら、Din端子にリードコマンドやライトコマ
ンドを与えることによって、希望するアドレスのデータ
を読み出したり、データの書き込みを行うことができ
る。
As a serial EEPROM, only 8
A 256-word × 16-bit (1024 × 16, etc., various memory capacity) memory is stored in a package having only pins. As shown in FIG. 16, a read command is supplied to the Din terminal while giving a * CS signal as shown in FIG. By giving a write command or a write command, data at a desired address can be read or data can be written.

【0016】図17に示すように、例えばアドレスの8
ビットに対してDin端子は1本だけであり、 コマンドや
アドレスは1ビットずつシリアルにEEPROMに与え
られる。Dout 端子からのステータスやリードデータ
も、1ビットずつシリアルに出力される。
As shown in FIG. 17, for example, address 8
There is only one Din terminal for bits, and commands and addresses are serially given to the EEPROM bit by bit. Status and read data from the Dout terminal are also output serially one bit at a time.

【0017】図17に示すようにリード動作時のステー
タスは通常0であり、引き続いてデータビットが出てく
ることを示している。RS232Cのようなシリアル通
信におけるスタートビットと同様なものがステータスで
ある。これに対してライト動作時には、Din端子からコ
マンド、アドレス、ライトデータが与えられ、そのライ
ト動作に対応するステータスとしてはレディ(完了)
か、ビジィ(未完了)のいずれかが出力される。
As shown in FIG. 17, the status at the time of the read operation is normally 0, which indicates that the data bit subsequently comes out. The same as the start bit in serial communication such as RS232C is the status. On the other hand, during a write operation, a command, an address, and write data are given from the Din terminal, and the status corresponding to the write operation is ready (completed).
Or busy (incomplete) is output.

【0018】[0018]

【発明が解決しようとする課題】以上説明したように、
従来のアナログモジュールでは、工場から出荷される時
点でその入力対出力特性が精度保証範囲内に収まるよう
に、ゲインとオフセットの値が設定される。しかしなが
らユーザがある使用環境に対応するためにゲインやオフ
セットの調整を行うと、EEPROMに書き込まれてい
るゲインとオフセットの値は上書きされることにより消
えてしまい、別の環境で使用したり、精度を戻したい場
合には工場へ送り返してゲインとオフセットの値を設定
しなおしてもらうか、あるいはユーザ自身が高精度の電
圧発生器や電流発生器を用意して、ゲイン、オフセット
の設定をし直さなければならないという問題点があっ
た。
As described above,
In a conventional analog module, the gain and offset values are set so that the input / output characteristics of the analog module are within the accuracy guarantee range when shipped from the factory. However, if the user adjusts the gain and offset in order to cope with a certain usage environment, the gain and offset values written in the EEPROM will be overwritten and will be lost. If you want to reset the gain and offset, send it back to the factory and set the gain and offset values again, or prepare your own high-precision voltage and current generators and reset the gain and offset. There was a problem that had to be.

【0019】また複数のレンジを入力レンジとして持つ
アナログモジュール、例えば−10V〜+10Vレン
ジ、0〜+10Vレンジ、−5V〜+5Vレンジ、0〜
+5Vレンジ、および+1V〜+5Vレンジというよう
に、1台で5つのレンジを持つアナログモジュールも存
在する。このようなアナログモジュールにおいては、各
レンジ毎にゲインとオフセットの値を持たせると、それ
らを書き込むために多くのEEPROM容量を必要と
し、高価なアナログモジュールになってしまうという問
題点があった。
An analog module having a plurality of ranges as input ranges, for example, -10V to + 10V range, 0 to + 10V range, -5V to + 5V range, 0 to
Some analog modules have five ranges, such as a +5 V range and a +1 V to +5 V range. In such an analog module, if gain and offset values are provided for each range, there is a problem that a large amount of EEPROM capacity is required to write the values and the analog module becomes expensive.

【0020】更に前述のように、従来のアナログモジュ
ールではコストやスペースの制約から、シリアルEEP
ROMが使われることが多く、データのリードやライト
に時間がかかるため、高速な変換スピードを持つアナロ
グモジュールができないという問題点があった。
Further, as described above, in the conventional analog module, the serial EEP
Since a ROM is often used and it takes time to read and write data, there is a problem that an analog module having a high conversion speed cannot be obtained.

【0021】本発明の課題は、上述の問題点に鑑み、任
意の時点でゲインとオフセットの値を工場から出荷され
た時に設定された精度に戻すことができ、またマルチレ
ンジモジュールに対しても工場出荷時において1つのレ
ンジだけに対応してゲインとオフセットを設定するだけ
でよく、更にデータのリードやライトを高速化できるア
ナログモジュールを提供することである。
SUMMARY OF THE INVENTION In view of the above problems, it is an object of the present invention to be able to return the gain and offset values to the accuracy set at the time of shipment from a factory at an arbitrary time, and also to a multi-range module. It is an object of the present invention to provide an analog module which can set a gain and an offset corresponding to only one range at the time of factory shipment, and can further speed up reading and writing of data.

【0022】[0022]

【課題を解決するための手段】図1は本発明の原理構成
ブロック図である。同図はアナログデータをシステム内
で利用しやすい範囲のディジタルデータとして処理する
ためのアナログモジュール、すなわちアナログ入力モジ
ュール、またはアナログ出力モジュールの原理構成ブロ
ック図である。
FIG. 1 is a block diagram showing the principle configuration of the present invention. FIG. 1 is a block diagram showing the principle configuration of an analog module for processing analog data as digital data in a range that can be easily used in the system, that is, an analog input module or an analog output module.

【0023】同図においてアナログモジュール1の内部
には、パラメータ記憶手段2およびパラメータコピー手
段5が備えられる。パラメータ記憶手段2は、例えば書
き換え可能なメモリとしてのEEPROMであって、ユ
ーザ用領域3とメーカ用領域4とを備えている。
In FIG. 1, a parameter storage means 2 and a parameter copy means 5 are provided inside the analog module 1. The parameter storage means 2 is, for example, an EEPROM as a rewritable memory, and includes a user area 3 and a maker area 4.

【0024】ユーザ用領域3は、入力値を出力値に変換
するためのパラメータとして、ユーザにより書き込まれ
るパラメータを格納するものであり、メーカ用領域4
は、例えば工場出荷時にメーカ側から書き込まれたパラ
メータであって、モジュール内に保持すべきパラメータ
を格納する領域である。
The user area 3 stores parameters written by the user as parameters for converting an input value to an output value.
Is an area for storing parameters to be stored in the module, for example, parameters written by the manufacturer at the time of factory shipment.

【0025】パラメータコピー手段5は、メーカ用領域
4に格納されているパラメータをユーザ用領域3にコピ
ーするものであり、このコピーは任意の時点で実行され
る。例えばユーザがアナログモジュールの使用開始時点
でメーカ用領域に格納されているパラメータを入力値を
出力値に変換するために使用するとすれば、そのパラメ
ータがパラメータコピー手段5によってユーザ用領域に
コピーされて使用される。
The parameter copying means 5 is for copying the parameters stored in the maker area 4 to the user area 3, and this copy is executed at any time. For example, if the user uses a parameter stored in the maker area to convert an input value to an output value at the time of starting use of the analog module, the parameter is copied to the user area by the parameter copy unit 5. used.

【0026】そして例えばある時点で、ユーザがユーザ
用領域3に格納されているパラメータ、例えばゲインと
オフセットの値とを書き換えてアナログモジュールを使
用したとしても、その後任意の時点で再度メーカ用領域
4に格納されているパラメータの値をユーザ用領域3に
コピーすることによって、再び工場出荷時に設定された
精度でアナログモジュールを使用することが可能とな
る。
For example, even if the user rewrites the parameters, for example, the gain and offset values stored in the user area 3 and uses the analog module at a certain point in time, the user again rewrites the manufacturer area 4 at an arbitrary point in time. Is copied to the user area 3, the analog module can be used again with the accuracy set at the time of factory shipment.

【0027】本発明の実施形態においては、ユーザによ
る誤操作としてのメーカ用領域4の書き換えを防止する
ために、メーカ用領域4に格納されているパラメータの
書き換えを外部、例えばシステムバスからゲイン書き込
みコマンドを受け取った時にのみ実行するメーカ用領域
書き換え制限手段を更に備えることもできる。
In the embodiment of the present invention, in order to prevent the maker area 4 from being rewritten as an erroneous operation by the user, the parameter stored in the maker area 4 is rewritten externally, for example, by a gain write command from a system bus. May be further provided.

【0028】また本発明の実施形態においては、入力値
の範囲を示すレンジとして複数のレンジに対応するため
に、外部、例えばユーザからのレンジ変更の指示を受け
て、メーカ用領域4に格納されているパラメータを用い
て、レンジ変更後に使用すべきパラメータの値を算出
し、ユーザ用領域3に格納するパラメータ補正手段を更
に備えることもできる。
In the embodiment of the present invention, in order to correspond to a plurality of ranges as ranges indicating input value ranges, the input values are stored in the maker area 4 in response to a range change instruction from a user, for example, a user. Parameter correction means for calculating the value of the parameter to be used after the range change by using the parameter which has been changed and storing the calculated value in the user area 3 may be further provided.

【0029】この場合、この複数のレンジが1つ以上の
電圧レンジと1つ以上の電流レンジとから構成され、ま
たメーカ用領域4が電圧用パラメータと電流用パラメー
タとを格納し、パラメータ補正手段が外部からのレンジ
変更の指示を受けて、変更後のレンジが電圧レンジと電
流レンジのいずれであるかに対応して、電圧用パラメー
タと電流用パラメータのいずれかを使用してレンジ変更
後に使用すべきパラメータの値を算出することもでき
る。
In this case, the plurality of ranges are composed of one or more voltage ranges and one or more current ranges, and the maker area 4 stores the voltage parameters and the current parameters. Receives the instruction to change the range from the outside, and uses either the voltage parameter or the current parameter according to whether the changed range is the voltage range or the current range. The value of the parameter to be calculated can also be calculated.

【0030】また本発明の実施形態において、アナログ
モジュール1はユーザ用領域3に格納されたパラメータ
がコピーされて格納される、パラメータ記憶手段2より
も高速に読み出し可能な高速パラメータ記憶手段を更に
備えることもできる。
Further, in the embodiment of the present invention, the analog module 1 further includes a high-speed parameter storage means which can copy and store the parameters stored in the user area 3 and which can be read out faster than the parameter storage means 2. You can also.

【0031】本発明のアナログモジュールは、例えばア
ナログ/ディジタル入力値をディジタル/アナログ値に
変換するアナログ入力/出力モジュールであり、また入
力値を出力値に変換するためのパラメータは、例えばそ
れぞれある入力値に対応するゲイン、オフセットであ
る。
The analog module according to the present invention is, for example, an analog input / output module for converting an analog / digital input value into a digital / analog value, and a parameter for converting an input value into an output value is, for example, a certain input. Gain and offset corresponding to the value.

【0032】本発明のアナログモジュールは、入力値を
出力値に変換するためのパラメータのユーザによる書き
換えを実行させないようにしたものとすることもでき
る。このようなアナログモジュールも、パラメータ記憶
手段とパラメータコピー手段とを備える。
The analog module according to the present invention may be configured such that a parameter for converting an input value to an output value is not rewritten by a user. Such an analog module also includes parameter storage means and parameter copy means.

【0033】パラメータ記憶手段は、入力値を出力値に
変換するためのパラメータを格納する変換用パラメータ
格納領域と、メーカ側から書き込まれたパラメータであ
って、モジュール内に保持すべきパラメータを格納する
メーカ用領域とを有し、書き換え可能なメモリによって
構成される。
The parameter storage means stores a conversion parameter storage area for storing a parameter for converting an input value into an output value, and a parameter which is written from the manufacturer and which should be held in the module. And a rewritable memory.

【0034】パラメータコピー手段は、メーカ用領域に
格納されているパラメータを変換用パラメータ格納領域
にコピーするものであり、これによって任意の時点でメ
ーカ用領域に格納されているパラメータを、入力値を出
力値に変換するために使用することが可能となる。
The parameter copying means copies the parameters stored in the maker area to the conversion parameter storage area, and thereby converts the parameters stored in the maker area at any time into input values. It can be used to convert to an output value.

【0035】このようなアナログモジュールにおいて、
入力値の範囲を示すレンジとして複数のレンジに対応す
るために、外部からのレンジ変更の指示を受けて、メー
カ用領域に格納されているパラメータを用いてレンジ変
更後に使用すべきパラメータの値を算出し、変換用パラ
メータ格納領域に格納するパラメータ補正手段と、外部
からの書込みコマンドを受け取った時にのみメーカ用領
域に格納されているパラメータの書き換えを実行する、
メーカ用領域書き換え手段とを更に備えることもでき
る。
In such an analog module,
In order to correspond to a plurality of ranges as ranges indicating input value ranges, in response to an external range change instruction, use the parameters stored in the manufacturer area to change the parameter values to be used after the range change. A parameter correction unit that calculates and stores the parameter in the conversion parameter storage area, and executes rewriting of the parameter stored in the maker area only when an external write command is received;
A maker area rewriting means may be further provided.

【0036】以上説明したように本発明によれば、一般
に工場出荷時に設定されたパラメータ、例えばゲインや
オフセットの値をユーザが書き換えてしまっても、任意
の時点でその値を再び使用することが可能となる。
As described above, according to the present invention, even if the user generally rewrites the parameters set at the time of factory shipment, for example, the values of gain and offset, the values can be used again at any time. It becomes possible.

【0037】[0037]

【発明の実施の形態】図2は本発明の第1の実施形態に
おけるアナログ入力モジュールの構成を示すブロック図
である。同図において、図14の従来例と同じ動作をす
る部分については説明を省略する。なお図2でユーザ設
定領域20と製造者設定領域21とが太線で示されてい
るが、これは請求項に対応した強調を示す。他の図でも
同様である。
FIG. 2 is a block diagram showing a configuration of an analog input module according to a first embodiment of the present invention. In the figure, the description of the parts performing the same operation as the conventional example of FIG. 14 is omitted. In FIG. 2, the user setting area 20 and the manufacturer setting area 21 are indicated by thick lines, which indicate emphasis corresponding to the claims. The same applies to other figures.

【0038】図2において図14と異なる点は、EEP
ROM19の中にユーザ設定領域20、および製造者設
定領域21が設けられ、ユーザ設定領域20にはゲイン
20aとオフセット20bとが格納され、また製造者設
定領域21にもゲイン21aおよびオフセット21bが
格納される点が基本的な相違である。
FIG. 2 is different from FIG.
A user setting area 20 and a manufacturer setting area 21 are provided in the ROM 19, and a gain 20a and an offset 20b are stored in the user setting area 20, and a gain 21a and an offset 21b are also stored in the manufacturer setting area 21. This is a fundamental difference.

【0039】この相違に対応して、ユーザ設定領域20
に対してゲイン、オフセットを設定するためのゲイン設
定23a、オフセット設定23b、製造者設定領域21
にゲイン、オフセットを設定するためのゲイン設定24
a、オフセット設定24b、およびユーザ設定領域20
に対する入力をゲイン設定23a、オフセット設定23
b側に接続するか、製造者設定領域21に格納されてい
るゲインとオフセットをコピーするために、製造者設定
領域側に接続するかを切り替えるスイッチ22a,22
bが備えられる。
In response to this difference, the user setting area 20
Setting 23a, offset setting 23b, and manufacturer setting area 21 for setting a gain and an offset for
Setting 24 for setting gain and offset to
a, offset setting 24b, and user setting area 20
Input to the gain setting 23a and the offset setting 23
switches 22a and 22 for switching between connection to the b side or connection to the manufacturer setting area to copy the gain and offset stored in the manufacturer setting area 21
b is provided.

【0040】またユーザ設定領域20、製造者設定領域
21に対するゲイン、オフセットの書き込みを制御する
モードとしての3つのモードを切り替えるモードスイッ
チ16が備えられる。ゲイン用押しボタンスイッチ1
7、オフセット用押しボタンスイッチ18は図14の従
来例における外部スイッチ56,57に相当し、これら
のスイッチが押された時に、A/D変換部12の出力値
としてのゲイン、オフセットがEEPROM19に格納
される。
A mode switch 16 for switching between three modes as a mode for controlling writing of a gain and an offset in the user setting area 20 and the manufacturer setting area 21 is provided. Push button switch for gain 1
7. The offset push button switch 18 corresponds to the external switches 56 and 57 in the conventional example of FIG. 14, and when these switches are pressed, the gain and offset as the output values of the A / D converter 12 are stored in the EEPROM 19. Is stored.

【0041】図2のアナログ入力モジュール10におい
て、EEPROM19の内部には前述のようにゲイン、
オフセットの値を設定するためのユーザ設定領域20と
製造者設定領域21とが設けられ、また3つのポジショ
ンを持ったモードスイッチ16が備えられる。モードス
イッチの3つのモード0,1、および2は押しボタンス
イッチ17、および18が押された時に次ような意味を
持つ。先ずモード0では、ユーザによってゲインとオフ
セットの設定が実行される。アナログモジュール10の
内部では、ユーザ設定領域20にゲイン20a、オフセ
ット20bが書き込まれる。
In the analog input module 10 shown in FIG.
A user setting area 20 for setting an offset value and a manufacturer setting area 21 are provided, and a mode switch 16 having three positions is provided. The three modes 0, 1, and 2 of the mode switch have the following meanings when the push button switches 17 and 18 are pressed. First, in mode 0, the user sets the gain and offset. Inside the analog module 10, the gain 20a and the offset 20b are written in the user setting area 20.

【0042】モード1では、製造者設定領域21に格納
されているゲイン21a、オフセット21bの値が、そ
れぞれスイッチ22a,22bを介してユーザ設定領域
20にコピーされる。
In mode 1, the values of the gain 21a and the offset 21b stored in the manufacturer setting area 21 are copied to the user setting area 20 via the switches 22a and 22b, respectively.

【0043】モード2では、製造者によってゲインとオ
フセットの設定が実行される。アナログモジュール10
の内部では、製造者設定領域21にゲインとオフセット
が書き込まれる。なおここでは3つのポジションを持つ
ロータリースイッチがモードスイッチ16として使用さ
れているが、この3つのモードを持たせることができれ
ば、ロータリースイッチ以外の他の種類のスイッチを使
用することもできる。
In the mode 2, the manufacturer sets the gain and offset. Analog module 10
Is written in the manufacturer setting area 21. Although a rotary switch having three positions is used as the mode switch 16 here, other types of switches other than the rotary switch can be used as long as the three modes can be provided.

【0044】図2において、ユーザがゲインとオフセッ
トの値をアナログ入力モジュール10の工場出荷時に書
き込まれた値、すなわち製造者設定領域21に格納され
ている値と異なる値に設定したい場合には、モードスイ
ッチ16を0の位置にして、ゲイン用押しボタンスイッ
チ17とオフセット用押しボタンスイッチ18を、アナ
ログ入力電圧の指定された値に対して押すことによっ
て、A/D変換部12の出力としてのゲイン、オフセッ
トの値がゲイン設定23a、オフセット設定23b、ス
イッチ22a,22bを介してユーザ設定領域20に書
き込まれる。工場出荷時のゲインとオフセットの値を使
用したい場合には、モードスイッチ16を1の位置とし
て、2つの押しボタンスイッチ17,18を押すことに
より、製造者設定領域21からゲインとオフセットの値
が読み出され、ユーザ設定領域20に格納される。
In FIG. 2, when the user wants to set the gain and offset values to the values written at the time of factory shipment of the analog input module 10, that is, the values different from the values stored in the manufacturer setting area 21, By setting the mode switch 16 to the 0 position and pressing the push button switch 17 for gain and the push button switch 18 for offset with respect to the specified value of the analog input voltage, the output of the A / D converter 12 is obtained. The values of the gain and the offset are written to the user setting area 20 via the gain setting 23a, the offset setting 23b, and the switches 22a and 22b. When it is desired to use the gain and offset values at the time of factory shipment, the mode switch 16 is set to the position 1 and the two push button switches 17 and 18 are pressed, so that the gain and offset values are set from the manufacturer setting area 21. It is read and stored in the user setting area 20.

【0045】図3は第2の実施形態におけるアナログ入
力モジュールの説明図である。同図においてアナログ入
力モジュールの構成は図2におけると同様であるが、シ
ステムバス14からの書込みコマンドが、製造者設定領
域21にゲインとオフセットの値を設定するためのゲイ
ン設定24a、オフセット設定24bに与えられる点が
異なっている。
FIG. 3 is an explanatory diagram of an analog input module according to the second embodiment. 2, the configuration of the analog input module is the same as that of FIG. 2, except that a write command from the system bus 14 is used to set a gain and an offset in the manufacturer setting area 21. Are different.

【0046】第1の実施形態における図2のアナログ入
力モジュール10においては、ユーザが誤ってモードス
イッチ16を2の位置にして、製造者設定領域21にゲ
インとオフセットの値を書き込むことも可能であり、こ
のようなユーザの誤操作によって製造者によって書き込
まれたゲインとオフセットの値が消されてしまうことの
ないように、アナログ入力モジュールの高信頼度化が図
られる。
In the analog input module 10 of FIG. 2 according to the first embodiment, the user can erroneously set the mode switch 16 to the position 2 and write the gain and offset values in the manufacturer setting area 21. Therefore, the reliability of the analog input module is improved so that the gain and offset values written by the manufacturer are not erased due to such erroneous operation by the user.

【0047】システムバス14からユーザに公開されて
いないゲイン書込み用のコマンド、オフセット書込み用
のコマンドを受けられるようにして、そのコマンドが入
力され、かつモードスイッチ16が2の位置にある時に
のみ、EEPROM19の製造者設定領域21にゲイ
ン、またはオフセットの書込みが可能なように、ゲイン
設定24a、オフセット設定24bが制御される。すな
わち、モードスイッチ16が2の位置にある時は、押し
ボタンスイッチ17、および18のオン/オフが無効と
され、ユーザが誤ってこれらのボタンを押してゲインと
オフセットの値を設定しようとしても、製造者設定領域
21に対するゲインとオフセットの書込みは行われな
い。
A command for gain writing and a command for offset writing, which are not disclosed to the user, can be received from the system bus 14. Only when the command is input and the mode switch 16 is in the position 2, The gain setting 24a and the offset setting 24b are controlled so that the gain or offset can be written in the manufacturer setting area 21 of the EEPROM 19. That is, when the mode switch 16 is in the position 2, the on / off of the push button switches 17 and 18 is invalidated, and even if the user accidentally presses these buttons to set the gain and offset values, Writing of the gain and the offset to the manufacturer setting area 21 is not performed.

【0048】製造者がゲインとオフセットの値を設定し
たい場合には、モードスイッチ16を2の位置にして、
かつシステムバス14からユーザに非公開のコマンドを
送り、あらかじめ定められたアナログ入力電圧を与えて
2つの押しボタンスイッチ17,18を押すことによっ
て、製造者設定領域21にゲイン、オフセットの値が書
き込まれる。
When the manufacturer wants to set the gain and offset values, set the mode switch 16 to the position 2 and
In addition, by sending a secret command to the user from the system bus 14 and applying a predetermined analog input voltage and pressing the two push-button switches 17 and 18, the gain and offset values are written in the manufacturer setting area 21. It is.

【0049】図4は第3の実施形態におけるアナログ入
力モジュールの説明図である。同図を第2の実施形態に
おける図3と比較すると、システムバス14側から書込
みコマンドに加えて動作レンジ設定のコマンドが与えら
れ、その動作レンジの設定値は、ユーザ設定領域20の
中にゲイン20a、オフセット20bに加えて動作レン
ジ20cとして格納される。また動作レンジの設定が変
更される時、ゲイン補正25a、オフセット補正25b
によって、製造者設定領域21に格納されているゲイン
21a、オフセット21b、および変更後の動作レンジ
20cが読み出され、レンジ変更後に使用されるべきゲ
インとオフセットの値が計算されて、ユーザ設定領域2
0にゲイン20a、オフセット20bとして格納され
る。
FIG. 4 is an explanatory diagram of an analog input module according to the third embodiment. 3 is compared with FIG. 3 in the second embodiment, an operation range setting command is given from the system bus 14 in addition to the write command. 20a, and stored as an operation range 20c in addition to the offset 20b. When the setting of the operating range is changed, the gain correction 25a, the offset correction 25b
Thus, the gain 21a, the offset 21b, and the changed operation range 20c stored in the manufacturer setting area 21 are read out, the gain and offset values to be used after the range change are calculated, and the user setting area is calculated. 2
0 is stored as the gain 20a and the offset 20b.

【0050】第3の実施形態においては、アナログ入力
モジュール10は複数のアナログ入力動作レンジを切り
替えて使用することができるマルチレンジアナログ入力
モジュールである。ユーザが動作レンジを変更したい
時、例えば0〜10Vレンジから0〜5Vレンジに変更
したい場合などには、ユーザ設定領域20に格納される
べきゲイン20a、オフセット20bの値としてはゲイ
ン補正25a、オフセット補正25bによって補正計算
が行われた結果が書き込まれる。この補正計算は実際に
はマイコン15によって実行されるものであるが、その
計算については後述する。
In the third embodiment, the analog input module 10 is a multi-range analog input module that can switch between a plurality of analog input operation ranges. When the user wants to change the operation range, for example, from 0 to 10 V range to 0 to 5 V range, the gain 20a and the offset 20b to be stored in the user setting area 20 are gain correction 25a, offset The result of the correction calculation performed by the correction 25b is written. This correction calculation is actually executed by the microcomputer 15, but the calculation will be described later.

【0051】製造者が製造者設定領域21に対してゲイ
ン21a、オフセット21bを書き込む時に、対応する
入力レンジを常に一定、例えば0〜10Vレンジとして
おくことによって、製造者設定領域21にゲイン、オフ
セットを設定した時の動作レンジをアナログ入力モジュ
ール10に記憶させておく必要はない。
When the manufacturer writes the gain 21 a and the offset 21 b in the manufacturer setting area 21, the corresponding input range is always kept constant, for example, in the range of 0 to 10 V, so that the gain and offset are written in the manufacturer setting area 21. It is not necessary to store in the analog input module 10 the operating range when is set.

【0052】図5は第3の実施形態における動作レンジ
設定コマンドの流れの説明図である。動作レンジ設定コ
マンドはユーザによって発行され、システムバス14を
経由して受信されるコマンドである。図5はコントロー
ラの全体図であるが、ここではCPUモジュール30に
実装されているアプリケーションプログラム31によっ
て動作レンジ設定コマンドが発行されている。
FIG. 5 is an explanatory diagram of the flow of the operation range setting command in the third embodiment. The operation range setting command is a command issued by the user and received via the system bus 14. FIG. 5 is an overall view of the controller. Here, an operation range setting command is issued by an application program 31 mounted on the CPU module 30.

【0053】アナログ入力モジュール10の内部のマイ
コン15はシステムバス14からのコマンドを解釈し、
動作レンジ設定コマンドであればEEPROMのユーザ
設定領域20の動作レンジ20cに設定すべき動作レン
ジを格納し、更に製造者設定領域21に格納されている
ゲイン、オフセットの値を読み出し、変更後の動作レン
ジに合わせた補正を行って、ユーザ設定領域20にゲイ
ン20a、オフセット20bとして格納する。なお動作
レンジが変更されてもA/D変換部12の変換特性(図
15の直線の傾き)は一定である。
The microcomputer 15 inside the analog input module 10 interprets a command from the system bus 14 and
If the command is an operation range setting command, the operation range to be set is stored in the operation range 20c of the user setting area 20 of the EEPROM, and the gain and offset values stored in the manufacturer setting area 21 are read out. Correction according to the range is performed, and stored as a gain 20a and an offset 20b in the user setting area 20. Note that the conversion characteristic of the A / D converter 12 (the slope of the straight line in FIG. 15) is constant even when the operating range is changed.

【0054】図6は第3の実施形態におけるゲインとオ
フセットの補正計算の説明図である。同図においてアナ
ログ入力モジュール10は5つの入力レンジを持ち、製
造者設定領域21には、その中で0〜+10Vの入力レ
ンジに対応したゲインの値がA、オフセットの値がBと
して格納されているものとする。ユーザが他の入力レン
ジに変更した時には、ユーザ設定領域に設定されるべき
ゲイン20a、20bの値として、図6に従って計算さ
れた値がゲイン補正25a、オフセット補正25bによ
って書き込まれる。AとBの値が、図15で説明したよ
うに例えば600,10であるとすると、図6において
下の3つのレンジに対応するゲインの値は305とな
り、また一番下のレンジに対応するオフセットの値は6
9となる。
FIG. 6 is an explanatory diagram of a gain and offset correction calculation in the third embodiment. In FIG. 1, the analog input module 10 has five input ranges, and a gain value corresponding to an input range of 0 to +10 V is stored as A and an offset value is stored as B in the manufacturer setting area 21. Shall be When the user changes to another input range, the values calculated according to FIG. 6 are written by the gain correction 25a and the offset correction 25b as the values of the gains 20a and 20b to be set in the user setting area. Assuming that the values of A and B are, for example, 600 and 10 as described with reference to FIG. 15, the gain value corresponding to the lower three ranges in FIG. 6 is 305 and corresponds to the lowest range. The offset value is 6.
It becomes 9.

【0055】図7はマイコン15によって実行されるゲ
イン補正とオフセット補正のフローチャートである。同
図において処理が開始されると、まずステップS1で動
作レンジ設定コマンドが受け取られ、ステップS2で新
しい動作レンジがユーザ設定領域20に対して動作レン
ジ20cとして書き込まれ、ステップS3で製造者設定
領域21の内部のゲイン21a、オフセット21b、す
なわちA,Bが読み出される。
FIG. 7 is a flowchart of the gain correction and the offset correction executed by the microcomputer 15. When the process is started in the figure, first, an operation range setting command is received in step S1, a new operation range is written as an operation range 20c in the user setting area 20 in step S2, and a manufacturer setting area is written in step S3. The gain 21a and the offset 21b inside A, that is, A and B are read.

【0056】そしてステップS4でユーザ設定領域20
に書き込むべきゲインの値がA,Bから算出され、ステ
ップS5で算出されたゲインの値がユーザ設定領域20
にゲイン20aとして書き込まれる。続いてステップS
6でユーザ設定領域に書き込むべきオフセットの算出が
行われ、ステップS7で算出されたオフセットがオフセ
ット20bとして書き込まれ、処理を終了する。
Then, in step S4, the user setting area 20
Is calculated from A and B, and the gain value calculated in step S5 is stored in the user setting area 20.
Is written as the gain 20a. Then step S
At 6, the offset to be written in the user setting area is calculated, the offset calculated at step S7 is written as the offset 20b, and the process ends.

【0057】図8〜図10はマルチレンジアナログモジ
ュールにおける入出力特性の例である。まず図8におい
て、−10V〜+10Vレンジの入出力特性は図15に
おけるシステムバスへの出力値と同じである。−5V〜
+5Vレンジでは、図6で説明したようにゲインの値は
305となり、例えば入力値としての+5Vに対応する
出力値は前述の(1)式によって500となり、この値
は上限値となる。
FIGS. 8 to 10 show examples of input / output characteristics in a multi-range analog module. First, in FIG. 8, the input / output characteristics in the -10 V to +10 V range are the same as the output values to the system bus in FIG. -5V ~
In the + 5V range, as described in FIG. 6, the gain value is 305. For example, the output value corresponding to + 5V as the input value is 500 according to the above-described equation (1), and this value is the upper limit value.

【0058】図9は0〜+5V、および0〜+10Vレ
ンジに対する入出力特性である。これらのレンジに対し
ては分解能が1,000となり、上限値は1,000、
下限値は0となる。
FIG. 9 shows input / output characteristics for the 0 to +5 V and 0 to +10 V ranges. The resolution is 1,000 for these ranges, the upper limit is 1,000,
The lower limit is 0.

【0059】図10は+1〜+5Vレンジに対する入出
力特性を示す。このレンジに対しては分解能が1,00
0、ゲインが前述のように305、オフセットが69と
なり、+1Vに対する出力値は下限値0、+5Vに対す
る出力値は上限値の1,000となる。
FIG. 10 shows input / output characteristics for the +1 to +5 V range. For this range, the resolution is
0, the gain is 305, and the offset is 69, as described above. The output value for +1 V is the lower limit value 0, and the output value for +5 V is the upper limit value of 1,000.

【0060】図11は第4の実施形態におけるアナログ
入力モジュールの説明図である。この第4の実施形態に
おいては、ユーザによるゲインとオフセットの設定は禁
止される。従って図2で説明したモードスイッチ16、
2つの押しボタンスイッチ17,18はアナログ入力モ
ジュール10から外され、製造者設定領域へのゲインと
オフセットの設定は、図3におけると同様に、例えば製
造者、またはサービスマンによってシステムバス14を
介して書込みコマンドが送られることによって実行され
る。
FIG. 11 is an explanatory diagram of an analog input module according to the fourth embodiment. In the fourth embodiment, the setting of the gain and the offset by the user is prohibited. Therefore, the mode switch 16 described in FIG.
The two push-button switches 17 and 18 are removed from the analog input module 10, and the setting of the gain and offset in the manufacturer setting area is performed via the system bus 14 by, for example, a manufacturer or a serviceman as in FIG. This is executed by sending a write command.

【0061】製造者設定領域21に格納されたゲインと
オフセットの値は、そのままユーザ設定領域20におけ
るゲイン20a、オフセット20bとしてコピーされて
使用されることも可能である。またユーザが動作レンジ
を変更した時には、第3の実施形態におけると同様にゲ
インとオフセットの補正計算が行われ、ユーザ設定領域
20に書き込まれる。前述と同様に製造者がゲイン、オ
フセットを製造者設定領域21に書き込む時の動作レン
ジを常に一定、例えば0〜10Vレンジで行うようにす
れば、アナログ入力モジュールにその動作レンジを記憶
させる必要はない。
The gain and offset values stored in the manufacturer setting area 21 can be copied and used as they are as the gain 20a and offset 20b in the user setting area 20. When the user changes the operating range, the gain and offset are corrected and calculated in the same manner as in the third embodiment, and written in the user setting area 20. As described above, if the operation range when the manufacturer writes the gain and offset in the manufacturer setting area 21 is always constant, for example, in the range of 0 to 10 V, it is not necessary to store the operation range in the analog input module. Absent.

【0062】図11においてはユーザがユーザ設定領域
のゲイン20a、オフセット20bの値を書き込むこと
はできず、ユーザがレンジを変更しても工場出荷時の製
造者によって書き込まれたゲイン21a、オフセット2
1bを用いて補正計算が行われ、その結果が変換値の加
工に使用されるため、ユーザによるレンジの変更が行わ
れても常に工場出荷時の高精度状態でアナログ入力モジ
ュールを使用することが可能となる。
In FIG. 11, the user cannot write the values of the gain 20a and the offset 20b in the user setting area. Even if the user changes the range, the gain 21a and the offset 2 written by the manufacturer at the time of shipment from the factory.
1b, the correction calculation is performed, and the result is used for processing the converted value. Therefore, even if the range is changed by the user, the analog input module can always be used in the high accuracy state at the time of shipment from the factory. It becomes possible.

【0063】図12は第5の実施形態におけるアナログ
入力モジュールの説明図である。第5の実施形態として
は、アナログ入力として電圧入力と電流入力との両方を
使用できるアナログ入力モジュールが用いられる。図1
2においてアナログ入力は入力部11の内部のオペアン
プ11aを介してA/D変換部12に与えられるが、オ
ペアンプ11aへの入力としては実質的に1MΩの両端
に与えられる電圧入力、または250Ωの両端に加えら
れる電流入力とのいずれかが用いられる。
FIG. 12 is an explanatory diagram of an analog input module according to the fifth embodiment. In the fifth embodiment, an analog input module that can use both a voltage input and a current input as an analog input is used. FIG.
2, the analog input is supplied to the A / D converter 12 via the operational amplifier 11a inside the input unit 11, and the input to the operational amplifier 11a is a voltage input substantially applied to both ends of 1 MΩ or both ends of 250Ω. Either the current input applied to the

【0064】電圧入力と電流入力との両方に対応するた
めに、製造者設定領域21の内部に電圧レンジ用ゲイン
21c、電流レンジ用ゲイン21d、電圧レンジ用オフ
セット21e、および電流レンジ用オフセット21fの
格納領域が設けられる。
In order to cope with both the voltage input and the current input, a voltage range gain 21c, a current range gain 21d, a voltage range offset 21e, and a current range offset 21f are provided inside the manufacturer setting area 21. A storage area is provided.

【0065】図12においてユーザからレンジを変更す
るためのレンジ設定コマンドがシステムバス14を介し
て入力されると、変更後のレンジが電流レンジであるか
電圧レンジであるかによって、電圧レンジ用ゲイン、電
圧レンジ用オフセット、あるいは電流レンジ用ゲイン、
電流レンジ用オフセットのいずれかが読み出され、変更
後の動作レンジに合わせた補正計算がなされ、ユーザ設
定領域20のゲイン20a、オフセット20bの値とし
て書き込まれる。
In FIG. 12, when a range setting command for changing the range is input from the user via the system bus 14, the gain for the voltage range depends on whether the changed range is the current range or the voltage range. , Offset for voltage range, or gain for current range,
One of the current range offsets is read out, a correction calculation is made in accordance with the changed operation range, and written as the values of the gain 20a and the offset 20b of the user setting area 20.

【0066】図13は第6の実施形態におけるアナログ
入力モジュールの説明図である。同図においては、例え
ば第5の実施形態における図12と比較すると、EEP
ROM19内のユーザ設定領域20と変換値加工13と
の間に、ランダムアクセスメモリ(RAM)32が備え
られている点が異なっている。
FIG. 13 is an explanatory diagram of an analog input module according to the sixth embodiment. In the figure, for example, when compared with FIG.
The difference is that a random access memory (RAM) 32 is provided between the user setting area 20 in the ROM 19 and the conversion value processing 13.

【0067】図13においては、例えばアナログ入力モ
ジュール10の使用開始時に、EEPROM19からユ
ーザ設定領域20に格納されているゲイン、オフセッ
ト、および動作レンジが読み出されてRAM32に格納
されることによって、通常の場合の変換値加工は、例え
ば製造者によって設定されたゲイン、オフセットの値を
用いて実行される。RAM32としてはワンチップマイ
コンに内蔵されているものを使用してもよく、またマイ
コンとは別個にRAMデバイスを置いてもよい。
In FIG. 13, for example, at the start of use of the analog input module 10, the gain, offset, and operating range stored in the user setting area 20 are read out from the EEPROM 19 and stored in the RAM 32 so that The conversion value processing in the case of is performed using, for example, gain and offset values set by the manufacturer. As the RAM 32, a built-in one-chip microcomputer may be used, or a RAM device may be provided separately from the microcomputer.

【0068】図13においては、A/D変換部12から
出力された値に対する変換値加工13において、読み出
しに時間のかかるEEPROM19からゲインとオフセ
ットの値を読み出すのではなく、高速に読出しの可能な
RAM32からゲインとオフセットの値を読み出すこと
ができ、処理を高速化することができる。
In FIG. 13, in the conversion value processing 13 for the value output from the A / D converter 12, the gain and offset values can be read at high speed, instead of reading the gain and offset values from the EEPROM 19 which takes a long time to read. The gain and offset values can be read from the RAM 32, and the processing can be speeded up.

【0069】以上の説明においては、アナログ入力信号
をシステム内で利用しやすい範囲のディジタル信号に変
換するアナログ入力モジュールを用いて発明の内容を説
明したが、本発明はアナログ入力モジュールに限定され
るものではなく、逆にディジタル信号をアナログ信号に
変換するアナログ出力モジュールに適用することも当然
可能である。
In the above description, the contents of the invention have been described using the analog input module that converts the analog input signal into a digital signal within a range that can be easily used in the system. However, the present invention is limited to the analog input module. Instead, the present invention can naturally be applied to an analog output module that converts a digital signal into an analog signal.

【0070】[0070]

【発明の効果】以上詳細に説明したように、本発明によ
ればユーザが使用環境に合わせてゲインとオフセットの
値を勝手に変更した後であっても、工場出荷時に設定さ
れたゲインとオフセットの値に戻すことができ、アナロ
グ入力モジュールの精度を保つことが可能になる。また
ユーザが外部スイッチの誤操作をしても、工場出荷時に
設定されたゲインやオフセットの値を壊すことなく、工
場出荷時の精度でアナログ入力モジュールを使用するこ
とができ、信頼性を高めることができる。
As described above in detail, according to the present invention, even after the user freely changes the gain and offset values according to the use environment, the gain and offset set at the time of shipment from the factory are set. , And the accuracy of the analog input module can be maintained. In addition, even if the user performs an erroneous operation of the external switch, the analog input module can be used with the factory accuracy without destroying the gain and offset values set at the time of factory shipment, thereby improving reliability. it can.

【0071】マルチレンジモジュールに対してユーザが
レンジの変更を行う時にも、自動的に工場出荷時と同じ
精度を保つことができる。また製造者は全てのレンジに
おいてゲインとオフセットを設定することなく、1つの
レンジだけに対応して設定しておくだけで、全てのレン
ジに対して精度を確保することができる。
When the user changes the range of the multi-range module, the same accuracy as that at the time of factory shipment can be automatically maintained. In addition, the manufacturer can secure the accuracy for all ranges only by setting the gain and offset for only one range without setting the gain and offset for all ranges.

【0072】また外部スイッチを設けないアナログモジ
ュールを使用すれば、価格を安くすることができ、かつ
動作レンジを変更してもゲインとオフセットの自動設定
が可能となるアナログモジュールが提供される。電圧レ
ンジと電流レンジの両方を備えているアナログモジュー
ルにおいてどちらのレンジを使用する場合でも、ユーザ
がゲイン、オフセットを使用環境に合わせて設定するこ
ともでき、またその後に工場出荷時の値に戻すこともで
きる。更に変換に使用するゲインやオフセットの値を高
速のメモリに格納しておくことによって、高速な変換が
可能となり、アナログモジュールの実用性の向上に寄与
するところが大きい。
If an analog module without an external switch is used, an analog module that can reduce the price and can automatically set the gain and offset even when the operating range is changed is provided. Regardless of which range is used in an analog module that has both a voltage range and a current range, the user can set the gain and offset according to the usage environment, and then return to the factory default values. You can also. Further, by storing gain and offset values used for conversion in a high-speed memory, high-speed conversion becomes possible, which greatly contributes to improvement of the practicality of the analog module.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の原理構成ブロック図である。FIG. 1 is a block diagram showing the principle configuration of the present invention.

【図2】本発明の第1の実施形態におけるアナログ入力
モジュールの説明図である。
FIG. 2 is an explanatory diagram of an analog input module according to the first embodiment of the present invention.

【図3】第2の実施形態におけるアナログ入力モジュー
ルの説明図である。
FIG. 3 is an explanatory diagram of an analog input module according to a second embodiment.

【図4】第3の実施形態におけるアナログ入力モジュー
ルの説明図である。
FIG. 4 is an explanatory diagram of an analog input module according to a third embodiment.

【図5】第3の実施形態における動作レンジ設定コマン
ドの流れを説明する図である。
FIG. 5 is a diagram illustrating a flow of an operation range setting command according to the third embodiment.

【図6】マルチレンジアナログモジュールにおけるゲイ
ンとオフセットの算出法の説明図である。
FIG. 6 is an explanatory diagram of a method of calculating a gain and an offset in a multi-range analog module.

【図7】第3の実施形態におけるゲインとオフセットの
補正処理のフローチャートである。
FIG. 7 is a flowchart of a gain and offset correction process according to the third embodiment.

【図8】マルチレンジアナログモジュール入出力特性
(その1)を示す図である。
FIG. 8 is a diagram showing input / output characteristics (1) of a multi-range analog module.

【図9】マルチレンジアナログモジュール入出力特性
(その2)を示す図である。
FIG. 9 is a diagram showing input / output characteristics (part 2) of a multi-range analog module.

【図10】マルチレンジアナログモジュール入出力特性
(その3)を示す図である。
FIG. 10 is a diagram showing input / output characteristics (part 3) of a multi-range analog module.

【図11】第4の実施形態におけるアナログ入力モジュ
ールの説明図である。
FIG. 11 is an explanatory diagram of an analog input module according to a fourth embodiment.

【図12】第5の実施形態におけるアナログ入力モジュ
ールの説明図である。
FIG. 12 is an explanatory diagram of an analog input module according to a fifth embodiment.

【図13】第6の実施形態におけるアナログ入力モジュ
ールの説明図である。
FIG. 13 is an explanatory diagram of an analog input module according to a sixth embodiment.

【図14】アナログ入力モジュールの従来例の説明図で
ある。
FIG. 14 is an explanatory diagram of a conventional example of an analog input module.

【図15】アナログ入力モジュールにおけるゲインとオ
フセットの説明図である。
FIG. 15 is an explanatory diagram of a gain and an offset in the analog input module.

【図16】マイコンとシリアルEEPROMの接続を説
明する図である。
FIG. 16 is a diagram illustrating connection between a microcomputer and a serial EEPROM.

【図17】シリアルEEPROMのアクセス例を示す図
である。
FIG. 17 is a diagram illustrating an access example of a serial EEPROM.

【符号の説明】[Explanation of symbols]

1 アナログモジュール 2 パラメータ記憶手段 3 ユーザ用領域 4 メーカ用領域 5 パラメータコピー手段 10 アナログ入力モジュール 11 入力部 12 A/D変換部 13 変換値加工 14 システムバス 15 マイコン 16 モードスイッチ 17 ゲイン用押しボタンスイッチ 18 オフセット用押しボタンスイッチ 19 EEPROM 20 ユーザ設定領域 21 製造者設定領域 30 CPUモジュール 31 アプリケーションプログラム 32 ランダムアクセスメモリ(RAM) DESCRIPTION OF SYMBOLS 1 Analog module 2 Parameter storage means 3 User area 4 Maker area 5 Parameter copy means 10 Analog input module 11 Input part 12 A / D conversion part 13 Conversion value processing 14 System bus 15 Microcomputer 16 Mode switch 17 Gain pushbutton switch 18 push button switch for offset 19 EEPROM 20 user setting area 21 manufacturer setting area 30 CPU module 31 application program 32 random access memory (RAM)

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 アナログデータをシステム内で利用しや
すい範囲のディジタルデータとして処理するためのアナ
ログモジュールにおいて、 入力値を出力値に変換するためのパラメータであってユ
ーザによって書き込まれるパラメータを格納するユーザ
用領域と、メーカ側から書き込まれたパラメータであっ
てモジュール内に保持すべきパラメータを格納するメー
カ用領域とを有するパラメータ記憶手段と、 該メーカ用領域に格納されているパラメータをユーザ用
領域にコピーするパラメータコピー手段とを備え、任意
の時点でメーカ用領域に格納されているパラメータを前
記入力値を出力値に変換するために使用可能とすること
を特徴とするアナログモジュール。
1. An analog module for processing analog data as digital data in a range which can be easily used in a system, wherein a user stores a parameter for converting an input value into an output value and which is written by a user. Parameter storage means having a storage area for storing parameters which are written from the maker side and which are to be held in the module; and storing the parameters stored in the storage area for the user in the storage area for the user. An analog module, comprising: parameter copying means for copying, wherein a parameter stored in a maker area can be used at any time to convert the input value into an output value.
【請求項2】 前記アナログモジュールにおいて、 前記パラメータ記憶手段が書き換え可能なメモリによっ
て構成されることを特徴とする請求項1記載のアナログ
モジュール。
2. The analog module according to claim 1, wherein in the analog module, the parameter storage unit includes a rewritable memory.
【請求項3】 前記アナログモジュールにおいて、 前記メーカ用領域に格納されているパラメータの書き換
えを、外部からの書き込みコマンドを受け取った時のみ
に実行するメーカ用領域書き換え制限手段を更に備える
ことを特徴とする請求項2記載のアナログモジュール。
3. The analog module according to claim 2, further comprising a maker area rewriting restricting means for executing rewriting of parameters stored in the maker area only when an external write command is received. 3. The analog module according to claim 2, wherein
【請求項4】 前記アナログモジュールにおいて、 前記入力値の範囲を示すレンジとして複数のレンジに対
応するために、外部からのレンジ変更の指示を受けて、
前記メーカ用領域に格納されているパラメータを用いて
レンジ変換後に使用すべきパラメータの値を算出し、前
記ユーザ用領域に格納するパラメータ補正手段を更に備
えることを特徴とする請求項2記載のアナログモジュー
ル。
4. In the analog module, in order to correspond to a plurality of ranges as a range indicating the range of the input value, the analog module receives a range change instruction from the outside,
3. The analog according to claim 2, further comprising a parameter correction unit that calculates a value of a parameter to be used after the range conversion using the parameter stored in the maker area, and stores the parameter value in the user area. module.
【請求項5】 前記複数のレンジが1つ以上の電圧レン
ジと1つ以上の電流レンジとから成ると共に、前記メー
カ用領域が電圧用パラメータと電流用パラメータとを格
納し、 前記パラメータ補正手段が、前記外部からのレンジ変更
の指示を受けて変更後のレンジが電圧レンジと電流レン
ジのいずれであるかに対応して、該電圧用パラメータと
電流用パラメータとのいずれかを使用してレンジ変更後
に使用すべきパラメータの値を算出することを特徴とす
る請求項4記載のアナログモジュール。
5. The plurality of ranges include one or more voltage ranges and one or more current ranges, and the maker area stores a voltage parameter and a current parameter. In response to the instruction to change the range from the outside, the range is changed using either the voltage parameter or the current parameter in accordance with whether the changed range is the voltage range or the current range. The analog module according to claim 4, wherein a value of a parameter to be used later is calculated.
【請求項6】 前記アナログモジュールにおいて、 前記ユーザ用領域に格納されたパラメータがコピーされ
て格納され、前記パラメータ記憶手段よりも高速に読出
し可能な高速パラメータ記憶手段を更に備えることを特
徴とする請求項1記載のアナログモジュール。
6. The analog module according to claim 1, further comprising a high-speed parameter storage unit in which parameters stored in the user area are copied and stored, and which can be read out faster than the parameter storage unit. Item 7. An analog module according to Item 1.
【請求項7】 前記入力値を出力値に変換するためのパ
ラメータがそれぞれある入力値に対応するゲイン、オフ
セットであることを特徴とする請求項1記載のアナログ
モジュール。
7. The analog module according to claim 1, wherein parameters for converting the input value into an output value are a gain and an offset respectively corresponding to a certain input value.
【請求項8】 アナログデータをシステム内で利用しや
すい範囲のディジタルデータとして処理するためのアナ
ログモジュールにおいて、 入力値を出力値に変換するためのパラメータを格納する
変換用パラメータ格納領域と、メーカ側から書き込まれ
たパラメータであってモジュール内に保持すべきパラメ
ータを格納するメーカ用領域とを有し、書き換え可能な
メモリによって構成されるパラメータ記憶手段と、 該メーカ用領域に格納されているパラメータを変換用パ
ラメータ格納領域にコピーするパラメータコピー手段と
を備え、任意の時点でメーカ用領域に格納されているパ
ラメータを前記入力値を出力値に変換するために使用可
能とすることを特徴とするアナログモジュール。
8. An analog module for processing analog data as digital data in a range which can be easily used in a system, comprising: a conversion parameter storage area for storing a parameter for converting an input value into an output value; A parameter storage means including a maker area for storing parameters to be held in the module, the parameters being written from the module, and a parameter storage means comprising a rewritable memory; Analog copying means for copying a parameter stored in a maker area at any time to convert the input value into an output value. module.
【請求項9】 前記アナログモジュールにおいて、 前記入力値の範囲を示すレンジとして複数のレンジに対
応するために、外部からのレンジ変更の指示を受けて前
記メーカ用領域に格納されているパラメータを用いてレ
ンジ変更後に使用すべきパラメータの値を算出し、前記
変換用パラメータ格納領域に格納するパラメータ補正手
段と、 前記メーカ用領域に格納されているパラメータの書き換
えを、外部からの書き込みコマンドを受け取った時のみ
に実行するメーカ用領域書き換え手段とを更に備えるこ
とを特徴とする請求項8記載のアナログモジュール。
9. The analog module uses a parameter stored in the maker area in response to an external range change instruction to correspond to a plurality of ranges as the range indicating the input value range. Parameter correction means for calculating the value of the parameter to be used after the range change and storing the parameter in the conversion parameter storage area, and rewriting the parameter stored in the maker area by receiving a write command from the outside. 9. The analog module according to claim 8, further comprising: a maker area rewriting means that executes only when the time has elapsed.
JP2000014535A 2000-01-24 2000-01-24 Analog module Expired - Lifetime JP3893830B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000014535A JP3893830B2 (en) 2000-01-24 2000-01-24 Analog module

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000014535A JP3893830B2 (en) 2000-01-24 2000-01-24 Analog module

Publications (2)

Publication Number Publication Date
JP2001203579A true JP2001203579A (en) 2001-07-27
JP3893830B2 JP3893830B2 (en) 2007-03-14

Family

ID=18541985

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000014535A Expired - Lifetime JP3893830B2 (en) 2000-01-24 2000-01-24 Analog module

Country Status (1)

Country Link
JP (1) JP3893830B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009122752A (en) * 2007-11-12 2009-06-04 Sharp Corp Electric equipment device and setting method for electric equipment device
WO2010137168A1 (en) * 2009-05-29 2010-12-02 三菱電機株式会社 Analog unit
JP2010288091A (en) * 2009-06-11 2010-12-24 Nec Toshiba Space Systems Ltd Pipeline type analog-digital converter, and method of correcting the same
US9729161B2 (en) 2012-05-11 2017-08-08 Mitsubishi Electric Corporation Analog converter and programmable logic controller system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009122752A (en) * 2007-11-12 2009-06-04 Sharp Corp Electric equipment device and setting method for electric equipment device
WO2010137168A1 (en) * 2009-05-29 2010-12-02 三菱電機株式会社 Analog unit
KR101209987B1 (en) 2009-05-29 2012-12-07 미쓰비시덴키 가부시키가이샤 analog unit
JP5159951B2 (en) * 2009-05-29 2013-03-13 三菱電機株式会社 Analog unit
US8547256B2 (en) 2009-05-29 2013-10-01 Mitsubishi Electric Corporation Analog unit
JP2010288091A (en) * 2009-06-11 2010-12-24 Nec Toshiba Space Systems Ltd Pipeline type analog-digital converter, and method of correcting the same
US9729161B2 (en) 2012-05-11 2017-08-08 Mitsubishi Electric Corporation Analog converter and programmable logic controller system

Also Published As

Publication number Publication date
JP3893830B2 (en) 2007-03-14

Similar Documents

Publication Publication Date Title
JP4011846B2 (en) Method for reconfiguring a programmable field mounted device and method for programming a field mounted device to perform a calculation process and programmable field mounted device
JPS6160443B2 (en)
US6327509B1 (en) Programmable controller data communications using variable names associated with data addresses
JP2001203579A (en) Analog module
JP2835107B2 (en) Error correction circuit for nonvolatile semiconductor memory device and error correction method thereof
JPH05217361A (en) Memory card
KR100223844B1 (en) Option circuit
US6148362A (en) Microcomputer using nonvolatile semiconductor memory to store user code/data
JP4891869B2 (en) A / D conversion unit
JPH07160392A (en) Key code variable keyboard
JPH04162300A (en) Semiconductor memory
US6320927B1 (en) Electronic counter
US4263658A (en) Electronic apparatus capable of storing operational sequence
JP3767646B2 (en) Electric motor control device provided with setting storage device for electric motor control constant
JP3912447B2 (en) Memory system and method of using external nonvolatile memory
JPH022435A (en) Semiconductor non-volatile memory device
JPH09231065A (en) Program changeable electronic controller
JP5196809B2 (en) Memory system
JP3022608B2 (en) Microcomputer program change device
JPH11237983A (en) One-chip microcomputer and entry method for accessing boot area in the one-chip microcomputer
JPH05143315A (en) Version up method for firmware
KR100504064B1 (en) Microcomputer
KR100213095B1 (en) Method for checking networking status of PLC
KR19990056159A (en) Emulation Apparatus and Method with EEPROM External Microcomputer
JPH0155504B2 (en)

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040218

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040713

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060704

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: 20061121

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061204

R150 Certificate of patent or registration of utility model

Ref document number: 3893830

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091222

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101222

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111222

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111222

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111222

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121222

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121222

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131222

Year of fee payment: 7

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term