JPH0778007A - Analog signal processor for programmable controller - Google Patents

Analog signal processor for programmable controller

Info

Publication number
JPH0778007A
JPH0778007A JP5162717A JP16271793A JPH0778007A JP H0778007 A JPH0778007 A JP H0778007A JP 5162717 A JP5162717 A JP 5162717A JP 16271793 A JP16271793 A JP 16271793A JP H0778007 A JPH0778007 A JP H0778007A
Authority
JP
Japan
Prior art keywords
output
value
memory
analog
unit
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
JP5162717A
Other languages
Japanese (ja)
Other versions
JP2914100B2 (en
Inventor
Masaki Tokunaga
雅樹 徳永
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP5162717A priority Critical patent/JP2914100B2/en
Publication of JPH0778007A publication Critical patent/JPH0778007A/en
Application granted granted Critical
Publication of JP2914100B2 publication Critical patent/JP2914100B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

PURPOSE:To prevent the time delay from the input to the output of an analog quantity from increasing by converting the signal from a controlled system from analog to digital, performing arithmetic operation by a method that the programmable controller indicates, and generating an analog output. CONSTITUTION:The sequence process part 11 of a CPU unit 10 mounted on a programmable controller(PC) main body executes a sequence program stored in a sequence program memory 12. An analog signal processor for PC, e.g. an analog input/output unit 14, on the other hand, is provided to the PC main body detachably and the process part 15 of this analog input/output unit 14 administers the whole operation of the analog input/output unit 14. Then the conversion output of an A/D conversion part 17 which converts the analog input signal inputted from the controlled system 1b into a digital signal is operated according to an indication from the PC main body and the analog output based upon the arithmetic result is outputted by a D/A conversion part 19 and an analog output part 1a.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、プログラマブルコン
トローラ本体に装着され、アナログ電圧またはアナログ
電流の制御を行うプログラマブルコントローラ用アナロ
グ信号処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an analog signal processing device for a programmable controller which is mounted on a programmable controller body and controls an analog voltage or an analog current.

【0002】[0002]

【従来の技術】従来の技術について説明する。図18
は、従来のアナログ入出力ユニットを用いたプログラマ
ブルコントローラ(以後PCと称する)の構成図であ
る。図において、170はプロゲラマブルコントローラ
本体に装着されたPCのCPUユニット、171はシー
ケンスプログラムを処理するシーケンス処理部、172
はシーケンスプログラムを格納するシーケンスプログラ
ムメモリ、173はアナログ入出力ユニットとデータの
授受を行うためのインタフェース部、174はアナログ
入出力ユニット、175はアナログ入出力ユニットの全
体の動作を管理する処理部、176はアナログ入出力ユ
ニット175がCPUユニット170にA/D変換値を
渡すためのA/D変換値メモリ、177はCPUユニッ
ト170がアナログ入出力ユニット175にD/A変換
値を渡す時に使用されるD/A変換値メモリ、178は
アナログ量をデジタル値に変換するA/D変換部、17
9はアナログ入力部、17aはデジタル値をアナログ量
に変換するD/A変換部、17bはアナログ出力部、1
7cはこの制御システムにおける制御対象物、17dは
アナログ入出力ユニット174のA/D変換部178お
よびD/A変換部17aのオフセット値およびゲイン値
の設定を行うためのスイッチ部である。
2. Description of the Related Art A conventional technique will be described. FIG.
FIG. 3 is a configuration diagram of a programmable controller (hereinafter referred to as a PC) using a conventional analog input / output unit. In the figure, 170 is a CPU unit of a PC attached to the main body of the programmable controller, 171 is a sequence processing unit for processing a sequence program, 172
Is a sequence program memory for storing a sequence program, 173 is an interface unit for exchanging data with the analog input / output unit, 174 is an analog input / output unit, 175 is a processing unit for managing the overall operation of the analog input / output unit, 176 is an A / D conversion value memory for the analog input / output unit 175 to transfer the A / D conversion value to the CPU unit 170, and 177 is used when the CPU unit 170 transfers the D / A conversion value to the analog input / output unit 175. A D / A conversion value memory 178, an A / D conversion unit 178 for converting an analog quantity into a digital value,
9 is an analog input section, 17a is a D / A conversion section for converting a digital value into an analog quantity, 17b is an analog output section, 1
Reference numeral 7c is an object to be controlled in this control system, and 17d is a switch unit for setting the offset value and the gain value of the A / D conversion unit 178 and the D / A conversion unit 17a of the analog input / output unit 174.

【0003】図19は、このシステムの制御をするため
のシーケンスプログラムの一例を示す図である。図にお
いて、181はアナログ入出力ユニット174からA/
D変換された値を読み取り、演算処理によりD/A変換
する値を算出後、アナログ入出力ユニット174のA/
D変換値メモリに書込むシーケンスプログラム、18
0、182はそれ以外の処理のためのシーケンスプログ
ラムである。
FIG. 19 is a diagram showing an example of a sequence program for controlling this system. In the figure, reference numeral 181 denotes A / A from the analog input / output unit 174.
After reading the D-converted value and calculating the value to be D / A converted by arithmetic processing, the A / A of the analog input / output unit 174 is calculated.
Sequence program to be written in the D conversion value memory, 18
Reference numerals 0 and 182 are sequence programs for other processing.

【0004】次に動作について説明する。まず、制御対
象物17cからのアナログ入力信号が変換され、A/D
変換値メモリ部176に格納されるまでの動作について
説明する。制御対象物17cの状態を示すアナログ信号
はアナログ入力部179に入力されたあとA/D変換部
178によりデジタル値に変換される。A/D変換され
た値はA/D変換値メモリ176に書込まれる。この一
連の処理は処理部175により順次繰り返され、アナロ
グ入力部179に入力されるアナログ信号量のデジタル
変換値が逐次A/D変換値メモリ176に格納される。
Next, the operation will be described. First, the analog input signal from the controlled object 17c is converted to A / D
The operation up to storage in the converted value memory unit 176 will be described. An analog signal indicating the state of the controlled object 17c is input to the analog input section 179 and then converted into a digital value by the A / D conversion section 178. The A / D converted value is written in the A / D converted value memory 176. This series of processing is sequentially repeated by the processing unit 175, and the digital conversion value of the analog signal amount input to the analog input unit 179 is sequentially stored in the A / D conversion value memory 176.

【0005】次に、シーケンス処理部171がA/D変
換されたデジタル値を取り込み、演算処理を行い、結果
をD/A変換値メモリ177に書込むまでの動作につい
て説明する。シーケンス処理部171は、シーケンスプ
ログラムメモリ172に格納されているプログラムの先
頭ステップから最終ステップまでを繰り返し処理するな
かで、図19に示すアナログ入出力ユニット用プログラ
ム181を処理する。このアナログ入出力ユニット用プ
ログラム181によりA/D変換された値がA/D変換
値メモリ176から読み取られ、四則演算などを組み合
わせた関数式を実行するプログラムによりD/A変換値
が算出され、D/A変換値メモリ177に書込まれる。
Next, the operation of the sequence processing unit 171 for fetching the A / D converted digital value, performing arithmetic processing, and writing the result in the D / A converted value memory 177 will be described. The sequence processing unit 171 processes the analog input / output unit program 181 shown in FIG. 19 while repeatedly processing the first step to the last step of the program stored in the sequence program memory 172. The value that is A / D converted by the analog input / output unit program 181 is read from the A / D converted value memory 176, and the D / A converted value is calculated by a program that executes a functional expression that combines four arithmetic operations, It is written in the D / A converted value memory 177.

【0006】ところで、一旦アナログ入出力ユニット用
プログラム181が実行された後、次にアナログ入出力
ユニット用プログラム181が実行されるまでには時間
の間隔がある。この間隔はシーケンス処理部171がシ
ーケンスプログラムの先頭ステップから最終ステップま
でを処理した後、再度先頭ステップの処理に戻って来る
までの周期時間に相当し、シーケンスプログラムの大き
さが大きくなるほどこの周期時間も長くなる。処理部1
75は、D/A変換値メモリ177に書かれたデジタル
値を周期的に読み出し、D/A変換部17aによりアナ
ログ量に変換後、アナログ出力部17bを介して制御対
象物17cに出力する処理を繰り返している。
By the way, after the analog input / output unit program 181 is once executed, there is a time interval until the analog input / output unit program 181 is executed next. This interval corresponds to the cycle time until the sequence processing unit 171 processes from the first step to the last step of the sequence program and returns to the processing of the first step again, and the cycle time increases as the size of the sequence program increases. Also becomes longer. Processing unit 1
Reference numeral 75 is a process for periodically reading the digital value written in the D / A conversion value memory 177, converting it into an analog amount by the D / A conversion unit 17a, and then outputting it to the controlled object 17c via the analog output unit 17b. Is repeated.

【0007】次に、A/D変換部178およびD/A変
換部17aのオフセット値およびゲイン値の設定につい
て説明する。まず、A/D変換部178のオフセット値
およびゲイン値の設定は、外部よりアナログ入力部17
9にオフセット値設定用の電圧0Vおよびゲイン値設定
用の電圧10Vを印加し、それぞれの場合においてスイ
ッチ部17dのオフセット設定スイッチ(図示せず)と
ゲイン設定スイッチ(図示せず)をONにすることによ
りA/D変換部178の変換出力がオフセット値および
ゲイン値としてオフセット/ゲイン記憶部1cに記憶さ
れる。D/A変換部17aのオフセット値およびゲイン
値の設定は、アナログ出力部17bに電圧計を接続し、
スイッチ部17dのアップ/ダウンスイッチ(図示せ
ず)によりアナログ出力部17bの出力電圧をオフセッ
ト値設定時は電圧0Vに、ゲイン値設定時は電圧10V
になるように調整する。そして、電圧0Vに調整された
ときスイッチ部17dのオフセット設定スイッチにより
D/A変換部17aの入力値をオフセット値としてオフ
セット/ゲイン記憶部1cに記憶し、電圧10Vに調整
されたときスイッチ部17dのゲイン設定スイッチによ
りD/A変換部17aの入力値をゲイン値としてオフセ
ット/ゲイン記憶部1cに記憶する。
Next, the setting of the offset value and the gain value of the A / D converter 178 and the D / A converter 17a will be described. First, the offset value and the gain value of the A / D conversion unit 178 are set from the outside by the analog input unit 17
The offset value setting voltage 0V and the gain value setting voltage 10V are applied to 9 and the offset setting switch (not shown) and the gain setting switch (not shown) of the switch unit 17d are turned ON in each case. As a result, the converted output of the A / D conversion unit 178 is stored in the offset / gain storage unit 1c as an offset value and a gain value. To set the offset value and the gain value of the D / A conversion unit 17a, connect a voltmeter to the analog output unit 17b,
The output voltage of the analog output unit 17b is set to 0V when the offset value is set and 10V when the gain value is set by the up / down switch (not shown) of the switch unit 17d.
Adjust so that When the voltage is adjusted to 0V, the offset setting switch of the switch unit 17d stores the input value of the D / A conversion unit 17a as an offset value in the offset / gain storage unit 1c, and when the voltage is adjusted to 10V, the switch unit 17d. The input value of the D / A conversion unit 17a is stored as a gain value in the offset / gain storage unit 1c by the gain setting switch.

【0008】[0008]

【発明が解決しようとする課題】従来のアナログ入出力
ユニット174は、制御対象物17cからのアナログ入
力量をデジタル値に変換する処理とデジタル値をアナロ
グ出力量に変換する処理のみを実行しており、アナログ
入力量に対するアナログ出力量を決定する演算処理はP
CのCPUユニットが行っている。このため、アナログ
入力量の変化に対してアナログ出力量が変化するまでの
遅れ時間は、A/D変換およびD/A変換に要する時間
とともにシーケンスプログラムが処理される周期時間に
大きく依存する。また、シーケンスプログラムが大きく
なればなるほどこの遅れ時間が長くなり、制御対象物1
7cを高速高精度に制御することが困難になるという問
題点があった。
The conventional analog input / output unit 174 executes only the process of converting the analog input amount from the controlled object 17c into a digital value and the process of converting the digital value into an analog output amount. And the calculation process for determining the analog output amount with respect to the analog input amount is P
The C CPU unit is doing this. Therefore, the delay time until the analog output amount changes with respect to the change of the analog input amount largely depends on the time required for the A / D conversion and the D / A conversion, as well as the cycle time for processing the sequence program. Also, the larger the sequence program, the longer this delay time becomes, and the controlled object 1
There is a problem that it is difficult to control 7c at high speed and with high precision.

【0009】また、従来のアナログ入出力ユニット17
4を用いて制御する場合、アナログ入力量に対するアナ
ログ出力量を決定するための演算処理はPCのシーケン
スプログラムによって行っており、このシーケンスプロ
グラムによる演算を行う場合、関数式中の複数の定数パ
ラメータを決定するためには、アナログ入力量とアナロ
グ出力量の関係にもとづきそれらを予め逆算して求めて
おかなければならないという問題点があった。
The conventional analog input / output unit 17
In the case of control using 4, the calculation process for determining the analog output amount with respect to the analog input amount is performed by the PC sequence program. When performing the calculation by this sequence program, a plurality of constant parameters in the function formula are set. In order to make the determination, there has been a problem that the analog input amount and the analog output amount have to be back-calculated in advance based on the relation between them to obtain them.

【0010】また、従来のアナログ入出力ユニット17
4においては、各アナログ入力チャネルまたはアナログ
出力チャネルについて、オフセット値およびゲイン値は
固定値にしか設定することができなかった。アナログ入
出力ユニット174では、その各チャネルのオフセット
値およびゲイン値の規定条件電圧または規定条件電流と
して0ー10Vまたは4ー20mAのいずれかが使用さ
れることが一般的である。従って、そのユニットの製造
者においては0ー10Vまたは4ー20mAのいずれか
によりオフセット値およびゲイン値を設定して出荷する
が、ユーザにおいて製造者の設定とは別の規定条件によ
るオフセット値およびゲイン値を設定して使用しようと
する場合がある。この場合、ユーザは再度オフセット値
およびゲイン値を設定しなおなさなければならないとい
う問題点があった。
The conventional analog input / output unit 17
In No. 4, the offset value and the gain value could only be set to fixed values for each analog input channel or analog output channel. In the analog input / output unit 174, it is general that either 0-10V or 4-20mA is used as the specified condition voltage or specified condition current of the offset value and gain value of each channel. Therefore, the manufacturer of the unit sets the offset value and the gain value by either 0-10V or 4-20mA before shipping, but the user sets the offset value and the gain value by the specified condition different from the manufacturer's setting. You may want to set and use a value. In this case, the user has to set the offset value and the gain value again.

【0011】また、従来アナログ入出力ユニット174
において、アナログ入力チャネルのオフセット値および
ゲイン値を設定する場合、外部よりオフセット値設定用
の電圧およびゲインち設定用の電圧、または、オフセッ
トち設定用の電流およびゲインち設定用の電流をアナロ
グ入力チャネルに印加した上で、ユニットに装備された
所定のスイッチをONにし、オフセット値およびゲイン
値を記憶させていた。一方、アナログ出力チャネルにお
いてはオフセット値およびゲイン値を設定する場合、ユ
ニットに装備されたスイッチにより出力される電圧また
は電流を増減させた上で、別の所定のスイッチをONに
することによりオフセット値およびゲイン値をそれぞれ
を記憶させていた。すなわち、アナログ入力チャネルお
よびアナログ出力チャネルのどちらのオフセット値およ
びゲイン値の設定においても人手によるスイッチの操作
が必要であるという問題点があった。
The conventional analog input / output unit 174 is also used.
In setting the offset value and gain value of the analog input channel, the voltage for offset value setting and the voltage for gain setting, or the current for offset setting and the current for gain setting are input from the outside. After being applied to the channel, a predetermined switch equipped in the unit was turned on to store the offset value and the gain value. On the other hand, when setting offset and gain values for analog output channels, increase or decrease the voltage or current output by the switch equipped on the unit, and then turn on another specified switch to set the offset value. And gain values were stored respectively. That is, there has been a problem that manual operation of the switch is required to set the offset value and the gain value of both the analog input channel and the analog output channel.

【0012】この発明は、上述のような問題点を解消す
るためになされたもので、アナログ量の入力から出力ま
での時間遅れの増大を防止することを目的とする。
The present invention has been made to solve the above-mentioned problems, and an object thereof is to prevent an increase in the time delay from the input to the output of an analog amount.

【0013】また、アナログ入力量とアナログ出力量の
関係を示す関数式の設定が容易にできることを目的とす
る。
It is another object of the present invention to facilitate setting of a functional expression showing the relationship between the analog input amount and the analog output amount.

【0014】また、オフセット値およびゲイン値の設定
または設定変更が容易にできることを目的とする。
Another object is to easily set or change the offset value and the gain value.

【0015】また、オフセット値またはゲイン値が容易
に設定できることを目的とする。
Another object is to easily set the offset value or the gain value.

【0016】[0016]

【課題を解決するための手段】この発明に係るプログラ
マブルコントローラ用アナログ信号処理装置は、シーケ
ンスプログラムにもとづき動作するプログラマブルコン
トローラ本体に着脱可能に設けられるプログラマブルコ
ントローラ用アナログ信号処理装置であって、制御対象
物より入力されるアナログ入力信号をデジタル信号に変
換するA/D変換手段と、このA/D変換手段の変換出
力に対しプログラマブルコントローラ本体からの指示に
もとづく所定の関数式により演算を行う演算手段と、こ
の演算手段の演算出力にもとづくアナログ出力を制御対
象物に出力する出力手段と、を備えるようにしたもので
ある。
A programmable controller analog signal processing device according to the present invention is a programmable controller analog signal processing device detachably provided in a programmable controller main body which operates based on a sequence program. A / D conversion means for converting an analog input signal input from an object into a digital signal, and an operation means for performing an operation on a converted output of the A / D conversion means by a predetermined functional expression based on an instruction from the programmable controller main body. And an output means for outputting an analog output based on the arithmetic output of the arithmetic means to the controlled object.

【0017】また、プログラマブルコントローラ本体よ
り送られてくる座標情報であって、一方の軸をアナログ
入力量とし他方の軸をアナログ出力量とする座標上の複
数の点を示す座標情報にもとづき、この複数の点間を結
ぶ所定数の直線を示す関数式を算出する関数式算出手段
を有するようにしたものである。
Further, based on the coordinate information sent from the programmable controller main body, the coordinate information indicating a plurality of points on the coordinate where one axis is an analog input amount and the other axis is an analog output amount. A function formula calculating means for calculating a function formula showing a predetermined number of straight lines connecting a plurality of points is provided.

【0018】また、プログラマブルコントローラ本体か
らの指令にもとづき、プログラマブルコントローラ本体
からの指令値または演算手段の演算出力のいずれかを選
択出力する選択手段を有し、出力手段は選択手段の選択
出力にもとづくアナログ出力を制御対象物に出力するよ
うにしたものである。
Further, it has a selecting means for selectively outputting either the command value from the programmable controller main body or the arithmetic output of the arithmetic means based on the instruction from the programmable controller main body, and the output means is based on the selective output of the selecting means. The analog output is output to the controlled object.

【0019】また、A/D変換のオフセット値およびゲ
イン値と、D/A変換のオフセット値およびゲイン値を
記憶する記憶手段を複数有し、この複数の記憶手段から
選択された記憶手段の記憶内容にもとづきオフセット値
およびゲイン値を設定するようにしたものである。
Further, a plurality of storage means for storing the offset value and the gain value of the A / D conversion and the offset value and the gain value of the D / A conversion are provided, and the storage means selected from the plurality of storage means is stored. The offset value and the gain value are set based on the contents.

【0020】また、プログラマブルコントローラ本体か
らの指令によりD/A変換手段の変換出力を読取可能な
電圧読取手段または電流読取手段と、プログラマブルコ
ントローラ本体の指令にもとづき所定の電圧値または電
流値を出力し、この出力をA/D変換手段に入力する定
電圧電源または定電流電源と、定電圧電源または定電流
電源が所定の電圧値または電流値を出力したときのA/
D変換手段の変換出力をA/D変換のオフセット値また
はゲイン値として記憶手段に書込むとともに、プログラ
マブルコントローラ本体より電圧読取手段または電流読
取手段の読取出力にもとづきD/A変換手段への入力値
を増減する指令が出され、電圧読取手段または電流読取
手段により所定電圧値または所定電流値が読取られたと
きの入力値をD/A変換のオフセット値またはゲイン値
として記憶手段に書込む書込手段と、を有するようにし
たものである。
Further, a voltage reading unit or a current reading unit capable of reading the converted output of the D / A converting unit according to a command from the programmable controller main body, and a predetermined voltage value or current value is output based on the command from the programmable controller main body. , A constant voltage power supply or constant current power supply for inputting this output to the A / D conversion means, and A / D when the constant voltage power supply or constant current power supply outputs a predetermined voltage value or current value.
The converted output of the D conversion means is written in the storage means as an offset value or gain value of the A / D conversion, and the input value to the D / A conversion means based on the read output of the voltage reading means or the current reading means from the programmable controller main body. A command to increase or decrease the value is issued, and the input value when the predetermined voltage value or the predetermined current value is read by the voltage reading unit or the current reading unit is written in the storage unit as an offset value or gain value for D / A conversion. And means.

【0021】[0021]

【作用】この発明におけるプログラマブルコントローラ
用アナログ信号処理装置は、制御対象物より入力される
アナログ入力信号をデジタル信号に変換するA/D変換
手段の変換出力に対し、プログラマブルコントローラ本
体からの指示にもとづく所定の関数式により演算手段が
演算を行い、この演算結果にもとづくアナログ出力を制
御対象物に出力する。
The analog signal processing device for a programmable controller according to the present invention is based on an instruction from the programmable controller main body with respect to the conversion output of the A / D conversion means for converting the analog input signal input from the controlled object into a digital signal. The calculation means performs a calculation according to a predetermined functional expression, and outputs an analog output based on the calculation result to the control target.

【0022】また、プログラマブルコントローラ本体よ
り送られてくる座標情報であって、一方の軸をアナログ
入力量、他方の軸をアナログ出力量とする座標上の複数
の点を示す座標情報にもとづき、この複数の点間を結ぶ
所定数の直線を示す関数式が関数式算出手段により算出
される。
Further, based on the coordinate information sent from the programmable controller main body, the coordinate information indicating a plurality of points on the coordinate having one axis as an analog input amount and the other axis as an analog output amount, The function formula calculating unit calculates a function formula indicating a predetermined number of straight lines connecting a plurality of points.

【0023】また、プログラマブルコントローラ本体か
らの指令にもとづき、選択手段がプログラマブルコント
ローラ本体からの指令値または演算手段の演算出力のい
ずれかを選択出力し、出力手段はこの選択出力にもとづ
くアナログ出力を制御対象物に出力する。
Further, based on the command from the programmable controller main body, the selecting means selectively outputs either the command value from the programmable controller main body or the arithmetic output of the arithmetic means, and the output means controls the analog output based on this selective output. Output to the target.

【0024】また、A/D変換のオフセット値およびゲ
イン値と、D/A変換のオフセット値およびゲイン値を
記憶する記憶手段を複数有し、この複数の記憶手段から
選択的された記憶手段の記憶内容にもとづきオフセット
値およびゲイン値が設定される。
Further, a plurality of storage means for storing the offset value and the gain value of the A / D conversion and the offset value and the gain value of the D / A conversion are provided, and the storage means selected from the plurality of storage means are provided. The offset value and the gain value are set based on the stored contents.

【0025】また、プログラマブルコントローラ本体の
指令にもとづき、定電圧電源または定電流電源が所定の
電圧値または電流値をA/D変換手段に入力したとき、
書込手段によりA/D変換手段の変換出力がA/D変換
のオフセット値またはゲイン値として記憶手段に書込ま
れるとともに、電圧読取手段または電流読取手段により
読取られたD/A変換手段の変換出力にもとづきプログ
ラマブルコントローラ本体からD/A変換手段への入力
値を増減する指令が出され、D/A変換手段の変換出力
が所定電圧値または所定電流値になったときのD/A変
換手段の入力値がD/A変換のオフセット値またはゲイ
ン値として書込手段により記憶手段に書込まれる。
Further, when the constant voltage power supply or the constant current power supply inputs a predetermined voltage value or current value to the A / D conversion means based on a command from the programmable controller main body,
The writing output writes the converted output of the A / D conversion means to the storage means as an offset value or gain value of the A / D conversion, and the conversion of the D / A conversion means read by the voltage reading means or the current reading means. A command to increase or decrease the input value to the D / A converting means is issued from the programmable controller main body based on the output, and the D / A converting means when the converted output of the D / A converting means reaches a predetermined voltage value or a predetermined current value. The input value of is written in the storage means by the writing means as an offset value or gain value for D / A conversion.

【0026】[0026]

【実施例】【Example】

実施例1.図1は、この発明によるアナログ入出力ユニ
ットを用いた制御システムの構成図である。図におい
て、10はプログラマブルコントローラ本体に装着され
たPCのCPUユニット、11はシーケンスプログラム
を処理するシーケンス処理部、12はシーケンスプログ
ラムを格納しておくシーケンスプログラムメモリ、13
はアナログ入出力ユニットとデータの授受を行うための
インタフェース部、14はプログラマブルコントローラ
本体に装着されたプログラマブルコントローラ用アナロ
グ信号処理装置、例えば、アナログ入出力ユニットであ
る。15はアナログ入出力ユニット14の全体の動作を
管理する処理部、16はPCのCPUユニット10とデ
ータの授受を行うためのデユアルポートメモリ、17は
アナログ量をデジタル値に変換するA/D変換手段、例
えば、A/D変換部である。18はアナログ入力部、1
9はデジタル値をアナログ量に変換するD/A変換部、
1aはアナログ出力部、1bは制御対象物、11cはオ
フセット値およびゲイン値を記憶するオフセット/ゲイ
ン記憶部である。なお、演算手段は処理部15により具
現され、出力手段はD/A変換部19およびアナログ出
力部1aにより構成される。
Example 1. FIG. 1 is a block diagram of a control system using an analog input / output unit according to the present invention. In the figure, 10 is a CPU unit of a PC mounted on the programmable controller main body, 11 is a sequence processing unit for processing a sequence program, 12 is a sequence program memory for storing the sequence program, 13
Is an interface unit for exchanging data with the analog input / output unit, and 14 is an analog signal processing device for a programmable controller mounted on the programmable controller main body, for example, an analog input / output unit. Reference numeral 15 is a processing unit that manages the overall operation of the analog input / output unit 14, 16 is a dual port memory for exchanging data with the CPU unit 10 of the PC, and 17 is A / D conversion that converts an analog amount into a digital value. Means, for example, an A / D converter. 18 is an analog input section, 1
9 is a D / A converter that converts a digital value into an analog quantity,
Reference numeral 1a is an analog output unit, 1b is a controlled object, and 11c is an offset / gain storage unit that stores an offset value and a gain value. The arithmetic means is embodied by the processing unit 15, and the output means is composed of the D / A conversion unit 19 and the analog output unit 1a.

【0027】図2は、図1のデユアルポートメモリ16
の内部構成図である。図において、20はアナログ入力
量を変換したデジタル値を格納するA/D変換値メモ
リ、21はアナログ出力するためのデジタル値がCPU
ユニット10のシーケンス処理部11により書込まれる
CPU用D/A変換値メモリ、22はアナログ入出力ユ
ニット14の処理部15がアナログ入力量から関数式に
基づき算出した値を格納する演算結果格納メモリ、23
はアナログ出力の出力を許可するか否かを示す情報が格
納されるD/A出力許可メモリ、24はオフセット/ゲ
イン記憶部11cに記憶されているオフセット値および
ゲイン値のうちいずれを選択するかを示す情報が格納さ
れるオフセット/ゲイン選択メモリ、25はCPU用D
/A変換値値メモリ21と演算結果格納メモリ22のい
ずれに格納されている値を出力するかを指定する情報が
格納される出力切換メモリ、26は関数式中の定数パラ
メータAを格納する定数パラメータAメモリ、27は関
数式中の定数パラメータBを格納する定数パラメータB
メモリである。
FIG. 2 shows the dual port memory 16 of FIG.
FIG. In the figure, 20 is an A / D conversion value memory that stores a digital value obtained by converting an analog input amount, and 21 is a CPU that has a digital value for analog output.
A CPU D / A conversion value memory written by the sequence processing unit 11 of the unit 10, and a calculation result storage memory 22 for storing a value calculated by the processing unit 15 of the analog input / output unit 14 from the analog input amount based on a functional expression. , 23
Is a D / A output permission memory in which information indicating whether or not to permit the output of analog output is stored, and 24 is which of the offset value and the gain value stored in the offset / gain storage unit 11c is selected. Offset / gain selection memory that stores information indicating
The output switching memory stores information that specifies which of the A / A converted value memory 21 and the operation result storage memory 22 outputs the value, and 26 is a constant that stores the constant parameter A in the function formula. Parameter A memory, 27 is a constant parameter B for storing constant parameter B in the function formula
It is a memory.

【0028】28はアナログ入力量1メモリ、29はア
ナログ出力量1メモリ、2aはアナログ入力量2メモ
リ、2bはアナログ出力量2メモリ、2cはアナログ入
力量3メモリ、2dはアナログ出力量3メモリであり、
それぞれアナログ入力量とアナログ出力量の関係を示す
値が格納される。2eはA/D変換を選択するかD/A
変換を選択するか指定する情報が格納されるA/D,D
/A変換メモリ、2fはオフセット値を記憶するか否か
を示す情報が格納されるオフセット指令メモリ、2gは
ゲイン値を記憶するか否かを示す情報が格納されるゲイ
ン指令メモリ、2hはD/A変換部のオフセット/ゲイ
ン設定中においてアナログ出力量を増加させるか否かを
示す情報が格納される出力ダウン指令メモリ、2iはD
/A変換部のオフセット/ゲイン設定中においてアナロ
グ出力量を減少させるか否かを示す情報が格納される出
力ダウン指令メモリである。
28 is an analog input amount 1 memory, 29 is an analog output amount 1 memory, 2a is an analog input amount 2 memory, 2b is an analog output amount 2 memory, 2c is an analog input amount 3 memory, 2d is an analog output amount 3 memory. And
A value indicating the relationship between the analog input amount and the analog output amount is stored. 2e selects A / D conversion or D / A
A / D, D that stores information to select or specify conversion
/ A conversion memory, 2f is an offset command memory in which information indicating whether to store an offset value is stored, 2g is a gain command memory in which information indicating whether to store a gain value is stored, 2h is D An output down command memory 2i for storing information indicating whether to increase the analog output amount while the offset / gain of the A / A converter is being set, 2i is D
The output down command memory stores information indicating whether or not to reduce the analog output amount during offset / gain setting of the / A converter.

【0029】図3は、シーケンス処理部11により実行
されるシーケンスプログラムを示す図である。図におい
て、30はCPUの内部レジスタD0に数値ー1を書き
込む命令、31は内部レジスタD1に数値4000を書
き込む命令、32は内部レジスタD0および内部レジス
タD1に格納されている値を、それぞれ定数パラメータ
Aメモリ26および定数パラメータBメモリ27に書き
込む命令、33はD/A出力許可メモリ23にD/A出
力を許可する情報を書き込む命令である。
FIG. 3 is a diagram showing a sequence program executed by the sequence processing unit 11. In the figure, 30 is an instruction to write the numerical value -1 to the internal register D0 of the CPU, 31 is an instruction to write the numerical value 4000 to the internal register D1, 32 is a constant parameter for the values stored in the internal register D0 and the internal register D1, respectively. A command for writing to the A memory 26 and the constant parameter B memory 27, and a command for writing 33 to the D / A output permission memory 23 are information for permitting D / A output.

【0030】次に、動作について説明する。シーケンス
処理部11は、電源投入後1回ONするデバイス34が
ONした時、図3の命令30、命令31、命令32が実
行され、定数パラメータAメモリ26および定数パラメ
ータBメモリ27にそれぞれ数値ー1、4000が定数
パラメータA、定数パラメータBとして書き込まれる。
その後、制御開始デバイス35がONの間、命令33に
よりD/A出力許可メモリ23にD/A出力を許可する
情報が書き込まれる。
Next, the operation will be described. When the device 34, which is turned on once after the power is turned on, is turned on, the sequence processing unit 11 executes the instruction 30, the instruction 31, and the instruction 32 in FIG. 3, and the numerical values are stored in the constant parameter A memory 26 and the constant parameter B memory 27, respectively. 1, 4000 are written as constant parameter A and constant parameter B.
Thereafter, while the control start device 35 is ON, the instruction 33 writes information for permitting D / A output to the D / A output permission memory 23.

【0031】図4は、図1の処理部15により実行され
る処理のフロー図である。図において、40は図1のA
/D変換部17により変換されたデジタル値を取り込む
処理、41は取り込んだA/D変換値をA/D変換値メ
モリ20に書き込む処理、42は定数パラメータAメモ
リ26および定数パラメータBメモリ27に格納されて
いる定数パラメータAおよび定数パラメータBを取り込
む処理、43はA/D変換された値をxとして定数パラ
メータAと定数パラメータBを用い、y=Ax+Bの演
算を行う処理、44は演算結果のyを演算結果格納メモ
リ22に書き込む処理、45はD/A出力許可メモリ2
3の内容を読み出し、この内容がD/A出力を許可する
情報であるか否かを判断する処理、46は結果のyをア
ナログ出力するための値としてD/A変換部19に設定
する処理である。
FIG. 4 is a flow chart of processing executed by the processing unit 15 of FIG. In the figure, 40 is A in FIG.
A process of loading the digital value converted by the / D conversion unit 17, a process of writing the acquired A / D conversion value in the A / D conversion value memory 20, and a reference number 42 in the constant parameter A memory 26 and the constant parameter B memory 27. A process of fetching the stored constant parameter A and constant parameter B, 43 is a process of calculating y = Ax + B using the constant parameter A and constant parameter B with the A / D converted value as x, and 44 is a calculation result Process y for writing y in the calculation result storage memory 22, 45 is the D / A output permission memory 2
The process of reading the contents of No. 3 and judging whether the contents are the information permitting the D / A output, the process of setting 46 of the result y in the D / A conversion unit 19 as a value for analog output Is.

【0032】アナログ入出力ユニットの処理部15は、
この図4に示されるフロー図に従い処理される。まず、
処理部15は、処理40、処理41、処理42によりア
ナログ入力部18に入力されているアナログ入力量をA
/D変換部17によりデジタル値に変換し、A/D変換
値メモリ20に書き込み、また、定数パラメータAメモ
リ26および定数パラメータBメモリ27から定数パラ
メータA、および、定数パラメータBを読み出し、これ
を取り込む。次に、処理43において処理40により得
たディジタル量に変換されたアナログ入力量xを関数式 y=Ax+B に代入し、アナログ出力量yを算出する。そして、処理
44によりこのyの値を演算結果格納メモリ22に格納
する。
The processing section 15 of the analog input / output unit is
Processing is performed according to the flow chart shown in FIG. First,
The processing unit 15 determines the analog input amount input to the analog input unit 18 by the process 40, the process 41, and the process 42 as A.
The / D conversion unit 17 converts it to a digital value and writes it in the A / D converted value memory 20, and also reads out the constant parameter A and the constant parameter B from the constant parameter A memory 26 and the constant parameter B memory 27. take in. Next, in process 43, the analog input amount x converted into the digital amount obtained in process 40 is substituted into the functional expression y = Ax + B to calculate the analog output amount y. Then, the value of y is stored in the calculation result storage memory 22 by the process 44.

【0033】次に、処理45によりD/A出力許可メモ
リ23の記憶内容がD/A出力を許可する情報であるか
否かを判定する。否であれば、処理40に戻り、D/A
出力を許可する情報であれば演算結果のyをD/A変換
部19を通してアナログ出力量として出力する。この実
施例1によれば、アナログ量の入力から出力までの処理
時間はシーケンスプログラムの実行周期に依存しなくな
るので、この処理時間の増大が防止される。
Next, in process 45, it is determined whether or not the contents stored in the D / A output permission memory 23 are information permitting D / A output. If not, the process returns to step 40 and D / A
If it is information that permits output, the y of the calculation result is output as an analog output amount through the D / A conversion unit 19. According to the first embodiment, the processing time from the input to the output of the analog amount does not depend on the execution cycle of the sequence program, so that the processing time is prevented from increasing.

【0034】実施例2.図5は、この発明の他の実施例
におけるアナログ入出力ユニットにより制御を行うとき
のアナログ入力量と出力量の関係を示す図である。図に
おいて、横軸はアナログ入力量、縦軸はアナログ出力
量、各軸上の数字はグラフ上のA、BおよびC点の位置
を示す各軸のアナログ入力量または出力量であり、括弧
内はそれらアナログ量をデジタル化した数値である。
Example 2. FIG. 5 is a diagram showing the relationship between the analog input amount and the output amount when control is performed by the analog input / output unit in another embodiment of the present invention. In the figure, the horizontal axis is the analog input amount, the vertical axis is the analog output amount, and the numbers on each axis are the analog input amount or output amount of each axis indicating the positions of points A, B, and C on the graph, in parentheses. Is a digitized value of those analog quantities.

【0035】図6はPCのCPUユニット10のシーケ
ンスプログラムメモリ12に格納されているシーケンス
プログラムを示す図である。図において、60はCPU
ユニット10の内部レジスタD0に数値0を書き込む命
令、61は内部レジスタD1に数値4000を書き込む
命令、62は内部レジスタD2に数値1000を書き込
む命令、63は内部レジスタD3に数値2000を書き
込む命令、64は内部レジスタD4に数値4000を書
き込む命令、65は内部レジスタD5に数値500を書
き込む命令、66は内部レジスタD0から内部レジスタ
D5に格納されている数値を、それぞれアナログ入力量
1メモリ28、アナログ出力量1メモリ29、アナログ
入力量2メモリ2a、アナログ出力量2メモリ2b、ア
ナログ入力量3メモリ2c、アナログ出力量3メモリ2
dに書き込む命令、67はD/A出力許可メモリ23に
D/A出力を許可する情報を書き込む命令である。な
お、関数式算出手段は処理部15により具現される。
FIG. 6 is a diagram showing a sequence program stored in the sequence program memory 12 of the CPU unit 10 of the PC. In the figure, 60 is a CPU
An instruction to write the number 0 to the internal register D0 of the unit 10, 61 to write a number 4000 to the internal register D1, 62 to write a number 1000 to the internal register D2, 63 to write a number 2000 to the internal register D3, 64 Is an instruction to write a numerical value 4000 to the internal register D4, 65 is an instruction to write a numerical value 500 to the internal register D5, 66 is a numerical value stored in the internal register D0 to the internal register D5, respectively, for the analog input amount 1 memory 28 and analog output. Ability 1 memory 29, analog input amount 2 memory 2a, analog output amount 2 memory 2b, analog input amount 3 memory 2c, analog output amount 3 memory 2
Reference numeral 67 is a command for writing in d, and 67 is a command for writing information for permitting D / A output in the D / A output permitting memory 23. The functional formula calculating means is embodied by the processing unit 15.

【0036】次に動作について説明する。図1のシーケ
ンス処理部11は、電源投入後1回ONするデバイス6
8がONした時、命令60から命令66によりアナログ
入力量1メモリ28、アナログ出力量1メモリ29、ア
ナログ入力量2メモリ2a、アナログ出力量2メモリ2
b、アナログ入力量3メモリ2c、および、アナログ出
力量3メモリ2dにそれぞれ所定の数値を書き込む。こ
こで、アナログ入力量1メモリ28およびアナログ出力
量1メモリ29に書き込む数値は図5上の点Aの位置を
示す値であり、アナログ入力量のデジタル変換値が0の
時デジタル値4000のアナログ出力量が出力される事
を示す。
Next, the operation will be described. The sequence processing unit 11 of FIG. 1 is a device 6 that is turned on once after power is turned on.
When 8 is turned on, the analog input amount 1 memory 28, the analog output amount 1 memory 29, the analog input amount 2 memory 2a, the analog output amount 2 memory 2 are instructed by the instruction 60 to the instruction 66.
b, a predetermined numerical value is written in each of the analog input amount 3 memory 2c and the analog output amount 3 memory 2d. Here, the numerical value to be written in the analog input amount 1 memory 28 and the analog output amount 1 memory 29 is a value indicating the position of the point A in FIG. 5, and when the digital conversion value of the analog input amount is 0, the analog value is the analog value 4000. Indicates that the output amount is output.

【0037】同様にアナログ入力量2メモリ2aおよび
アナログ出力量2メモリ2bとアナログ入力量3メモリ
2cおよびアナログ出力量3メモリ2dは、図5上の点
Bおよび点Cの位置を示す。アナログ入力量1メモリ2
8、アナログ出力量1メモリ29、アナログ入力量2メ
モリ2a、アナログ出力量2メモリ2b、アナログ入力
量3メモリ2c、および、アナログ出力量3メモリ2d
の値を設定後、シーケンス処理部11は制御開始デバイ
ス69がONの間、D/A出力許可メモリ23にアナロ
グ入出力ユニット14からの出力許可を示す情報を書き
込む。
Similarly, the analog input amount 2 memory 2a, the analog output amount 2 memory 2b, the analog input amount 3 memory 2c, and the analog output amount 3 memory 2d indicate the positions of points B and C on FIG. Analog input amount 1 Memory 2
8, analog output amount 1 memory 29, analog input amount 2 memory 2a, analog output amount 2 memory 2b, analog input amount 3 memory 2c, and analog output amount 3 memory 2d
After setting the value of, the sequence processing unit 11 writes the information indicating the output permission from the analog input / output unit 14 in the D / A output permission memory 23 while the control start device 69 is ON.

【0038】図7は、アナログ入出力ユニットの内部処
理のフロー図である。図において、70はアナログ入力
量をデジタル値に変換する処理、71は処理70により
変換されたデジタル値をA/D変換値メモリ20に書き
込む処理、72はアナログ入力量1メモリ28、アナロ
グ出力量1メモリ29、アナログ入力量2メモリ2a、
アナログ出力量2メモリ2b、アナログ入力量3メモリ
2c、および、アナログ出力量3メモリ2dの値を取り
込み、アナログ入力量からアナログ出力量を算出する為
の関数式を生成する処理、73は処理72にて生成され
た関数式に、処理70にて変換されたデジタル値を代入
し、アナログ出力するための値を算出する処理、74は
処理73にて算出された結果を演算結果格納メモリ22
に格納する処理、75はD/A出力許可メモリ23の内
容がD/A出力を許可する情報であるか否かを判別し、
否であれば処理70に戻り、D/A出力を許可する情報
であれば処理76に進む処理、76は処理73にて算出
された結果をD/A変換部19によりアナログ出力量に
変換する処理である。
FIG. 7 is a flow chart of the internal processing of the analog input / output unit. In the figure, 70 is a process of converting an analog input amount into a digital value, 71 is a process of writing the digital value converted by the process 70 into the A / D converted value memory 20, 72 is an analog input amount 1 memory 28, an analog output amount. 1 memory 29, analog input amount 2 memory 2a,
The process 73 of taking in the values of the analog output amount 2 memory 2b, the analog input amount 3 memory 2c, and the analog output amount 3 memory 2d, and generating a functional expression for calculating the analog output amount from the analog input amount, 73 is a process 72 A process of substituting the digital value converted in the process 70 into the functional expression generated in the process 70 to calculate a value for analog output, and 74 represents the result calculated in the process 73 in the calculation result storage memory 22.
Processing for storing the information in the D / A output permission memory 23 is determined whether or not the content of the D / A output permission memory 23 is information for permitting D / A output,
If not, the process returns to step 70, and if the information permits the D / A output, the process proceeds to step 76. In step 76, the D / A converter 19 converts the result calculated in step 73 into an analog output amount. Processing.

【0039】図1のアナログ入出力ユニット14の処理
部15は、この図7に示すフロー図により処理される。
処理70では、図1のアナログ入力部18に入力されて
いるアナログ量をデジタル値に変換し、処理71で図2
のA/D変換値メモリ20に書き込む。処理72では図
2のアナログ入力量1メモリ28、アナログ出力量1メ
モリ29、アナログ入力量2メモリ2a、アナログ出力
量2メモリ2b、アナログ入力量3メモリ2c、およ
び、アナログ出力量3メモリ2dに書かれている値より
関数式を生成する。
The processing section 15 of the analog input / output unit 14 of FIG. 1 is processed according to the flow chart shown in FIG.
In process 70, the analog amount input to the analog input unit 18 of FIG. 1 is converted into a digital value, and in process 71, the analog amount of FIG.
Of the A / D converted value memory 20. In the process 72, the analog input amount 1 memory 28, the analog output amount 1 memory 29, the analog input amount 2 memory 2a, the analog output amount 2 memory 2b, the analog input amount 3 memory 2c, and the analog output amount 3 memory 2d in FIG. Generate a functional expression from the written value.

【0040】まず、アナログ入力量1メモリ28および
アナログ出力量1メモリ29と、アナログ入力量2メモ
リ2aおよびアナログ出力量2メモリ2bより1次式を
求める。図6のシーケンスプログラムによりアナログ入
力量1メモリ28、アナログ出力量1メモリ29、アナ
ログ入力量2メモリ2a、アナログ出力量2メモリ2b
にはそれぞれ数値0、4000、1000、2000が
書かれているので、これらの数値より y=(ー2)x+4000 (関数式1) が得られる。次に、同様にしてアナログ入力量2メモリ
2a、アナログ出力量2メモリ2b、アナログ入力量3
メモリ2c、アナログ出力量3メモリ2dに書かれてい
る数値より y=(−0.5)x+2500 (関数式2) が得られる。関数式1および関数式2において、xはア
ナログ入力量のデジタル変換値、yは演算結果であり、
アナログ量に変換されるデジタル値である。
First, a linear expression is obtained from the analog input amount 1 memory 28 and the analog output amount 1 memory 29, and the analog input amount 2 memory 2a and the analog output amount 2 memory 2b. By the sequence program of FIG. 6, analog input amount 1 memory 28, analog output amount 1 memory 29, analog input amount 2 memory 2a, analog output amount 2 memory 2b
Since the numerical values 0, 4000, 1000, and 2000 are written in each of them, y = (− 2) x + 4000 (functional expression 1) is obtained from these numerical values. Next, similarly, the analog input amount 2 memory 2a, the analog output amount 2 memory 2b, the analog input amount 3
Y = (− 0.5) x + 2500 (functional expression 2) is obtained from the numerical values written in the memory 2c and the analog output amount 3 memory 2d. In the functional expressions 1 and 2, x is a digital conversion value of the analog input amount, y is a calculation result,
It is a digital value that is converted into an analog quantity.

【0041】次に、処理73では処理70で得られたデ
ィジタル値に変換されたアナログ入力量を処理72で生
成した関数式に代入しアナログ出力量を求める。まず、
ディジタル値に変換されたアナログ入力量とアナログ入
力量2メモリ2aに書かれている値との比較を行い、デ
ィジタル値に変換されたアナログ入力量がアナログ入力
量2メモリ2aの値未満の場合は関数式1を用いて演算
を行い、それ以上の場合は関数式2を用いて演算を行
う。処理74では、処理73で得た演算結果を演算結果
格納メモリ22に書き込む。処理75では、D/A出力
許可メモリ23にD/A出力を許可する情報が書き込ま
れているか否かを判定し、書き込まれていれば処理76
に進むが、書き込まれていなければ処理70に戻る。処
理76では、処理73で算出した結果を図1のD/A変
換部19に入力してアナログ量に変換し、アナログ出力
部1aを介して制御対象物1bに出力する。このように
して、この実施例2によればアナログ入力量とアナログ
出力量の関係を示す関数式の設定が容易にできる。
Next, in process 73, the analog input amount converted into the digital value obtained in process 70 is substituted into the functional expression generated in process 72 to obtain the analog output amount. First,
The analog input amount converted into a digital value is compared with the value written in the analog input amount 2 memory 2a. If the analog input amount converted into a digital value is less than the value of the analog input amount 2 memory 2a, The calculation is performed using the function expression 1, and if it is more than that, the calculation is performed using the function expression 2. In process 74, the calculation result obtained in process 73 is written in the calculation result storage memory 22. In the process 75, it is determined whether or not the information permitting the D / A output is written in the D / A output permission memory 23, and if it is written, the process 76.
If not, the process returns to step 70. In process 76, the result calculated in process 73 is input to the D / A conversion unit 19 in FIG. 1 to be converted into an analog amount, which is output to the controlled object 1b via the analog output unit 1a. As described above, according to the second embodiment, it is possible to easily set the functional expression indicating the relationship between the analog input amount and the analog output amount.

【0042】実施例3.上述した実施例1または実施例
2におけるようにアナログ入出力ユニット14がPCの
シーケンスプログラムに依存せずアナログ入力量からア
ナログ出力量を算出し、これを出力する場合は、電源投
入時等の始動時にアナログ出力量は出力が無い状態から
アナログ入力量から算出される出力量まで一瞬にして変
化するので制御対象物1bに衝撃を与えることがある。
この実施例3は、このような始動時におけるアナログ出
力量の急変等を防止することを目的とする。図8は、こ
の発明の実施例3におけるPCのCPUユニットのシー
ケンスプログラムを示す図である。図において、80は
CPUの内部レジスタD0に数値ー1を書き込む命令、
81はCPUの内部レジスタD1に数値4000を書き
込む命令、82は内部レジスタD0および内部レジスタ
D1に格納されている数値をそれぞれ定数パラメータA
メモリ26および定数パラメータBメモリ27に書き込
む命令、83はD/A出力許可メモリ23にD/A出力
を許可する情報を書き込む命令、84はアナログ入出力
ユニット14による演算結果を出力する間、M0をON
にする命令、85は出力切換えメモリ25に出力を切換
える情報を書き込む命令、86は内部レジスタD2にア
ナログ出力量として出力すべき任意の値を書き込む命
令、87は内部レジスタD2に書き込まれている値をC
PU用D/A変換値メモリ21に書き込む命令である。
なお、選択手段は処理部15により具現される。
Example 3. As in the first or second embodiment described above, the analog input / output unit 14 calculates the analog output amount from the analog input amount without depending on the sequence program of the PC, and when outputting the analog output amount, it is started when the power is turned on. Sometimes, the analog output amount changes in an instant from the state in which there is no output to the output amount calculated from the analog input amount, which may give a shock to the controlled object 1b.
The purpose of the third embodiment is to prevent such a sudden change in the analog output amount at the time of starting. FIG. 8 is a diagram showing a sequence program of the CPU unit of the PC according to the third embodiment of the present invention. In the figure, 80 is an instruction to write the numerical value -1 to the internal register D0 of the CPU,
81 is an instruction to write a numerical value 4000 to the internal register D1 of the CPU, and 82 is a constant parameter A for the numerical values stored in the internal register D0 and the internal register D1, respectively.
An instruction to write to the memory 26 and the constant parameter B memory 27, 83 to write information to permit D / A output to the D / A output permission memory 23, and 84 to output M0 while the calculation result by the analog input / output unit 14 is output. ON
, 85 is a command for writing information for switching the output to the output switching memory 25, 86 is a command for writing an arbitrary value to be output as an analog output amount to the internal register D2, and 87 is a value written in the internal register D2. To C
This is an instruction to write in the D / A conversion value memory 21 for PU.
The selection unit is embodied by the processing unit 15.

【0043】次に動作について説明する。シーケンス処
理部11は、電源投入後1回ONするデバイス88がO
Nした時、図8の命令80、命令81、命令82により
定数パラメータAメモリ26および定数パラメータBメ
モリ27にそれぞれ定数値ー1、4000を定数パラメ
ータA、定数パラメータBとして書き込むとともに、出
力許可デバイス89がONになっている間、D/A出力
許可メモリ23にD/A出力を許可する情報が書き込ま
れ、アナログ出力が許可される。
Next, the operation will be described. In the sequence processing unit 11, the device 88 which is turned on once after the power is turned on is turned on.
When it is N, the constant value -1, 4000 is written as the constant parameter A and the constant parameter B in the constant parameter A memory 26 and the constant parameter B memory 27 by the instruction 80, the instruction 81, and the instruction 82 of FIG. While 89 is ON, the information permitting D / A output is written in the D / A output permission memory 23, and the analog output is permitted.

【0044】次に、命令85によりアナログ出力をシー
ケンスプログラムにより書き込まれた値とするかアナロ
グ入出力ユニット内にて算出された値とするかが制御さ
れる。すなわち、M0信号がOFFの間は、出力切換え
メモリ25がOFFになり(すなわち、出力切換メモリ
25にシーケンスプログラムにより書き込まれた値を出
力するように指定する情報が書き込まれ)、命令86、
命令87によりCPU用D/A変換メモリ21にアナロ
グ量として出力される値が書き込まれる。M0信号が自
動制御開始デバイス8aによりONになると、出力切換
えメモリ25をONにする(すなわち、出力切換メモリ
25にアナログ入出力ユニット14で算出した値を出力
するように指定する情報が書き込まれる)。
Next, the instruction 85 controls whether the analog output is the value written by the sequence program or the value calculated in the analog input / output unit. That is, while the M0 signal is OFF, the output switching memory 25 is OFF (that is, the information designating to output the value written by the sequence program is written in the output switching memory 25), and the instruction 86,
The value output as the analog amount is written in the D / A conversion memory for CPU 21 by the instruction 87. When the M0 signal is turned on by the automatic control start device 8a, the output switching memory 25 is turned on (that is, the information designating to output the value calculated by the analog input / output unit 14 is written in the output switching memory 25). .

【0045】図9は、図1の処理部15により実行され
る処理のフロー図である。図において、90はA/D変
換部21により変換されたデジタル値を取り込む処理、
91は取り込んだA/D変換値をA/D変換値メモリ2
0に書き込む処理、92は定数パラメータAメモリ26
および定数パラメータBメモリ27に格納されている定
数パラメータAおよび定数パラメータBを取り込む処
理、93は定数パラメータA、定数パラメータB、およ
び、A/D変換された値を、関数式y=Ax+Bに代入
し、アナログ量として出力するデジタル値yを得る処理
である。
FIG. 9 is a flow chart of the processing executed by the processing unit 15 of FIG. In the figure, 90 is a process for fetching the digital value converted by the A / D conversion unit 21,
91 is the A / D converted value memory 2 for the imported A / D converted value
Processing for writing 0, 92 is a constant parameter A memory 26
And constant parameter B processing for fetching the constant parameter A and the constant parameter B stored in the memory 27, 93 substitutes the constant parameter A, the constant parameter B, and the A / D converted value into the functional expression y = Ax + B Then, it is a process of obtaining a digital value y to be output as an analog amount.

【0046】94は処理93にて得たyを演算結果格納
メモリ22に書き込む処理、95はD/A出力許可メモ
リ23の内容を読み出すとともに、この読み出された内
容がD/A出力を許可する情報であるか否かを判断する
処理、96は出力切換えメモリ25の内容を読み出すと
ともに、この読み出された内容が処理94で得た値を出
力する情報であるか、または、CPUユニット10から
CPU用D/A変換値メモリ21に書き込まれた値を出
力するかを判断する処理、97は演算結果格納メモリ2
2の内容をD/A変換しアナログ量として出力する処
理、98はCPU用D/A変換値メモリ21の内容をD
/A変換しアナログ量として出力する処理である。
Reference numeral 94 is a processing for writing y obtained in the processing 93 in the operation result storage memory 22, and 95 is for reading the contents of the D / A output permission memory 23, and the read contents permit the D / A output. Processing for determining whether or not it is information to be processed, 96 reads the content of the output switching memory 25, and whether the read content is the information for outputting the value obtained in the processing 94, or the CPU unit 10 Processing for determining whether to output the value written in the CPU D / A converted value memory 21,
A process of D / A converting the contents of No. 2 and outputting as an analog amount, 98 is the contents of the D / A conversion value memory for CPU 21 being D
This is a process of A / A conversion and outputting as an analog amount.

【0047】図1のアナログ入出力ユニット14の処理
部15は、この図9のフロー図に示すように処理され
る。まず、処理90、処理91により図1のアナログ入
力部18に入力されるアナログ量がデジタル値に変換さ
れA/D変換値メモリ20に書き込まれる。次に処理9
2、処理93、処理94により定数パラメータAメモリ
26および定数パラメータBメモリ27に設定された定
数パラメータAおよび定数パラメータBを用い関数式y
=Ax+Bにディジタル値に変換されたアナログ入力量
を代入し、結果yを演算結果格納メモリ22に書き込
む。処理95はD/A出力許可メモリ23の内容がD/
A出力を許可する情報であるか否かを判定し、否であれ
ばアナログ量の出力はせず処理90に戻るが、D/A出
力を許可する情報であれば処理96に進む。
The processing section 15 of the analog input / output unit 14 of FIG. 1 is processed as shown in the flow chart of FIG. First, in process 90 and process 91, the analog amount input to the analog input unit 18 of FIG. 1 is converted into a digital value and written in the A / D converted value memory 20. Next process 9
2. Using the constant parameter A and the constant parameter B set in the constant parameter A memory 26 and the constant parameter B memory 27 by the processing 93 and the processing 94, the functional expression y
The analog input amount converted into the digital value is substituted into = Ax + B, and the result y is written in the calculation result storage memory 22. In the process 95, the contents of the D / A output permission memory 23 are D / A.
Whether or not the information permits the A output is determined. If not, the process returns to the process 90 without outputting the analog amount, but if the information permits the D / A output, the process proceeds to the process 96.

【0048】処理96では出力切換えメモリ25の内容
を読み出す。もし、図8の命令85により出力切換メモ
リ25が演算結果格納メモリ22の内容をD/A変換し
出力することを示す情報であれば処理97に進み、出力
切換メモリ25がCPU用D/A変換値メモリの内容を
D/A変換し出力することを示す情報であれば処理98
に進む。処理97では処理93により算出され演算結果
格納メモリ22に格納された値をD/A変換されアナロ
グ量として出力する。処理98では図8の命令86、命
令87により書き込まれた値をD/A変換されアナログ
量として出力する。この実施例3によれば、CPU用D
/A変換値メモリに格納されている所定のディジタル量
にもとづくアナログ量を予め出力した後に、演算結果格
納メモリ22の内容にもとづくアナログ量を出力するこ
とができるので始動時におけるアナログ出力量の急変等
を防止することができる。
In process 96, the contents of the output switching memory 25 are read. If it is the information indicating that the output switching memory 25 D / A converts the contents of the operation result storage memory 22 and outputs it by the instruction 85 of FIG. 8, the process proceeds to step 97, where the output switching memory 25 is the CPU D / A. If the information indicates that the contents of the converted value memory are D / A converted and output, the process 98
Proceed to. In process 97, the value calculated in process 93 and stored in the calculation result storage memory 22 is D / A converted and output as an analog amount. In process 98, the values written by the commands 86 and 87 in FIG. 8 are D / A converted and output as analog quantities. According to the third embodiment, D for CPU
Since the analog amount based on the content of the calculation result storage memory 22 can be output after the analog amount based on the predetermined digital amount stored in the / A converted value memory is output in advance, the analog output amount changes suddenly at the time of starting. Etc. can be prevented.

【0049】実施例4.次に、この発明のさらに他の実
施例について説明する。図10は、図1のA/D変換部
17の内部構成を示す図である。図において、100は
アナログ入力電圧をこのアナログ入力電圧の大きさに比
例した周波数を有するパルス列に変換するV/F変換
器、101は一定時間内においてV/F変換器100か
ら出力されるパルスをカウントするカウンタである。図
11は図1のD/A変換部19の内部構成を示す図であ
る。図において、110は入力される定電圧量をゲート
制御信号がONの間、出力するゲート回路である。11
1はゲート回路110より出力される信号である一定周
期ごとに入力される定電圧量(パルス)を積分して電圧
量に変換する積分回路である。
Example 4. Next, still another embodiment of the present invention will be described. FIG. 10 is a diagram showing an internal configuration of the A / D conversion unit 17 of FIG. In the figure, 100 is a V / F converter for converting an analog input voltage into a pulse train having a frequency proportional to the magnitude of the analog input voltage, and 101 is a pulse output from the V / F converter 100 within a fixed time. It is a counter that counts. FIG. 11 is a diagram showing an internal configuration of the D / A conversion unit 19 of FIG. In the figure, 110 is a gate circuit that outputs an input constant voltage amount while the gate control signal is ON. 11
Reference numeral 1 denotes an integrating circuit that integrates a constant voltage amount (pulse) that is a signal output from the gate circuit 110 and that is input at constant intervals, and converts it into a voltage amount.

【0050】図12は図1のオフセット/ゲイン記憶部
11cの構成を示す図である。図において、120は第
1A/D変換オフセット値が格納される第1A/Dオフ
セット値メモリ、121は第1A/Dゲイン値が格納さ
れる第1A/Dゲイン値メモリ、122は第2A/D変
換オフセット値が格納される第2A/Dオフセット値メ
モリ、123は第2A/D変換ゲイン値が格納される第
2A/Dゲイン値メモリ、124は第1D/A変換オフ
セット値が格納される第1D/Aオフセット値メモリ、
125は第1D/A変換ゲイン値が格納される第1D/
Aゲイン値格納メモリ、126は第2D/A変換オフセ
ット値が格納される第2D/Aオフセット値メモリ、1
27は第2D/A変換オフセット値が格納される第2D
/Aゲイン値メモリである。なお、第1A/Dオフセッ
ト値メモリ120、第1A/Dゲイン値メモリ121、
第1D/Aオフセット値メモリ124、および、第1D
/Aゲイン値格納メモリ125により1つの記憶手段が
構成され、第2A/Dオフセット値メモリ122、第2
A/Dゲイン値メモリ123、第2D/Aオフセット値
メモリ126、および、第2D/Aゲイン値メモリ12
7により1つの記憶手段が構成される。
FIG. 12 is a diagram showing the configuration of the offset / gain storage unit 11c of FIG. In the figure, 120 is a first A / D offset value memory that stores a first A / D conversion offset value, 121 is a first A / D gain value memory that stores a first A / D gain value, and 122 is a second A / D A second A / D offset value memory that stores the conversion offset value, a second A / D gain value memory 123 that stores the second A / D conversion gain value, and a first 124 that stores the first D / A conversion offset value. 1D / A offset value memory,
125 is a first D / A conversion gain value stored in the first D / A
A gain value storage memory, 126 is a second D / A offset value memory in which the second D / A conversion offset value is stored, 1
27 is the second D in which the second D / A conversion offset value is stored
/ A gain value memory. The first A / D offset value memory 120, the first A / D gain value memory 121,
First D / A offset value memory 124 and first D
The A / A gain value storage memory 125 constitutes one storage means, and the second A / D offset value memory 122 and the second A / D offset value memory 122
A / D gain value memory 123, second D / A offset value memory 126, and second D / A gain value memory 12
One storage means is constituted by 7.

【0051】図13は、0ー10Vをオフセット値およ
びゲイン値を規定する電圧、4ー20mAをオフセット
値およびゲイン値を規定する電流とした場合のアナログ
量とデジタル値との関係を示す図である。なお、オフセ
ット値はデジタル値が0と時のアナログ量であり、ゲイ
ン値はデジタル値が4000となる時のアナログ量であ
る。
FIG. 13 is a diagram showing a relationship between an analog amount and a digital value when 0-10 V is a voltage defining an offset value and a gain value and 4-20 mA is a current defining an offset value and a gain value. is there. The offset value is an analog amount when the digital value is 0, and the gain value is an analog amount when the digital value is 4000.

【0052】次に、0ー10Vと4ー20mAの二つの
場合について、オフセット値およびゲイン値を設定する
場合の動作について説明する。まず、A/D変換部17
のオフセット値およびゲイン値の設定について説明す
る。外部より図1のアナログ入力部18に電圧0V、1
0V、電流4mA、20mAを順次入力する。入力され
た電圧値はアナログ入力部18を介して図10における
V/F変換器100に入力される。そして、この入力さ
れた電圧値に比例した周波数のパルスがV/F変換器1
00より出力され、カウンタ101によりカウントされ
る。アナログ入力部18に入力された4mA、20mA
の電流値はそれぞれ2V、10Vの電圧値に相当する周
波数のパルスに変換された後カウンタ101に入力さ
れ、パルス数がカウントされる。そして、パルス数化さ
れた0Vの値は第1オフセット値として第1A/Dオフ
セット値メモリ120に格納され、パルス数化された1
0Vの値は第1ゲイン値として第1A/Dゲイン値メモ
リ121に格納され、4mAの値は第2オフセット値と
して第2A/Dオフセット値メモリ122に格納され、
20mAの値は第2ゲイン値として第2A/Dゲイン値
メモリ123に格納される。
Next, the operation for setting the offset value and the gain value will be described for two cases of 0-10V and 4-20mA. First, the A / D converter 17
The setting of the offset value and the gain value of will be described. From the outside, voltage 0V, 1 is applied to the analog input section 18 of FIG.
0V, current 4mA, 20mA are sequentially input. The input voltage value is input to the V / F converter 100 in FIG. 10 via the analog input unit 18. A pulse having a frequency proportional to the input voltage value is applied to the V / F converter 1
00, and is counted by the counter 101. 4 mA and 20 mA input to the analog input unit 18
Are converted into pulses having frequencies corresponding to voltage values of 2 V and 10 V, respectively, and then input to the counter 101, and the number of pulses is counted. The pulse-converted value of 0 V is stored in the first A / D offset value memory 120 as the first offset value, and the pulse-converted value of 1 is stored.
The value of 0 V is stored as the first gain value in the first A / D gain value memory 121, the value of 4 mA is stored as the second offset value in the second A / D offset value memory 122,
The value of 20 mA is stored in the second A / D gain value memory 123 as the second gain value.

【0053】次に、D/A変換部19のオフセット/ゲ
イン値設定について説明する。まず図1の処理部15
は、CPUユニット10からの指令にもとづきアナログ
出力部1aの出力電圧値が第1オフセット値である0V
になるように、図11のゲート回路110のゲート制御
信号として入力される一定周期のパルスのパルス幅を調
整する。そして、その時のパルス幅を示すディジタル値
を図12の第1D/Aオフセット値メモリ124に格納
する。同様にして、第1D/Aゲイン値としての電圧1
0V、第2D/Aオフセット値としての4mA、およ
び、第2D/Aゲイン値としての20mAをそれぞれ出
力するゲート制御信号のパルス幅を示すディジタル値を
図12の第1D/Aゲイン値メモリ125、第2D/A
オフセット値メモリ126、第2D/Aゲイン値メモリ
127にそれぞれ格納する。
Next, the offset / gain value setting of the D / A converter 19 will be described. First, the processing unit 15 in FIG.
Indicates that the output voltage value of the analog output unit 1a is 0V which is the first offset value based on the command from the CPU unit 10.
The pulse width of the pulse having a constant cycle input as the gate control signal of the gate circuit 110 of FIG. 11 is adjusted so that Then, the digital value indicating the pulse width at that time is stored in the first D / A offset value memory 124 of FIG. Similarly, the voltage 1 as the first D / A gain value
A digital value indicating the pulse width of the gate control signal for outputting 0 V, 4 mA as the second D / A offset value, and 20 mA as the second D / A gain value, is stored in the first D / A gain value memory 125 of FIG. Second D / A
The offset value memory 126 and the second D / A gain value memory 127 respectively store them.

【0054】次に、オフセット値およびゲイン値の選択
手段について説明する。PCのCPUユニット10はシ
ーケンスプログラムにより、図2に示すオフセット/ゲ
イン選択メモリ24に第1オフセット/ゲイン値または
第2オフセット/ゲイン値のいずれを選択するかを示す
情報を格納する。なお、第1オフセット/ゲイン値は第
1A/Dオフセット値、第1A/Dゲイン値、第1D/
Aオフセット値、および、第1D/Aゲイン値からな
り、第2オフセット/ゲイン値は第2A/Dオフセット
値、第2A/Dゲイン値、第2D/Aオフセット値、お
よび、第2D/Aゲイン値からなるものとする。一方、
図1のアナログ入出力ユニット14の処理部15は、オ
フセット/ゲイン選択メモリ24により指定される第1
オフセット/ゲイン値および第2オフセット/ゲイン値
のうちのいずれかを図12に示すオフセット/ゲイン記
憶部11cから読み出し、読み出されたオフセット値を
デジタル値0、読み出されたゲイン値をデジタル値40
00とするアナログ量とデジタル値の関係をもとにA/
D変換とD/A変換を実行する。この実施例4によれ
ば、以上のようにオフセット値およびゲイン値の設定ま
たは設定変更が容易にできる効果がある。
Next, the means for selecting the offset value and the gain value will be described. The CPU CPU 10 of the PC stores information indicating whether to select the first offset / gain value or the second offset / gain value in the offset / gain selection memory 24 shown in FIG. 2 by the sequence program. The first offset / gain value is the first A / D offset value, the first A / D gain value, the first D / D
An A offset value and a first D / A gain value, and the second offset / gain value is the second A / D offset value, the second A / D gain value, the second D / A offset value, and the second D / A gain. It shall consist of values. on the other hand,
The processing unit 15 of the analog input / output unit 14 of FIG.
Any one of the offset / gain value and the second offset / gain value is read from the offset / gain storage unit 11c shown in FIG. 12, the read offset value is a digital value 0, and the read gain value is a digital value. 40
A / A based on the relationship between analog quantity and digital value
Execute D conversion and D / A conversion. According to the fourth embodiment, it is possible to easily set or change the offset value and the gain value as described above.

【0055】実施例5.図14は、この発明のさらに他
の実施例におけるシステム構成を示す図である。図にお
いて、140はPCのCPUユニットのシーケンス処理
部、141はシーケンスプログラムメモリ、142はア
ナログ入出力ユニットとのインタフェース部、143は
インタフェース部、144はアナログ入出力ユニットの
処理部、145はCPUユニットとのデータ授受を行な
うデユアルポートメモリ、146はA/D変換およびア
ナログ入力部、147はD/A変換およびアナログ出力
部、148は定電圧電流電源装置、149は電圧電流計
である。なお、インタフェース部143は定電圧電流電
源装置および電圧電流計との信号の授受のために設けら
れている。電圧読取手段および電流読取手段は電圧電流
計149およびインターフェース部143により構成さ
れ、定電圧電源および定電流電源は定電圧電流電源装置
148およびインターフェース部143により構成され
る。また、書込手段は処理部144により具現される。
Example 5. FIG. 14 is a diagram showing a system configuration in still another embodiment of the present invention. In the figure, 140 is a sequence processing unit of a CPU unit of a PC, 141 is a sequence program memory, 142 is an interface unit with an analog input / output unit, 143 is an interface unit, 144 is a processing unit of an analog input / output unit, and 145 is a CPU unit. A dual port memory for transmitting and receiving data to and from 146, an A / D conversion and analog input unit, 147, a D / A conversion and analog output unit, 148, a constant voltage current power supply device, and 149, a voltmeter. The interface unit 143 is provided for exchanging signals with the constant voltage current power supply device and the voltmeter. The voltage reading unit and the current reading unit are configured by the voltmeter and the interface unit 143, and the constant voltage power source and the constant current power source are configured by the constant voltage current power supply device 148 and the interface unit 143. The writing unit is implemented by the processing unit 144.

【0056】図15はシーケンスプログラムメモリ14
1に格納されるシーケンスプログラムを示す図である。
図において、150は図14のインタフェース部143
を介して定電圧電流電源装置に電圧0Vを出力する命
令、151は図2のA/D,D/A選択メモリ2eをO
FFにし、A/D変換部のオフセット/ゲイン設定であ
ることを示すための命令、152は命令150によりA
/D変換部146に電圧0Vが印加されたとき図2のオ
フセット指令メモリ2fをONにする命令であり、オフ
セット指令メモリ2fがONになると後述するように、
このときのA/D変換部の変換出力がオフセット値とし
て記憶される。なお、命令150、命令151、およ
び、命令152はA/D変換部のオフセット設定指令デ
バイスがONになったときに実行される。
FIG. 15 shows the sequence program memory 14
2 is a diagram showing a sequence program stored in No. 1. FIG.
In the figure, 150 is the interface unit 143 of FIG.
A command to output a voltage of 0 V to the constant voltage current power supply device via a reference numeral 151 is an O / V selection memory 2e of FIG.
An instruction for setting to FF and indicating that the offset / gain of the A / D conversion unit is set.
This is a command to turn on the offset command memory 2f in FIG. 2 when a voltage of 0 V is applied to the / D conversion unit 146, and when the offset command memory 2f is turned on, as will be described later,
The converted output of the A / D converter at this time is stored as an offset value. The instruction 150, the instruction 151, and the instruction 152 are executed when the offset setting command device of the A / D converter is turned on.

【0057】153は定電圧電流電源装置148に電圧
10Vを出力させる命令、154はは図2のA/D,D
/A選択メモリ2eをOFFにする命令であり、A/
D,D/A選択メモリ2eがOFFになると、A/D変
換部のオフセット/ゲイン設定が選択される。155は
A/D変換部146に電圧10Vが印加されたときに図
2のゲイン指令メモリ2gをONにする命令であり、ゲ
イン指令メモリ2gがONになると、後述するようにこ
のときのA/D変換部の出力がゲイン値として記憶され
る。なお、命令153、命令154、および、命令15
5はA/Dゲイン設定指令デバイスがONになったとき
に実行される。
Reference numeral 153 is an instruction to output a voltage of 10 V to the constant voltage current power supply device 148, and 154 is A / D and D in FIG.
/ A is a command to turn off the selection memory 2e.
When the D / D / A selection memory 2e is turned off, the offset / gain setting of the A / D converter is selected. Reference numeral 155 is an instruction to turn on the gain command memory 2g in FIG. 2 when a voltage of 10 V is applied to the A / D conversion unit 146. When the gain command memory 2g is turned on, A / The output of the D converter is stored as a gain value. The instruction 153, the instruction 154, and the instruction 15
5 is executed when the A / D gain setting command device is turned on.

【0058】156は電圧電流計149より電圧値を取
り込む命令、157は図2のA/D,D/A選択メモリ
2eをONにする命令であり、A/D,D/A選択メモ
リ2eがONになるとD/A変換部のオフセット/ゲイ
ン設定が選択される。158は取り込んだ電圧値が0V
以上のとき図2の出力ダウン指令メモリ2iをONにす
る命令であり、出力ダウン指令メモリ2iがONになる
と後述するようにD/A変換部から出力される電圧値が
低下する。159は取り込んだ電圧値が0V以下のとき
出力アップ指令メモリ2hをONにする命令であり、出
力アップ指令メモリ2hがONになると後述するように
D/A変換部からの出力電圧値が増加する。15aは取
り込んだ電圧値が0Vのとき図2のオフセット指令メモ
リ2fをONにする命令であり、オフセット指令メモリ
2fがONになると、後述するようにそのときのD/A
変換部の入力値がオフセット値として記憶される。な
お、命令156、命令157、命令158、命令15
9、および、命令15aはD/Aオフセット設定指令デ
バイスがONになったときに実行される。
Reference numeral 156 is an instruction for fetching a voltage value from the voltmeter 149, and 157 is an instruction for turning on the A / D, D / A selection memory 2e of FIG. When it is turned on, the offset / gain setting of the D / A converter is selected. 158 has a voltage value of 0V
In the above case, the instruction is to turn on the output down command memory 2i in FIG. 2. When the output down command memory 2i is turned on, the voltage value output from the D / A conversion unit decreases as described later. Reference numeral 159 is a command to turn on the output up command memory 2h when the taken-in voltage value is 0 V or less, and when the output up command memory 2h is turned on, the output voltage value from the D / A converter increases as will be described later. . Reference numeral 15a is a command for turning on the offset command memory 2f in FIG. 2 when the taken-in voltage value is 0V. When the offset command memory 2f is turned on, the D / A at that time is described as described later.
The input value of the conversion unit is stored as the offset value. Note that the instruction 156, the instruction 157, the instruction 158, and the instruction 15
9 and the instruction 15a are executed when the D / A offset setting command device is turned on.

【0059】15bは図14の電圧電流計149の電圧
値を取り込む命令、15cは図2のA/D,D/A選択
メモリ2eをONにする命令であり、A/D,D/A選
択メモリ2eがONになるとD/A変換部のオフセット
/ゲイン設定が選択される。15dは取り込んだ電圧値
が10V以上のとき図2の出力ダウン指令メモリ2iを
ONにする命令であり、出力ダウン指令メモリ2iがO
Nになると後述するようにD/A変換部から出力される
電圧値が低下する。15eは取り込んだ電圧値が10V
以下のとき出力アップ指令メモリ2hをONにする命令
であり、出力アップ指令メモリ2hがONになると後述
するようにD/A変換部からの出力電圧値が増加する。
15fは取り込んだ電圧値が10Vのとき図2のゲイン
指令メモリ2gをONにする命令であり、ゲイン指令メ
モリ2gがONになると後述するようにそのときのD/
A変換部の入力値がゲイン値として記憶される。なお、
命令15b、命令15c、命令15d、命令15e、お
よび、命令15fはD/Aゲイン設定指令デバイスがO
Nになったときに実行される。
Reference numeral 15b is an instruction to take in the voltage value of the voltmeter 149 of FIG. 14, reference numeral 15c is an instruction to turn on the A / D, D / A selection memory 2e of FIG. 2, and A / D, D / A selection. When the memory 2e is turned on, the offset / gain setting of the D / A converter is selected. Reference numeral 15d is a command to turn on the output down command memory 2i in FIG. 2 when the taken-in voltage value is 10 V or more, and the output down command memory 2i is O
When it becomes N, the voltage value output from the D / A conversion unit decreases as described later. 15e has a voltage value of 10V
It is a command to turn on the output up command memory 2h in the following cases, and when the output up command memory 2h is turned on, the output voltage value from the D / A conversion unit increases as will be described later.
Reference numeral 15f is an instruction to turn on the gain command memory 2g of FIG. 2 when the taken-in voltage value is 10V, and when the gain command memory 2g is turned on, the D /
The input value of the A converter is stored as a gain value. In addition,
Command 15b, command 15c, command 15d, command 15e, and command 15f are D / A gain setting command device O
It is executed when it becomes N.

【0060】図16および図17は、図14の処理部1
44の動作を示すフロー図である。図16において、1
60は図2のA/D,D/A選択メモリ2eがOFFで
あればA/D変換部のオフセット値およびゲイン値の設
定を行なう処理に進み、ONであればD/A変換部のオ
フセット値およびゲイン値を設定する処理に進む処理、
161は図2のオフセット指令メモリ2fがONであれ
ば処理162に進み、OFFであれば処理163に進む
処理、162はA/D変換部からオフセット値を取り込
み記憶する処理、163は図2のゲイン指令メモリ2g
がONであれば処理164に進み、OFFであれば処理
160に戻る処理、164はA/D変換部からゲイン値
を取り込み記憶し、処理160に戻る処理である。
16 and 17 show the processing unit 1 of FIG.
It is a flowchart which shows operation | movement of 44. In FIG. 16, 1
If the A / D and D / A selection memory 2e of FIG. 2 is OFF, the process proceeds to the process of setting the offset value and the gain value of the A / D conversion unit 60, and if it is ON, the offset of the D / A conversion unit. Process to set the value and gain value,
If the offset command memory 2f in FIG. 2 is ON, the processing proceeds to processing 162, and if it is OFF, the processing proceeds to processing 163. 162 is the processing of fetching and storing the offset value from the A / D conversion unit. 163 of FIG. Gain command memory 2g
If is ON, the process proceeds to step 164, and if it is OFF, the process returns to step 160, and 164 is a process of fetching and storing the gain value from the A / D conversion unit and returning to step 160.

【0061】図17において、165は図2の出力アッ
プ指令メモリ2hがONであれば処理166に進み、O
FFであれば処理167に進む処理、166はD/A変
換部への出力値を増加させる処理、167は図2の出力
ダウン指令メモリ2iがONであれば処理168に進
み、OFFであれば処理169に進む処理、168はD
/A変換部への出力値を低下させる処理、169は図2
のオフセット指令メモリ2fがONであれば処理16a
に進み、OFFであれば処理16bに進む処理、16a
はD/A変換部の入力値をオフセット値として記憶する
処理、16bは図2のゲイン指令メモリ2gがONであ
れば処理16cに進み、OFFであれば処理160に戻
る処理、16cはD/A変換部の入力値をゲイン値とし
て記憶した後、処理160に戻る処理である。
In FIG. 17, reference numeral 165 indicates that if the output up command memory 2h shown in FIG.
If it is FF, the process proceeds to step 167, 166 is the process of increasing the output value to the D / A converter, and 167 is step 168 if the output down command memory 2i of FIG. The processing proceeds to processing 169, 168 is D
A process of lowering the output value to the A / A converter 169 is shown in FIG.
If the offset command memory 2f of is ON, processing 16a
If it is OFF, the process proceeds to process 16b.
Is a process of storing the input value of the D / A converter as an offset value, 16b is a process of proceeding to process 16c if the gain command memory 2g of FIG. 2 is ON, returning to process 160 if it is OFF, and 16c is D / A This is a process of storing the input value of the A conversion unit as a gain value and then returning to the process 160.

【0062】次に動作について説明する。図14の処理
部144は図16および図17のフロー図に示す処理を
行い、シーケンスプログラムより制御される図2のA/
D,D/A選択メモリ2e、オフセット指令メモリ2
f、ゲイン指令メモリ2g、出力アップ指令メモリ2
h、および、出力ダウン指令メモリ2iの状態によりA
/D変換部よりオフセット/ゲイン値を取り込み記憶
し、また、D/A変換部への出力値を増減させ、オフセ
ット/ゲイン値を調整後オフセット値およびゲイン値を
記憶する。このオフセットおよびゲイン値として記憶す
る値は、A/D変換部においては定電圧電流装置から電
圧0Vが与えられたときの図10のカウンタ101にカ
ウントされる値、および、電圧10Vが与えられたとき
にカウンタ101にカウントされる値である。また、D
/A変換部においては、電圧0Vが出力されるときのゲ
ート回路110のゲート制御信号のパルス幅を示すディ
ジタル値、および、電圧10Vが出力されるときのゲー
ト回路110のゲート制御信号のパルス幅を示すディジ
タル値である。この実施例5によれば、このようにして
オフセット値またはゲイン値の設定が容易にできる効果
がある。
Next, the operation will be described. The processing unit 144 of FIG. 14 performs the processing shown in the flowcharts of FIGS. 16 and 17, and is controlled by the sequence program A / A of FIG.
D, D / A selection memory 2e, offset command memory 2
f, gain command memory 2g, output up command memory 2
h and A depending on the state of the output down command memory 2i
The offset / gain value is fetched and stored from the / D conversion unit, and the output value to the D / A conversion unit is increased / decreased, and the offset / gain value after adjusting the offset / gain value is stored. The values stored as the offset and gain values are the value counted by the counter 101 in FIG. 10 and the voltage 10V when the voltage 0V is applied from the constant voltage current device in the A / D converter. It is a value sometimes counted by the counter 101. Also, D
In the / A converter, a digital value indicating the pulse width of the gate control signal of the gate circuit 110 when the voltage of 0V is output, and the pulse width of the gate control signal of the gate circuit 110 when the voltage of 10V is output. Is a digital value indicating. According to the fifth embodiment, it is possible to easily set the offset value or the gain value in this way.

【0063】[0063]

【発明の効果】以上のように、制御対象物より入力され
るアナログ入力信号をデジタル信号に変換するA/D変
換手段の変換出力に対し、プログラマブルコントローラ
本体からの指示情報による所定の関数式にもとづき演算
手段が演算を行い、この演算結果にもとづくアナログ出
力を制御対象物に出力するので、アナログ量の入力から
出力までの時間遅れの増大を防止でき、制御対象物を高
速高精度に制御できる効果がある。
As described above, the conversion output of the A / D conversion means for converting the analog input signal input from the controlled object into the digital signal is converted into a predetermined functional expression based on the instruction information from the programmable controller main body. Since the calculation means performs the calculation and outputs the analog output based on the calculation result to the controlled object, it is possible to prevent an increase in the time delay from the input of the analog amount to the output and to control the controlled object with high speed and high accuracy. effective.

【0064】また、プログラマブルコントローラ本体よ
り送られてくる座標情報であって、一方の軸をアナログ
入力量、他方の軸をアナログ出力量とする座標上の複数
の点を示す座標情報にもとづき、この複数の点間を結ぶ
所定数の直線を示す関数式が関数式算出手段により算出
されるので関数式の設定が容易にできる効果がある。
Further, based on the coordinate information sent from the programmable controller main body, based on the coordinate information indicating a plurality of points on the coordinate where one axis is the analog input amount and the other axis is the analog output amount, Since the function formula indicating a predetermined number of straight lines connecting a plurality of points is calculated by the function formula calculating means, it is possible to easily set the function formula.

【0065】また、プログラマブルコントローラ本体か
らの指令にもとづき、選択手段がプログラマブルコント
ローラ本体からの指令値または演算手段の演算出力のい
ずれかを選択出力し、出力手段はこの選択出力にもとづ
くアナログ出力を制御対象物に出力するので、電源投入
時の始動時等における出力の急変による制御対象物への
衝撃等を防止できる効果がある。
Further, based on the command from the programmable controller main body, the selecting means selectively outputs either the command value from the programmable controller main body or the calculation output of the calculating means, and the output means controls the analog output based on this selection output. Since it is output to the target object, there is an effect that it is possible to prevent an impact or the like on the control target object due to a sudden change in the output at the time of starting when the power is turned on.

【0066】また、A/D変換のオフセット値およびゲ
イン値と、D/A変換のオフセット値およびゲイン値を
記憶する記憶手段を複数有し、この複数の記憶手段から
選択された記憶手段の記憶内容にもとづきオフセット値
およびゲイン値が設定されるので、オフセット値および
ゲイン値の設定または設定変更が容易にできる効果があ
る。
Further, a plurality of storage means for storing the A / D conversion offset value and the gain value and the D / A conversion offset value and the gain value are provided, and the storage means selected from the plurality of storage means is stored. Since the offset value and the gain value are set based on the contents, there is an effect that the offset value and the gain value can be easily set or changed.

【0067】また、プログラマブルコントローラ本体の
指令にもとづき、定電圧電源または定電流電源が所定の
電圧値または電流値をA/D変換手段に入力したとき、
書込手段によりA/D変換手段の変換出力がA/D変換
のオフセット値またはゲイン値として記憶手段に書込ま
れるとともに、電圧読取手段または電流読取手段により
読取られたD/A変換手段の変換出力にもとづきプログ
ラマブルコントローラ本体からD/A変換手段への入力
値を増減する指令が出され、D/A変換手段の変換出力
が所定電圧値または所定電流値になったときのD/A変
換手段の入力値がD/A変換のオフセット値またはゲイ
ン値として書込手段により記憶手段に書込まれるので、
オフセット値またはゲイン値が容易に設定できる効果が
ある。
Further, when the constant voltage power supply or the constant current power supply inputs a predetermined voltage value or current value to the A / D conversion means based on a command from the programmable controller main body,
The writing output writes the converted output of the A / D conversion means to the storage means as an offset value or gain value of the A / D conversion, and the conversion of the D / A conversion means read by the voltage reading means or the current reading means. A command to increase or decrease the input value to the D / A converting means is issued from the programmable controller main body based on the output, and the D / A converting means when the converted output of the D / A converting means reaches a predetermined voltage value or a predetermined current value. Since the input value of is written in the storage means by the writing means as an offset value or gain value of D / A conversion,
There is an effect that the offset value or the gain value can be easily set.

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

【図1】この発明におけるアナログ入出力ユニットおよ
びPCのCPUユニットを示す機能ブロック図である。
FIG. 1 is a functional block diagram showing an analog input / output unit and a CPU unit of a PC according to the present invention.

【図2】図1におけるデユアルポートメモリのメモリ内
部構成図である。
FIG. 2 is a memory internal configuration diagram of the dual port memory in FIG.

【図3】この発明の実施例1によるアナログ入出力ユニ
ットを制御するためのシーケンスプログラムを示す図で
ある。
FIG. 3 is a diagram showing a sequence program for controlling an analog input / output unit according to the first embodiment of the present invention.

【図4】この発明の実施例1によるアナログ入出力ユニ
ットの内部処理を示すフロー図である。
FIG. 4 is a flowchart showing the internal processing of the analog input / output unit according to the first embodiment of the present invention.

【図5】この発明の実施例2によるアナログ入出力ユニ
ットで制御するときのアナログ入力量と出力量の関係を
示す図である。
FIG. 5 is a diagram showing a relationship between an analog input amount and an output amount when controlled by an analog input / output unit according to a second embodiment of the present invention.

【図6】この発明の実施例2によるアナログ入出力ユニ
ットを制御するためのシーケンスプログラムを示す図で
ある。
FIG. 6 is a diagram showing a sequence program for controlling an analog input / output unit according to a second embodiment of the present invention.

【図7】この発明の実施例2によるアナログ入出力ユニ
ットの内部処理を示すフロー図である。
FIG. 7 is a flowchart showing the internal processing of the analog input / output unit according to the second embodiment of the present invention.

【図8】この発明の実施例3によるアナログ入出力ユニ
ットを制御するためのシーケンスプログラムを示す図で
ある。
FIG. 8 is a diagram showing a sequence program for controlling an analog input / output unit according to a third embodiment of the present invention.

【図9】この発明の実施例3によるアナログ入出力ユニ
ットの内部処理を示すフロー図である。
FIG. 9 is a flowchart showing the internal processing of the analog input / output unit according to the third embodiment of the present invention.

【図10】この発明の実施例4によるアナログ入出力ユ
ニットのA/D変換部の内部構成を示す図である。
FIG. 10 is a diagram showing an internal configuration of an A / D converter of an analog input / output unit according to a fourth embodiment of the present invention.

【図11】この発明の実施例4によるアナログ入出力ユ
ニットのD/A変換部の内部構成を示す図である。
FIG. 11 is a diagram showing an internal configuration of a D / A conversion unit of an analog input / output unit according to a fourth embodiment of the present invention.

【図12】この発明の実施例4によるアナログ入出力ユ
ニットのオフセット値およびゲイン値を記憶するメモリ
の構成を示す図である。
FIG. 12 is a diagram showing a structure of a memory for storing an offset value and a gain value of an analog input / output unit according to a fourth embodiment of the present invention.

【図13】この発明の実施例4によるアナログ入出力ユ
ニットのアナログ量とデジタル値の関係を示す図であ
る。
FIG. 13 is a diagram showing a relationship between an analog amount and a digital value of an analog input / output unit according to a fourth embodiment of the present invention.

【図14】この発明の実施例5によるアナログ入出力ユ
ニットのオフセット値およびゲイン値を自動的に調整し
設定するアナログ入出力ユニットおよびPCのCPUユ
ニットを示す機能ブロック図である。
FIG. 14 is a functional block diagram showing an analog input / output unit and a CPU unit of a PC for automatically adjusting and setting an offset value and a gain value of the analog input / output unit according to the fifth embodiment of the present invention.

【図15】この発明の実施例5によるアナログ入出力ユ
ニットのオフセット値およびゲイン値を自動的に調整し
設定するシーケンスプログラムを示す図である。
FIG. 15 is a diagram showing a sequence program for automatically adjusting and setting an offset value and a gain value of an analog input / output unit according to a fifth embodiment of the present invention.

【図16】この発明の実施例5によるアナログ入出力ユ
ニットの内部処理を示すフロー図である。
FIG. 16 is a flowchart showing the internal processing of the analog input / output unit according to the fifth embodiment of the present invention.

【図17】この発明の実施例5によるアナログ入出力ユ
ニットの内部処理を示すフロー図である。
FIG. 17 is a flowchart showing the internal processing of the analog input / output unit according to the fifth embodiment of the present invention.

【図18】従来のアナログ入出力ユニットおよびPCの
CPUユニットを示す機能ブロック図である。
FIG. 18 is a functional block diagram showing a conventional analog input / output unit and a CPU unit of a PC.

【図19】従来のアナログ入出力ユニットを制御するた
めのシーケンスプログラムを示す図である。
FIG. 19 is a diagram showing a sequence program for controlling a conventional analog input / output unit.

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

10 PCのCPUユニット 11 シーケンス処理部 12 シーケンスプログラムメモリ 13 インタフェース部 14 アナログ入出力ユニット部 15 アナログ入出力ユニットの処理部 16 デユアルポートメモリ 17 A/D変換部 18 アナログ入力部 19 D/A変換部 1a アナログ出力部 1b 制御対象物 1c オフセット/ゲイン記憶部 20 A/D変換値メモリ 21 CPU用D/A変換値メモリ 22 演算結果格納メモリ 23 D/A出力許可メモリ 24 オフセット/ゲイン選択メモリ 25 出力切り換えメモリ 26 定数パラメータAメモリ 27 定数パラメータBメモリ 28 アナログ入力量1メモリ 29 アナログ出力量1メモリ 2a アナログ入力量2メモリ 2b アナログ出力量2メモリ 2c アナログ入力量3メモリ 2d アナログ出力量3メモリ 2e A/D,D/A選択メモリ 2f オフセット設定指令メモリ 2g ゲイン設定指令メモリ 2h 出力アップ指令メモリ 2i 出力ダウン指令メモリ 11c オフセット/ゲイン記憶部 100 V/F変換器 101 カウンタ 111 ゲート回路 112 積分回路 120 第1A/Dオフセット値メモリ 121 第1A/Dゲイン値メモリ 122 第2A/Dオフセット値メモリ 123 第2A/Dゲイン値メモリ 124 第1D/Aオフセット値メモリ 125 第1D/Aゲイン値メモリ 126 第2D/Aオフセット値メモリ 127 第2D/Aゲイン値メモリ 140 シーケンス処理部 141 シーケンスプログラムメモリ 142 インタフェース部 143 インタフェース部 144 アナログ入出力ユニットの処理部 145 デユアルポートメモリ 146 A/D変換部 147 D/A変換部 148 定電圧電流電源装置 149 電圧電流計 170 PCのCPUユニット 171 シーケンス処理部 172 シーケンスプログラムメモリ 173 インタフェース部 174 アナログ入出力ユニット部 175 アナログ入出力ユニットの処理部 176 A/D変換値メモリ部 177 D/A変換値メモリ部 178 A/D変換部 179 アナログ入力部 17a D/A変換部 17b アナログ出力部 17c 制御対象物 17d スイッチ部 10 PC CPU unit 11 Sequence processing unit 12 Sequence program memory 13 Interface unit 14 Analog input / output unit unit 15 Analog input / output unit processing unit 16 Dual port memory 17 A / D conversion unit 18 Analog input unit 19 D / A conversion unit 1a Analog output section 1b Control object 1c Offset / gain storage section 20 A / D conversion value memory 21 CPU D / A conversion value memory 22 Calculation result storage memory 23 D / A output permission memory 24 Offset / gain selection memory 25 Output Switching memory 26 Constant parameter A memory 27 Constant parameter B memory 28 Analog input amount 1 memory 29 Analog output amount 1 memory 2a Analog input amount 2 memory 2b Analog output amount 2 memory 2c Analog input amount 3 memory 2d Log output amount 3 memory 2e A / D, D / A selection memory 2f Offset setting command memory 2g Gain setting command memory 2h Output up command memory 2i Output down command memory 11c Offset / gain storage unit 100 V / F converter 101 Counter 111 Gate circuit 112 Integration circuit 120 First A / D offset value memory 121 First A / D gain value memory 122 Second A / D offset value memory 123 Second A / D gain value memory 124 First D / A offset value memory 125 First D / A Gain value memory 126 2nd D / A offset value memory 127 2nd D / A gain value memory 140 Sequence processing section 141 Sequence program memory 142 Interface section 143 Interface section 144 Analog input / output unit processing section 145 Dual port memory 146 A / D conversion unit 147 D / A conversion unit 148 Constant voltage current power supply device 149 Volt ammeter 170 PC CPU unit 171 Sequence processing unit 172 Sequence program memory 173 Interface unit 174 Analog input / output unit unit 175 Analog input Output unit processing unit 176 A / D conversion value memory unit 177 D / A conversion value memory unit 178 A / D conversion unit 179 Analog input unit 17a D / A conversion unit 17b Analog output unit 17c Control object 17d Switch unit

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 シーケンスプログラムにもとづき動作す
るプログラマブルコントローラ本体に着脱可能に設けら
れるプログラマブルコントローラ用アナログ信号処理装
置であって、制御対象物より入力されるアナログ入力信
号をデジタル信号に変換するA/D変換手段と、このA
/D変換手段の変換出力に対し上記プログラマブルコン
トローラ本体からの指示情報にもとづく所定の関数式に
より演算を行う演算手段と、この演算手段の演算出力に
もとづくアナログ出力を上記制御対象物に出力する出力
手段と、を備えたプログラマブルコントローラ用アナロ
グ信号処理装置。
1. An analog signal processing device for a programmable controller, which is detachably provided in a programmable controller main body that operates based on a sequence program, and which converts an analog input signal input from a control target object into a digital signal. Conversion means and this A
An arithmetic means for performing an arithmetic operation on a converted output of the / D conversion means by a predetermined functional expression based on instruction information from the programmable controller main body, and an output for outputting an analog output based on the arithmetic output of the arithmetic means to the control object. An analog signal processing device for a programmable controller, comprising:
【請求項2】 プログラマブルコントローラ本体より送
られてくる座標情報であって、一方の軸をアナログ入力
量とし他方の軸をアナログ出力量とする座標上の複数の
点を示す座標情報にもとづき、上記複数の点間を結ぶ所
定数の直線で示される関数式を算出する関数式算出手段
を有することを特徴とする請求項1記載のプログラマブ
ルコントローラ用アナログ信号処理装置。
2. The coordinate information sent from the programmable controller main body is based on coordinate information indicating a plurality of points on a coordinate where one axis is an analog input amount and the other axis is an analog output amount. 2. The analog signal processing device for a programmable controller according to claim 1, further comprising a function formula calculating means for calculating a function formula represented by a predetermined number of straight lines connecting a plurality of points.
【請求項3】 プログラマブルコントローラ本体からの
指令にもとづき、プログラマブルコントローラ本体から
の指令値または演算手段の演算出力のいずれかを選択出
力する選択手段を有し、出力手段は上記選択手段の選択
出力にもとづくアナログ出力を上記制御対象物に出力す
ることを特徴とする請求項1または請求項2記載のプロ
グラマブルコントローラ用アナログ信号処理装置。
3. A selection means for selectively outputting either a command value from the programmable controller main body or a calculation output of a calculation means based on a command from the programmable controller main body, and the output means is a selection output of the selection means. The analog signal processing device for a programmable controller according to claim 1 or 2, wherein a base analog output is output to the controlled object.
【請求項4】 A/D変換のオフセット値およびゲイン
値と、D/A変換のオフセット値およびゲイン値を記憶
する記憶手段を複数有し、この複数の記憶手段から選択
された上記記憶手段の記憶内容にもとづきオフセット値
およびゲイン値を設定することを特徴とする請求項1乃
至請求項3記載のプログラマブルコントローラ用アナロ
グ信号処理装置。
4. A plurality of storage means for storing an offset value and a gain value of A / D conversion and an offset value and a gain value of the D / A conversion are provided, and the storage means selected from the plurality of storage means. The analog signal processing device for a programmable controller according to claim 1, wherein the offset value and the gain value are set based on the stored contents.
【請求項5】 プログラマブルコントローラ本体からの
指令によりD/A変換手段の変換出力を読取可能な電圧
読取手段または電流読取手段と、上記プログラマブルコ
ントローラ本体の指令にもとづき所定の電圧値または電
流値を出力し、この出力をA/D変換手段に入力する定
電圧電源または定電流電源と、上記定電圧電源または定
電流電源が所定の電圧値または電流値を出力したときの
上記A/D変換手段の変換出力をA/D変換のオフセッ
ト値またはゲイン値として記憶手段に書込むとともに、
上記プログラマブルコントローラ本体より上記電圧読取
手段または電流読取手段の読取出力にもとづき上記D/
A変換手段への入力値を増減する指令が出され、上記電
圧読取手段または電流読取手段により所定電圧値または
所定電流値が読取られたときの上記入力値をD/A変換
のオフセット値またはゲイン値として上記記憶手段に書
込む書込手段と、を有することを特徴とする請求項1乃
至請求項4記載のプログラマブルコントローラ用アナロ
グ信号処理装置。
5. A voltage reading unit or a current reading unit capable of reading the converted output of the D / A converting unit according to a command from the programmable controller main body, and a predetermined voltage value or current value output based on the command from the programmable controller main body. Of the constant voltage power supply or constant current power supply for inputting this output to the A / D conversion means, and the A / D conversion means when the constant voltage power supply or constant current power supply outputs a predetermined voltage value or current value. The converted output is written in the storage means as an offset value or gain value for A / D conversion, and
Based on the read output of the voltage reading means or the current reading means from the programmable controller body, the D /
A command to increase / decrease the input value to the A conversion means is issued, and the input value when the predetermined voltage value or the predetermined current value is read by the voltage reading means or the current reading means is an offset value or gain for D / A conversion. An analog signal processing device for a programmable controller according to any one of claims 1 to 4, further comprising: a writing unit that writes the value in the storage unit.
JP5162717A 1993-06-30 1993-06-30 Analog signal processor for programmable controller Expired - Lifetime JP2914100B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5162717A JP2914100B2 (en) 1993-06-30 1993-06-30 Analog signal processor for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5162717A JP2914100B2 (en) 1993-06-30 1993-06-30 Analog signal processor for programmable controller

Publications (2)

Publication Number Publication Date
JPH0778007A true JPH0778007A (en) 1995-03-20
JP2914100B2 JP2914100B2 (en) 1999-06-28

Family

ID=15759954

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5162717A Expired - Lifetime JP2914100B2 (en) 1993-06-30 1993-06-30 Analog signal processor for programmable controller

Country Status (1)

Country Link
JP (1) JP2914100B2 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007506203A (en) * 2003-09-22 2007-03-15 クレオ アイエル. リミテッド Configurable controller
CN102566484A (en) * 2011-12-15 2012-07-11 无锡科思电子科技有限公司 Multifunctional analog quantity acquisition module and information transmission method thereof
JP5178964B1 (en) * 2012-05-11 2013-04-10 三菱電機株式会社 Analog conversion device and programmable controller system
CN103125074A (en) * 2010-09-28 2013-05-29 三菱电机株式会社 D/A conversion device, peripheral device, and PLC
JP2013254487A (en) * 2012-06-07 2013-12-19 Ls Industrial Systems Co Ltd Plc(programmable logic controller) control device and method
US8775703B2 (en) 2012-03-28 2014-07-08 Mitsubishi Electric Corporation Conversion device, peripheral device, and programmable logic controller
KR101523168B1 (en) * 2014-01-27 2015-05-26 엘에스산전 주식회사 System and method for setting offset and gain of analog input module
WO2016009485A1 (en) * 2014-07-14 2016-01-21 三菱電機株式会社 Plc system and arithmetic expression data creation assistance device
CN106444606A (en) * 2016-09-29 2017-02-22 卡斯柯信号有限公司 Incremental electronic coding odometer device based on PLC technology and application thereof
CN111596573A (en) * 2020-06-18 2020-08-28 三一石油智能装备有限公司 Analog quantity processing method and system and automatic processing device

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007506203A (en) * 2003-09-22 2007-03-15 クレオ アイエル. リミテッド Configurable controller
CN103125074A (en) * 2010-09-28 2013-05-29 三菱电机株式会社 D/A conversion device, peripheral device, and PLC
CN102566484A (en) * 2011-12-15 2012-07-11 无锡科思电子科技有限公司 Multifunctional analog quantity acquisition module and information transmission method thereof
US8775703B2 (en) 2012-03-28 2014-07-08 Mitsubishi Electric Corporation Conversion device, peripheral device, and programmable logic controller
JP5178964B1 (en) * 2012-05-11 2013-04-10 三菱電機株式会社 Analog conversion device and programmable controller system
US9729161B2 (en) 2012-05-11 2017-08-08 Mitsubishi Electric Corporation Analog converter and programmable logic controller system
KR20140132772A (en) 2012-05-11 2014-11-18 미쓰비시덴키 가부시키가이샤 Analog conversion device and programmable logic controller system
US9488972B2 (en) 2012-06-07 2016-11-08 Lsis Co., Ltd. Apparatus and method for controlling programmable logic controller
JP2013254487A (en) * 2012-06-07 2013-12-19 Ls Industrial Systems Co Ltd Plc(programmable logic controller) control device and method
KR101523168B1 (en) * 2014-01-27 2015-05-26 엘에스산전 주식회사 System and method for setting offset and gain of analog input module
WO2016009485A1 (en) * 2014-07-14 2016-01-21 三菱電機株式会社 Plc system and arithmetic expression data creation assistance device
KR20160018815A (en) 2014-07-14 2016-02-17 미쓰비시덴키 가부시키가이샤 Plc system and arithmetic expression data creation assistance device
JP5864033B1 (en) * 2014-07-14 2016-02-17 三菱電機株式会社 PLC system and arithmetic data creation support device
CN105431789A (en) * 2014-07-14 2016-03-23 三菱电机株式会社 Plc system and arithmetic expression data creation assistance device
US10018983B2 (en) 2014-07-14 2018-07-10 Mitsubishi Electric Corporation PLC system and arithmetic-expression-data-creation supporting apparatus
CN106444606A (en) * 2016-09-29 2017-02-22 卡斯柯信号有限公司 Incremental electronic coding odometer device based on PLC technology and application thereof
CN106444606B (en) * 2016-09-29 2023-05-09 卡斯柯信号有限公司 Incremental electronic coding odometer device based on PLC technology and application thereof
CN111596573A (en) * 2020-06-18 2020-08-28 三一石油智能装备有限公司 Analog quantity processing method and system and automatic processing device
CN111596573B (en) * 2020-06-18 2024-03-26 三一石油智能装备有限公司 Analog quantity processing method, system and automatic processing device

Also Published As

Publication number Publication date
JP2914100B2 (en) 1999-06-28

Similar Documents

Publication Publication Date Title
EP0394474A1 (en) Spline interpolation system
US4339794A (en) Method and system for controlling input/output in process control
JPH0778007A (en) Analog signal processor for programmable controller
JP2752514B2 (en) Program execution method of CNC device
US6917850B2 (en) Motion data command system and control signal definition system for motion program
KR101409618B1 (en) Conversion device, peripheral device, and programmable logic controller
JP3528478B2 (en) Numerical control unit
JPH1069302A (en) Programmable controller with pid instruction
JPH0991022A (en) Robot controller
KR920003745B1 (en) High-speed machining system
US4839789A (en) Programmable control device for high speed processing of data
JP4961788B2 (en) Semiconductor integrated circuit, acoustic signal processing device, and operation device
JP2533072Y2 (en) Program controller
KR100396725B1 (en) A keyboard of instruction inputting for programmable logic controller using shortened instruction code
JPS6126961Y2 (en)
JP2806933B2 (en) Tool compensation method
JPH0215303A (en) Teaching system
JPS62271103A (en) Controller
JP2551444B2 (en) Recorder
JP2851873B2 (en) Feedback control device
JPH0224892A (en) Method and device for displaying sound recording level
JPH02280259A (en) Multichannel type memory controller
JPH01159703A (en) Numerical controller
JPH06201413A (en) Sensor driver
JPH0458615A (en) Device for adjusting zero point and span of analog signal

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080416

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090416

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100416

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100416

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20110416

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20120416

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20130416

Year of fee payment: 14

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

Free format text: PAYMENT UNTIL: 20140416

Year of fee payment: 15

EXPY Cancellation because of completion of term