JPH1027011A - Programmable controller - Google Patents
Programmable controllerInfo
- Publication number
- JPH1027011A JPH1027011A JP17935796A JP17935796A JPH1027011A JP H1027011 A JPH1027011 A JP H1027011A JP 17935796 A JP17935796 A JP 17935796A JP 17935796 A JP17935796 A JP 17935796A JP H1027011 A JPH1027011 A JP H1027011A
- Authority
- JP
- Japan
- Prior art keywords
- data
- format
- physical quantity
- unit
- programmable controller
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Programmable Controllers (AREA)
Abstract
(57)【要約】
【課題】 誤差を増加させることなく、様々な数値形式
でデータ処理を行うことが可能なプログラマブルコント
ローラを提供する。
【解決手段】 プログラマブルコントローラ1の演算処
理手段4は、データ形式付与手段2による付与されてい
るデータ形式が整数形式である場合、データに直接アク
セスしてそのデータをそのまま取り出して整数形式のデ
ータの積算を行い、データを物理量としてアクセスする
際は、そのデータに対応する単位物理量を単位物理量付
与手段3から取り出し、そのデータを単位物理量と乗算
して取り出す。
(57) [Problem] To provide a programmable controller capable of performing data processing in various numerical formats without increasing an error. SOLUTION: When a data format assigned by a data format assigning unit 2 is an integer format, an arithmetic processing unit 4 of a programmable controller 1 directly accesses the data, extracts the data as it is, and integrates the integer format data. When the data is accessed as a physical quantity, a unit physical quantity corresponding to the data is extracted from the unit for assigning physical quantity 3, and the data is extracted by multiplying the data by the unit physical quantity.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、プログラマブルコ
ントローラに関し、特に、プロセスから入力される物理
量をプログラムで演算し、プロセスへ出力する場合など
に適用して好適なものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller, and more particularly, to a programmable controller which is suitably applied to a case where a physical quantity input from a process is calculated by a program and output to the process.
【0002】[0002]
【従来の技術】従来のプログラマブルコントローラは、
プロセスから入力される物理量の演算を行う場合、入力
データを正規化整数に変換して演算を行うようにしてい
た。2. Description of the Related Art Conventional programmable controllers are:
When calculating a physical quantity input from a process, the input data is converted into a normalized integer and the calculation is performed.
【0003】例えば、従来のプログラマブルコントロー
ラは、プロセスから入力される物理量をプロセス入出力
装置PIOにより正規化整数形式のデータに変換し、変
換後の正規化整数形式のデータを用いてCPUにより演
算を行い、正規化整数形式のデータをPIOにより出力
していた。For example, a conventional programmable controller converts a physical quantity input from a process into data of a normalized integer format by a process input / output device PIO, and performs an operation by a CPU using the converted data of the normalized integer format. Then, the data in the normalized integer format was output by the PIO.
【0004】このため、プログラマブルコントローラの
図9に示すデータメモリ25には、演算データ25aや
入力データ25bや出力データ25cが正規化整数とし
て格納されるようになっていた。For this reason, the data memory 25 of the programmable controller shown in FIG. 9 stores operation data 25a, input data 25b and output data 25c as normalized integers.
【0005】ここで、正規化整数とは、プログラマブル
コントローラが制御しようとするプロセスの物理量の制
御範囲の最小値を0%、最大値を100%とし、これを
それぞれ16ビット整数値の表現できる範囲−3276
8〜+32767のうち0〜10000に対応させるよ
うにしたものである。物理量を100%に正規化し、こ
れを整数値10000で100.00%に解釈するので
「正規化整数」と呼ばれている。Here, the normalized integer is defined as a range in which the minimum value of the control range of the physical quantity of the process to be controlled by the programmable controller is 0% and the maximum value is 100%, which can be expressed as a 16-bit integer value. -3276
This corresponds to 0 to 10000 of 8 to +32767. This is called a “normalized integer” because the physical quantity is normalized to 100% and interpreted as an integer value of 10000 to 100.00%.
【0006】従って、16ビット整数値では、−32
7.68%〜+327.67%を表現できることにな
る。このように、正規化整数は物理量を100%に正規
化して物理量を隠蔽し、物理量が制御範囲の何%なのか
を整数値で表現しているので、プログラマブルコントロ
ーラのユーザであるプラントオペレータは物理量を意識
せずにすみ、直観的でわかりやすいという特長がある。Therefore, for a 16-bit integer value, -32
7.68% to + 327.67% can be expressed. As described above, the normalized integer hides the physical quantity by normalizing the physical quantity to 100%, and expresses the percentage of the control range by the integer value. Therefore, the plant operator who is the user of the programmable controller can read the physical quantity. It is intuitive and easy to understand without having to be aware of it.
【0007】また、プログラマブルコントローラが入出
力するセンサやアクチュエータの中には、電磁弁のよう
に本質的に物理量を操作するというより、弁開度をパー
センテージ(%)で操作すると考えられる機器があり、
正規化整数を用いる方がより適切な場合がある。[0007] Some sensors and actuators input and output by the programmable controller do not operate a physical quantity essentially like an electromagnetic valve, but rather operate the valve opening degree as a percentage (%). ,
It may be more appropriate to use normalized integers.
【0008】さらに、一般的に物理量として表現するた
めには浮動小数点数値演算が必要となるのに対し、正規
化整数ではプログラマブルコントローラは整数演算装置
だけを持てばよく、簡単で安価なプログラマブルコント
ローラを実現できるという長所がある。Further, in general, a floating point numerical operation is required to express a physical quantity, whereas in the case of a normalized integer, a programmable controller need only have an integer operation device, and a simple and inexpensive programmable controller can be used. There is an advantage that it can be realized.
【0009】図10は、従来のプログラマブルコントロ
ーラによる加算演算を示す図である。図10において、
加算演算器65は、入力データ61と入力データ63と
の加算を行って出力データ69として出力するものであ
り、正規化整数のスケール変換を行う変換器66、68
及び加算を行う加算器67を備えている。FIG. 10 is a diagram showing an addition operation by a conventional programmable controller. In FIG.
The adder 65 performs addition of the input data 61 and the input data 63 and outputs the result as output data 69. The converters 66 and 68 perform scale conversion of a normalized integer.
And an adder 67 for performing addition.
【0010】そして、長さの計測信号がセンサからプロ
グラマブルコントローラに供給された場合、PIOは0
%〜100%のスケールに対して0〜10000の正規
化整数に変換し、図9のデータメモリ25に入力データ
25bとして格納する。When the length measurement signal is supplied from the sensor to the programmable controller, PIO is set to 0.
It is converted to a normalized integer of 0 to 10000 for a scale of% to 100%, and stored as input data 25b in the data memory 25 of FIG.
【0011】例えば、図10の入力データ61はスケー
ルが0〜10mmの長さのプロセスデータに対応し、入
力データ63はスケールが0〜20mmの長さのプロセ
スデータに対応している場合において、この2つの入力
データ61、63を加算する場合、加算を行う前に入力
データ61を図9のデータメモリ25から変換器66に
入力する。For example, in the case where the input data 61 in FIG. 10 corresponds to process data having a scale of 0 to 10 mm and the input data 63 corresponds to process data having a scale of 0 to 20 mm, When adding these two input data 61 and 63, the input data 61 is input from the data memory 25 of FIG.
【0012】そして、変換器66により変換定数62を
入力データ61に乗算して、入力データ61のスケール
を入力データ63のスケールに合わせる。ここでは、変
換定数62を1/2に設定して入力データ61のスケー
ルを0〜20mmとする。この結果、入力データ61
は、0〜20mのスケールの0%〜50%の範囲を示す
0〜5000の正規化整数に変換される。Then, the input data 61 is multiplied by the conversion constant 62 by the converter 66 to adjust the scale of the input data 61 to the scale of the input data 63. Here, the conversion constant 62 is set to 1/2, and the scale of the input data 61 is set to 0 to 20 mm. As a result, the input data 61
Is converted to a normalized integer from 0 to 5000 indicating a range from 0% to 50% on a scale from 0 to 20 m.
【0013】その後、変換器66の出力データと入力デ
ータ63とを加算器67により加算する。その結果、0
〜20mのスケールの0%〜150%の範囲を示す0〜
15000の正規化整数が得られる。そして、加算器6
7からの出力データを変換器68に入力し、変換定数6
4を乗算する。After that, the output data of the converter 66 and the input data 63 are added by an adder 67. As a result, 0
0 to indicate a range of 0% to 150% on a scale of
A normalized integer of 15000 is obtained. And the adder 6
7 is input to a converter 68, and a conversion constant 6
Multiply by four.
【0014】ここでは、変換定数64を2/3に設定
し、加算器67からの出力データを0〜30mのスケー
ルの0%〜100%の範囲を示す0〜10000の正規
化整数に変換し、出力データ69を得る。この出力デー
タ69は図9のデータメモリ25に格納される。Here, the conversion constant 64 is set to 2/3, and the output data from the adder 67 is converted to a normalized integer of 0 to 10000 indicating a range of 0% to 100% on a scale of 0 to 30 m. , And output data 69 are obtained. This output data 69 is stored in the data memory 25 of FIG.
【0015】このように、従来のプログラマブルコント
ローラは、図10に示すような加算演算を行う場合、ス
ケール変換のための変換定数62、64を用意し、演算
ブロックやPIOで取り扱われるデータを正規化整数に
変換し演算を行うようにしていた。As described above, the conventional programmable controller prepares the conversion constants 62 and 64 for the scale conversion when performing the addition operation as shown in FIG. 10, and normalizes the data handled by the operation block and the PIO. The operation was performed after converting to an integer.
【0016】この従来のプログラマブルコントローラに
対し、先願の特願平7−324481によれば、データ
が表す物理量の演算対象とする範囲を示すフルスケール
値及びベーススケール値をデータに対応させて格納し、
格納されたフルスケール値及びベーススケール値に基づ
いてデータの演算を行うようにしたプログラマブルコン
トローラが提案されている。In this conventional programmable controller, according to Japanese Patent Application No. Hei 7-324481, a full scale value and a base scale value indicating a range in which a physical quantity represented by data is to be calculated are stored in association with the data. And
2. Description of the Related Art A programmable controller has been proposed in which data is calculated based on stored full scale values and base scale values.
【0017】図11は、先願のプログラマブルコントロ
ーラによるデータに対応して明示された属性データの構
成を示す図である。図11において、属性データ15b
は、ベーススケール値38及びフルスケール値39を備
えている。ここで、ベーススケール値38は、プロセス
の物理量の演算対象とする範囲の0%を示す値であり、
フルスケール値39は、プロセスの物理量の演算対象と
する範囲の100%を示す値である。FIG. 11 is a diagram showing a structure of attribute data specified corresponding to data by the programmable controller of the prior application. In FIG. 11, attribute data 15b
Has a base scale value 38 and a full scale value 39. Here, the base scale value 38 is a value indicating 0% of the range in which the physical quantity of the process is calculated.
The full scale value 39 is a value indicating 100% of the range in which the physical quantity of the process is calculated.
【0018】このベーススケール値38及びフルスケー
ル値39は、実数形式で表されている。実数形式とは、
物理量を少数を含めて表現することができ、制御の精度
からみて充分な精度を有するディジタルデータの形式で
あって、固定小数点形式と小数点移動量とで表現する
か、又は仮数と指数とからなる浮動小数点形式で表現す
ることが一般的に行われる。The base scale value 38 and the full scale value 39 are represented in a real number format. The real number format is
A physical quantity can be expressed including a small number, and it is a digital data format that has sufficient precision in terms of control precision.It is expressed in a fixed-point format and a moving amount of a decimal point, or consists of a mantissa and an exponent. It is common to represent in floating point format.
【0019】図12は、図11の属性データ15bを用
いて加算演算を行う例を示す図である。図12におい
て、加算演算器75は、入力データ71と入力データ7
3との加算を行って出力データ80として出力するもの
であり、正規化整数データを実数データに変換する実数
変換器76、77、実数データを正規化整数データに変
換する整数変換器79及び実数データの加算を行う加算
器78を備えている。また、入力データ71、73、出
力データ80はそれぞれ属性データ72、74、81を
備え、属性データ72のベーススケール値及びフルスケ
ール値は0、10に設定され、属性データ74のベース
スケール値及びフルスケール値は0、20に設定され、
属性データ81のベーススケール値及びフルスケール値
は0、30に設定されている。FIG. 12 is a diagram showing an example of performing an addition operation using the attribute data 15b of FIG. In FIG. 12, an addition calculator 75 includes input data 71 and input data 7.
3 and output as output data 80, real number converters 76 and 77 for converting normalized integer data to real number data, an integer converter 79 for converting real number data to normalized integer data, and a real number An adder 78 for adding data is provided. The input data 71 and 73 and the output data 80 have attribute data 72, 74 and 81, respectively. The base scale value and full scale value of the attribute data 72 are set to 0 and 10, respectively. The full scale value is set to 0, 20;
The base scale value and the full scale value of the attribute data 81 are set to 0 and 30.
【0020】そして、スケールが0〜10mmに対して
0〜10000の正規化整数で表現された入力データ7
1とスケールが0〜20mmに対して0〜10000の
正規化整数で表現された入力データ73とを加算する場
合、実数変換器76、77により属性データ72、74
を用いて入力データ71、73を実数に変換する。Then, the input data 7 whose scale is expressed by a normalized integer of 0 to 10000 with respect to 0 to 10 mm
When adding 1 and the input data 73 expressed by a normalized integer of 0 to 10000 with respect to a scale of 0 to 20 mm, the real number converters 76 and 77 cause the attribute data 72 and 74 to be added.
Is used to convert the input data 71, 73 into real numbers.
【0021】例えば、入力データ71が10000の正
規化整数である場合、属性データ72のベーススケール
値及びフルスケール値がそれぞれ0、10であるので、
実数10に変換され、入力データ42が10000の正
規化整数である場合、属性データ44のベーススケール
値及びフルスケール値がそれぞれ0、20であるので、
実数20に変換される。For example, when the input data 71 is a normalized integer of 10000, the base scale value and the full scale value of the attribute data 72 are 0 and 10, respectively.
If the input data 42 is converted to a real number 10 and the input data 42 is a normalized integer of 10000, the base scale value and the full scale value of the attribute data 44 are 0 and 20, respectively.
Converted to real number 20.
【0022】次に、実数変換器76、77により変換さ
れた後の実数データを加算器78に供給して加算を行
う。加算結果は、スケールが0〜30mmの実数データ
となる。この実数データを整数変換器79に供給し、出
力データ80のスケールが0〜30mmに対して0〜1
0000の正規化整数に変換する。Next, the real number data converted by the real number converters 76 and 77 is supplied to an adder 78 for addition. The addition result is real number data having a scale of 0 to 30 mm. This real number data is supplied to the integer converter 79, and the scale of the output data 80 is 0 to 1 with respect to 0 to 30 mm.
Convert to a normalized integer of 0000.
【0023】このように、先願のプログラマブルコント
ローラによれば、データに対応して明示された属性デー
タ15bのベーススケール値38及びフルスケール値3
9を使って実数により演算が行うことができるので、プ
ログラマはスケールを意識する必要がなくなる。As described above, according to the programmable controller of the prior application, the base scale value 38 and the full scale value 3 of the attribute data 15b specified corresponding to the data.
Since the operation can be performed by using a real number using 9, the programmer does not need to be conscious of the scale.
【0024】また、先願の特願平7−324481によ
れば、データの数値形式を設定したデータ形式をデータ
に対応させて格納し、データ形式に基づいてデータの数
値形式を変換するようにしたプログラマブルコントロー
ラが提案されている。According to Japanese Patent Application No. 7-324481, a data format in which a data numerical format is set is stored in association with the data, and the data numerical format is converted based on the data format. A programmable controller has been proposed.
【0025】図13は、先願のプログラマブルコントロ
ーラによるデータ形式をデータに対応して明示するよう
にした属性データの構成を示す図である。図13におい
て、属性データ15bは、データが表す物理量の演算対
象とする範囲の0%及び100%を示すベーススケール
値38及びフルスケール値39に加えてデータの数値形
式を設定したデータ形式35を備えている。FIG. 13 is a diagram showing a configuration of attribute data in which a data format by the programmable controller of the prior application is specified in correspondence with data. In FIG. 13, the attribute data 15b includes a data format 35 in which a numerical format of data is set in addition to a base scale value 38 and a full scale value 39 indicating 0% and 100% of a range in which a physical quantity represented by the data is to be calculated. Have.
【0026】このデータ形式35は、図14に示すよう
に、正規化整数形式35aや実数形式35bなどからな
る。図15は、図13の属性データ15bを用いて加算
演算を行う例を示す図である。The data format 35 includes a normalized integer format 35a and a real format 35b, as shown in FIG. FIG. 15 is a diagram illustrating an example of performing an addition operation using the attribute data 15b in FIG.
【0027】図15において、加算演算器95は、入力
データ91と入力データ93との加算を行って出力デー
タ100として出力するものであり、入力データのデー
タ形式を変換する入力形式変換器96、97、出力デー
タのデータ形式を変換する出力形式変換器99及び実数
データの加算を行う加算器98を備えている。In FIG. 15, an adder 95 adds an input data 91 and an input data 93 and outputs the result as output data 100. An input format converter 96 for converting the data format of the input data, 97, an output format converter 99 for converting the data format of the output data and an adder 98 for adding real number data.
【0028】ここで、入力形式変換器96、97は、属
性データ35により示されるデータ形式が正規化整数形
式35aである場合、入力データを実数形式35bに変
換して出力し、属性データ5bにより示されるデータ形
式が実数形式35bである場合、入力データをそのまま
出力する。Here, when the data format indicated by the attribute data 35 is the normalized integer format 35a, the input format converters 96 and 97 convert the input data into a real number format 35b and output it. If the data format shown is the real number format 35b, the input data is output as it is.
【0029】また、出力形式変換器99は、属性データ
35により示されるデータ形式が正規化整数形式35a
である場合、入力データを正規化整数形式35aに変換
して出力し、属性データ35により示されるデータ形式
が実数形式35bである場合、入力データをそのまま出
力する。The output format converter 99 converts the data format indicated by the attribute data 35 into a normalized integer format 35a.
, The input data is converted into the normalized integer format 35a and output. If the data format indicated by the attribute data 35 is the real number format 35b, the input data is output as it is.
【0030】入力データ91、93、出力データ100
はそれぞれ属性データ92、94、101を備え、属性
データ92のベーススケール値38及びフルスケール値
39は0、10に設定されるとともにデータ形式は正規
化整数形式35aに設定され、属性データ94のベース
スケール値38及びフルスケール値39は0、20に設
定されるとともにデータ形式は実数形式35bに設定さ
れ、属性データ101のベーススケール値38及びフル
スケール値39は0、30に設定されるとともにデータ
形式は正規化整数形式35aに設定されている。Input data 91 and 93, output data 100
Has attribute data 92, 94, and 101, respectively. The base scale value 38 and the full scale value 39 of the attribute data 92 are set to 0 and 10, the data format is set to the normalized integer format 35a. The base scale value 38 and the full scale value 39 are set to 0 and 20, the data format is set to the real number format 35b, and the base scale value 38 and the full scale value 39 of the attribute data 101 are set to 0 and 30. The data format is set to the normalized integer format 35a.
【0031】そして、加算演算器95は、スケールが0
〜10mmに対して0〜10000の正規化整数形式3
5aで表現された入力データ91と、スケールが0〜2
0mmに対して0〜10000の正規化整数形式35a
で表現された入力データ93とを加算する場合、入力形
式変換器96、97により属性データ92、94を用い
て実数形式35bのデータに変換する。The adder 95 calculates that the scale is 0.
Normalized integer format 3 from 0 to 10000 for 10 mm
The input data 91 represented by 5a and the scale of 0 to 2
0mm to 10000 normalized integer format 35a for 0mm
When adding the input data 93 represented by the formula (1), the input format converters 96 and 97 use the attribute data 92 and 94 to convert the data into real number format 35b data.
【0032】例えば、入力データ91が10000の正
規化整数形式35aである場合、属性データ92のベー
ススケール値及びフルスケール値がそれぞれ0、10で
あるので、実数10に変換される。For example, when the input data 91 is in the normalized integer format 35a of 10000, since the base scale value and the full scale value of the attribute data 92 are 0 and 10, respectively, they are converted to the real number 10.
【0033】次に、入力形式変換器96により変換され
た後の実数データと入力データ93とを加算器98に供
給して加算を行う。加算結果は、スケールが0〜30m
mの実数データとなる。この実数データを出力形式変換
器99に供給する。この場合、出力形式変換器99に
は、出力データ100のデータ形式として正規化整数形
式35aを示す属性データ101が供給されているの
で、加算器98から供給される実数データをスケールが
0〜30mmに対して0〜10000の正規化整数に変
換する。Next, the real number data converted by the input format converter 96 and the input data 93 are supplied to an adder 98 for addition. Addition result, scale is 0-30m
m real number data. The real number data is supplied to the output format converter 99. In this case, since the attribute data 101 indicating the normalized integer format 35a is supplied as the data format of the output data 100 to the output format converter 99, the real number data supplied from the adder 98 is scaled from 0 to 30 mm. Is converted to a normalized integer of 0 to 10,000.
【0034】このように、先願のプログラマブルコント
ローラによれば、データの数値形式を表す形式データを
データに対応させて持たせることにより、例えば加算と
乗算などの複数の演算を実数データのまま連続して行う
ことができるので、データ形式の変換を行う回数を減ら
すことができ、演算処理の速度を速くすることができ
る。また、正規化整数形式35aであるか実数形式35
bであるかをデータに対して明示することができ、正規
化整数形式35aのデータと実数形式35bのデータと
が混在している場合においても、データへの操作を誤り
なく行うことができる。As described above, according to the programmable controller of the prior application, by providing format data representing the numerical format of data in association with the data, a plurality of operations such as addition and multiplication can be continuously performed as real data. Therefore, the number of data format conversions can be reduced, and the speed of the arithmetic processing can be increased. In addition, in the normalized integer format 35a or the real number format 35a
It is possible to specify whether the data is b or not, and even when data in the normalized integer format 35a and data in the real number format 35b are mixed, the operation on the data can be performed without error.
【0035】[0035]
【発明が解決しようとする課題】しかしながら、上述し
たプログラマブルコントローラでは、正規化整数形式3
5aのデータと実数形式35bのデータとの間でデータ
変換が行われると、データ変換による誤差が生じること
があった。However, in the above-mentioned programmable controller, the normalized integer format 3
When data conversion is performed between the data of 5a and the data of the real number format 35b, an error may occur due to the data conversion.
【0036】すなわち、プログラマブルコントローラが
通常扱う12ビット程度のアナログ量を16ビットの正
規化整数形式35aや32ビットの実数形式35bで演
算する場合、誤差はほとんど問題にならないが、離散量
を表すデータを実数に変換して演算を行う場合、誤差が
発生して演算精度が低下することがあり、その結果、プ
ログラマブルコントローラの制御精度が低下することが
あった。That is, when an analog quantity of about 12 bits normally handled by a programmable controller is calculated in a 16-bit normalized integer format 35a or a 32-bit real format 35b, an error hardly matters, but data representing a discrete quantity is calculated. When an arithmetic operation is performed by converting to a real number, an error may occur to lower the operation accuracy, and as a result, the control accuracy of the programmable controller may decrease.
【0037】例えば、紙などの連続した物体をローラで
巻き取りながら一定の長さに切断するプロセスにおい
て、ローラの回転パルスカウンタで紙の総長を計測する
場合、回転パルスカウンタのカウント値を直ちに実数に
変換し、このカウント値と回転パルスカウンタの1パル
ス当たりの紙の長さとを乗算することにより巻き取られ
た紙の長さを求め、この巻き取られた紙の長さが一定長
に達した時点で紙を切断し、この切断された一定長の紙
の長さを積算して算出された紙の総長は、回転パルスカ
ウンタのカウント値を全ての紙の長さについて整数で積
算し、この積算したカウント値と回転パルスカウンタの
1パルス当たりの紙の長さとを乗算して算出された紙の
総長に比べて誤差が大きくなる。For example, in a process in which a continuous object such as paper is cut into a fixed length while being wound by a roller, when the total length of the paper is measured by a rotation pulse counter of the roller, the count value of the rotation pulse counter is immediately converted to a real number. The count value is multiplied by the length of the paper per pulse of the rotation pulse counter to determine the length of the wound paper, and the length of the wound paper reaches a certain length. At that point, the paper is cut, and the total length of the paper calculated by integrating the lengths of the cut fixed-length paper is calculated by integrating the count value of the rotation pulse counter as an integer for all paper lengths, The error is larger than the total length of the paper calculated by multiplying the integrated count value by the length of the paper per pulse of the rotation pulse counter.
【0038】また、同一の部品を連続して搬送しながら
一定の重量をまとめて梱包するプロセスにおいて、搬送
された部品の総重量を到着した部品の個数で計測する場
合、到着した部品の個数を直ちに実数に変換し、この到
着した部品の個数と部品の単位重量とを乗算して到着し
た部品の重量を求め、この到着した部品の重量が一定重
量になった時点でこれらの部品を梱包し、梱包した重量
を積算して算出された部品の総重量は、搬送された部品
の総個数を合計し、この合計した部品の総個数と部品の
単位重量とを乗算して算出された部品の総重量に比べて
誤差が大きくなる。Further, in the process of packing a fixed weight while continuously transporting the same parts, when measuring the total weight of the transported parts by the number of arrived parts, the number of arrived parts is measured. Immediately convert to a real number, multiply the number of arriving parts by the unit weight of the parts to obtain the weight of the arriving parts, and pack the parts when the weight of the arriving parts reaches a certain weight. The total weight of the parts calculated by integrating the packed weight is the total number of parts conveyed, and the total number of parts calculated by multiplying the total number of parts by the unit weight of the parts. The error is larger than the total weight.
【0039】そこで、本発明の目的は、誤差を増加させ
ることなく、様々な数値形式でデータ処理を行うことが
可能なプログラマブルコントローラを提供することであ
る。An object of the present invention is to provide a programmable controller capable of performing data processing in various numerical formats without increasing an error.
【0040】[0040]
【課題を解決するための手段】上述した課題を解決する
ために、本発明によれば、整数形式を含むデータ形式を
データに付与するデータ形式付与手段と、前記データの
1ディジットが表す単位物理量を付与する単位物理量付
与手段と、前記データ形式及び前記単位物理量に基づい
て演算処理を行う演算処理手段とを備えている。According to the present invention, there is provided, in accordance with the present invention, a data format providing means for providing a data format including an integer format to data, and a unit physical quantity represented by one digit of the data. And a calculation processing means for performing calculation processing based on the data format and the unit physical quantity.
【0041】そして、このデータ形式に基づいて、デー
タ変換を行うようにしたりデータ変換を行わないように
したりすることができるので、整数形式のデータを積算
する場合、整数形式のままデータを取り出して積算する
ことにより、データ変換による誤差の発生を抑制するこ
とができる。また、データの1ディジットが表す単位物
理量が付与されているので、データを物理量として容易
に取り出すことができる。Then, based on this data format, it is possible to perform data conversion or not to perform data conversion. Therefore, when integrating data in integer format, the data is taken out in integer format. By performing the integration, occurrence of an error due to data conversion can be suppressed. Further, since a unit physical quantity represented by one digit of data is assigned, data can be easily extracted as a physical quantity.
【0042】[0042]
【発明の実施の形態】以下、本発明の一実施例によるプ
ログラマブルコントローラについて図面を参照しながら
説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a programmable controller according to one embodiment of the present invention will be described with reference to the drawings.
【0043】図1は、本発明の一実施例によるプログラ
マブルコントローラの機能的な概略構成を示すブロック
図である。図1において、プログラマブルコントローラ
1は、整数形式を含むデータ形式をデータに付与するデ
ータ形式付与手段2、データの1ディジットが表す単位
物理量を付与する単位物理量付与手段3及びデータ形式
及び単位物理量に基づいて演算処理を行う演算処理手段
4を備えている。FIG. 1 is a block diagram showing a schematic functional configuration of a programmable controller according to one embodiment of the present invention. In FIG. 1, a programmable controller 1 includes a data format assigning unit 2 for assigning a data format including an integer format to data, a unit physical quantity assigning unit 3 for assigning a unit physical quantity represented by one digit of data, and a data format and a unit physical quantity. And an arithmetic processing means 4 for performing arithmetic processing.
【0044】ここで、データ形式は、データが正規化整
数形式、実数形式、整数形式などのいずれの形式で表現
されているかを示すものである。単位物理量は、浮動小
数点形式や10進形式で表現される。Here, the data format indicates whether the data is represented in a normalized integer format, a real number format, an integer format, or the like. The unit physical quantity is expressed in a floating point format or a decimal format.
【0045】演算処理手段4は、データ形式付与手段2
により付与されているデータ形式が整数形式である場
合、データに直接アクセスしてそのデータをそのまま取
り出して整数形式のデータを積算することができ、デー
タ変換による誤差の発生を抑制することができる。ま
た、データを物理量としてアクセスする際は、そのデー
タに対応する単位物理量を単位物理量付与手段3から取
り出し、そのデータを単位物理量と乗算して取り出すこ
とにより、データを物理量として容易に取り出すことが
できる。The arithmetic processing means 4 comprises a data format providing means 2
In the case where the data format given by is an integer format, the data can be directly accessed, the data can be taken out as it is, and the integer format data can be integrated, and the occurrence of errors due to data conversion can be suppressed. When data is accessed as a physical quantity, a unit physical quantity corresponding to the data is taken out from the unit physical quantity giving means 3, and the data is multiplied by the unit physical quantity and taken out, so that the data can be easily taken out as a physical quantity. .
【0046】次に、本発明の一実施例によるプログラマ
ブルコントローラの具体的な構成について図面を参照し
ながら説明する。図2は、本発明の一実施例によるプロ
グラマブルコントローラの概略構成を示すブロック図で
ある。Next, a specific configuration of the programmable controller according to one embodiment of the present invention will be described with reference to the drawings. FIG. 2 is a block diagram showing a schematic configuration of a programmable controller according to one embodiment of the present invention.
【0047】図2において、外部からのデータの入出力
を行う入出力手段11、外部との通信を行う通信手段1
2、プログラムの作成を行うプログラム手段13、プロ
グラムの格納を行うプログラム記憶手段14、データ1
5aと、データ15aの属性デ−タ15bとを格納する
データ記憶手段15、前記プログラムに基づいて演算を
行う演算手段16及びシステムの監視操作を行う監視操
作手段17がデータバス18を介して接続されている。In FIG. 2, input / output means 11 for inputting / outputting data from outside, and communication means 1 for communicating with the outside.
2. Program means 13 for creating a program, program storage means 14 for storing a program, data 1
A data storage means 15 for storing attribute data 15b of the data 15a and an arithmetic means 16 for performing an operation based on the program, and a monitoring operation means 17 for performing a system monitoring operation are connected via a data bus 18. Have been.
【0048】ここで、属性デ−タ15bは、図5に示す
ように、データ15aが表す物理量の演算対象とする範
囲の0%及び100%を示すベーススケール値38及び
フルスケール値39、データ15aの1ディジットが表
す単位物理量34及びデータ15aを表現しているデー
タ形式35などからなる。As shown in FIG. 5, the attribute data 15b includes a base scale value 38 and a full scale value 39 indicating 0% and 100% of the range of the physical quantity represented by the data 15a to be calculated. It comprises a unit physical quantity 34 represented by one digit of 15a and a data format 35 representing data 15a.
【0049】また、データ形式35は、図6に示すよう
に、正規化整数形式35a,実数形式35b、整数形式
35cなどからなる。データ15aや属性データ15b
は、入出力手段11や通信手段12、或いはプログラム
手段13から供給され、データ記憶手段15に格納され
る。そして、プログラム記憶手段14に格納されたプロ
グラムに従って、データ記憶手段15に格納されたデー
タ15a及び属性データ15bを演算手段16に供給
し、属性データ15bに基づいてデータ15aの演算を
行う。The data format 35 comprises a normalized integer format 35a, a real format 35b, an integer format 35c, and the like, as shown in FIG. Data 15a and attribute data 15b
Are supplied from the input / output unit 11, the communication unit 12, or the program unit 13 and stored in the data storage unit 15. Then, the data 15a and the attribute data 15b stored in the data storage unit 15 are supplied to the calculation unit 16 according to the program stored in the program storage unit 14, and the data 15a is calculated based on the attribute data 15b.
【0050】例えば、演算手段16は、データ形式35
に基づいて、データ15aを実数形式35bに変換して
演算を行ったり、データ15aを正規化整数形式35a
に変換して出力したり、整数形式35cのデータ15a
をそのまま取り出して積算したり、単位物理量34に基
づいて整数形式35cのデータ15aを物理量に変換し
たりする。For example, the calculating means 16 has a data format 35
, The data 15a is converted to a real number format 35b to perform an operation, or the data 15a is converted to a normalized integer format 35a.
And output the data 15a in the integer format 35c.
Is extracted as it is and integrated, or the data 15a in the integer format 35c is converted into a physical quantity based on the unit physical quantity 34.
【0051】次に、本発明の一実施例によるプログラマ
ブルコントローラのシステム構成について図面を参照し
ながら説明する。この実施例によるプログラマブルコン
トローラは、データ15aが表す物理量の演算対象とす
る範囲の0%及び100%を示すベーススケール値38
及びフルスケール値39、データの1ディジットが表す
単位物理量34及びデータを表現している数値形式を表
すデータ形式35をデータ15aに対応させて格納する
ようにしたものである。Next, a system configuration of a programmable controller according to an embodiment of the present invention will be described with reference to the drawings. The programmable controller according to this embodiment has a base scale value 38 indicating 0% and 100% of the range in which the physical quantity represented by the data 15a is to be calculated.
And a full scale value 39, a unit physical quantity 34 represented by one digit of data, and a data format 35 representing a numerical format representing data are stored in correspondence with the data 15a.
【0052】図3において、プログラマブルコントロー
ラは、プログラムローダ21、ローダインタフェース2
2、CPU(中央演算制御ユニット)23、プログラム
メモリ24、データメモリ25、ネットワークインタフ
ェース26、監視操作部28、PIOインタフェース3
1及びPIO32などにより構成され、ローダインタフ
ェース22、CPU(中央演算制御ユニット)23、プ
ログラムメモリ24、データメモリ25、ネットワーク
インタフェース26、監視操作部28及びPIOインタ
フェース31は、バス33により接続されている。In FIG. 3, the programmable controller comprises a program loader 21, a loader interface 2
2. CPU (Central Processing Control Unit) 23, program memory 24, data memory 25, network interface 26, monitoring operation unit 28, PIO interface 3
1, a PIO 32, etc., and a loader interface 22, a CPU (Central Processing Control Unit) 23, a program memory 24, a data memory 25, a network interface 26, a monitoring operation unit 28, and a PIO interface 31 are connected by a bus 33. .
【0053】ここで、プログラムローダ21はプログラ
ミングを行ったり、プログラムやデータの監視及び設定
などを行う。CPU23はプログラムメモリ24から命
令を読み出し、読み出した命令に従ってデータメモリ2
5中のデータを読み出し、読み出したデータに演算を行
ってデータメモリ25に演算結果を格納する。Here, the program loader 21 performs programming, and monitors and sets programs and data. The CPU 23 reads an instruction from the program memory 24, and reads the data memory 2 according to the read instruction.
5 is read, an operation is performed on the read data, and the operation result is stored in the data memory 25.
【0054】ネットワークインタフェース26はネット
ワーク27に接続され、外部の他のプログラマブルコン
トローラなどとの通信を行う。監視操作部28は表示器
29及び設定器30を備えており、プログラマブルコン
トローラを含むシステムの監視操作のための表示や設定
などを行う。PIO32は外部から入力されたデータを
データメモリ25に格納し、データメモリ25中のデー
タを外部に出力する。The network interface 26 is connected to a network 27 and communicates with another external programmable controller. The monitoring operation unit 28 includes a display unit 29 and a setting unit 30, and performs display and setting for monitoring operation of a system including a programmable controller. The PIO 32 stores data input from the outside in the data memory 25, and outputs the data in the data memory 25 to the outside.
【0055】データメモリ25は、図4に示すように、
図2のデータ15aとして、演算データ25a、入力デ
ータ25b及び出力データ25cを格納し、図2の属性
データ15bとして、演算属性データ25d、入力属性
データ25e及び出力属性データ25fを格納するもの
である。演算属性データ25d、入力属性データ25
e、出力属性データ25fなどの属性データ15bは、
図5に示すように、ベーススケール値38及びフルスケ
ール値39を備えている。ベーススケール値38は、プ
ロセスの物理量の演算対象とする範囲の0%を示す値で
あり、フルスケール値39は、プロセスの物理量の演算
対象とする範囲の100%を示す値である。また、演算
属性データ25d、入力属性データ25e、出力属性デ
ータ25fは、データ15aの1ディジットが表す単位
物理量34及びデータ15aの数値形式を設定したデー
タ形式35を備えている。データ形式35は、図6に示
すように、正規化整数形式35a,実数形式35b、整
数形式35cなどからなる。The data memory 25 includes, as shown in FIG.
Operation data 25a, input data 25b and output data 25c are stored as data 15a in FIG. 2, and operation attribute data 25d, input attribute data 25e and output attribute data 25f are stored as attribute data 15b in FIG. . Operation attribute data 25d, input attribute data 25
e, attribute data 15b such as output attribute data 25f,
As shown in FIG. 5, a base scale value 38 and a full scale value 39 are provided. The base scale value 38 is a value indicating 0% of the range in which the physical quantity of the process is calculated, and the full scale value 39 is a value indicating 100% of the range in which the physical quantity of the process is calculated. The operation attribute data 25d, the input attribute data 25e, and the output attribute data 25f have a unit physical quantity 34 represented by one digit of the data 15a and a data format 35 in which a numerical format of the data 15a is set. As shown in FIG. 6, the data format 35 includes a normalized integer format 35a, a real number format 35b, and an integer format 35c.
【0056】この場合、PIO32は、外部から供給さ
れる入力データ25bをPIOインタフェース31を介
してデータメモリ25に格納し、データメモリ25に格
納された出力データ25cをPIOインタフェース31
を介して外部に出力する。In this case, the PIO 32 stores the input data 25b supplied from the outside in the data memory 25 via the PIO interface 31, and outputs the output data 25c stored in the data memory 25 to the PIO interface 31.
Output to the outside via.
【0057】また、CPU23は、演算の途中結果の演
算データ25aをデータメモリ25に格納したり、デー
タメモリ25から読み出したりする。また、ネットワー
ク27は、他のプログラマブルコントローラから供給さ
れる入力データ25bをネットワークインタフェース2
6を介してデータメモリ25に格納し、データメモリ2
5に格納された出力データ25cをネットワークインタ
フェース26を介して外部に出力する。The CPU 23 stores the operation data 25a as the result of the operation in the data memory 25 or reads out the operation data 25a from the data memory 25. Also, the network 27 transmits the input data 25b supplied from another programmable controller to the network interface 2
6, and stored in the data memory 25, and the data memory 2
5 is output to the outside via the network interface 26.
【0058】また、プログラムローダ21及び監視操作
部28は、入力データ25b及び出力データ25cの表
示を行ったり設定を行ったりする。次に、本発明の一実
施例によるプログラマブルコントローラの設定動作につ
いて説明する。The program loader 21 and the monitoring operation unit 28 display and set the input data 25b and the output data 25c. Next, a setting operation of the programmable controller according to one embodiment of the present invention will be described.
【0059】プログラマはプログラムの設計を行う際
に、図5のベーススケール値38及びフルスケール値3
9をデータ15aのアドレスとともに設定する。この設
定したベーススケール値38及びフルスケール値39は
プログラムとともに、図3のプログラムローダ21によ
りプログラマブルコントローラに供給され、プログラム
メモリ24又はデータメモリ25に格納される。When the programmer designs a program, the base scale value 38 and the full scale value 3 shown in FIG.
9 is set together with the address of the data 15a. The set base scale value 38 and full scale value 39 are supplied to the programmable controller by the program loader 21 in FIG. 3 together with the program, and stored in the program memory 24 or the data memory 25.
【0060】また、プログラマはプログラムの設計を行
う際に、図5のベーススケール値38及びフルスケール
値39の設定とともにデータ15aの単位物理量34及
びデータ形式35についての設定も行う。この設定した
単位物理量34及びデータ形式35はプログラムととも
に、図3のプログラムローダ21によりプログラマブル
コントローラに供給され、プログラムメモリ24又はデ
ータメモリ25に格納される。When designing the program, the programmer sets the base physical value 34 and the data format 35 of the data 15a together with the setting of the base scale value 38 and the full scale value 39 in FIG. The set unit physical quantity 34 and data format 35 are supplied to the programmable controller by the program loader 21 in FIG. 3 together with the program, and stored in the program memory 24 or the data memory 25.
【0061】なお、以上の実施例では、プログラマが設
定したベーススケール値38、フルスケール値39、単
位物理量34及びデータ形式35を、プログラムローダ
21によりプログラマブルコントローラに供給する場合
について説明したが、PIO32で受信したベーススケ
ール値38、フルスケール値39、単位物理量34及び
データ形式35をPIOインタフェース31を介してデ
ータメモリ25に供給し、ベーススケール値38、フル
スケール値39、単位物理量34及びデータ形式35を
データ15aに対応させてデータメモリ25に格納する
ようにしてもよい。In the above embodiment, the case where the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 set by the programmer are supplied to the programmable controller by the program loader 21 has been described. Supplies the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 received to the data memory 25 via the PIO interface 31, and outputs the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format. 35 may be stored in the data memory 25 in association with the data 15a.
【0062】また、ネットワーク27に接続された他の
プログラマブルコントローラにデータ15aを転送する
場合、データ15aとともにベーススケール値38、フ
ルスケール値39、単位物理量34及びデータ形式35
を転送し、他のプログラマブルコントローラのベースス
ケール値38、フルスケール値39、単位物理量34及
びデータ形式35を設定するようにしてもよい。When transferring the data 15a to another programmable controller connected to the network 27, the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 are transferred together with the data 15a.
And the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 of another programmable controller may be set.
【0063】さらに、ベーススケール値38、フルスケ
ール値39、単位物理量34及びデータ形式35を監視
操作部28により変更し、その変更されたベーススケー
ル値38、フルスケール値39、単位物理量34及びデ
ータ形式35をデータメモリ25に格納するようにして
もよい。Further, the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 are changed by the monitoring operation unit 28, and the changed base scale value 38, the full scale value 39, the unit physical quantity 34, and the data The format 35 may be stored in the data memory 25.
【0064】次に、本発明の一実施例によるプログラマ
ブルコントローラの変換動作をCPU23により行う例
について説明する。図3において、データメモリ25に
格納されている入力データ25bと入力属性データ25
eのベーススケール値38、フルスケール値39、単位
物理量34及びデータ形式35とが、プログラムメモリ
24からのプログラムに従ってCPU23に供給され
る。Next, an example in which the conversion operation of the programmable controller according to one embodiment of the present invention is performed by the CPU 23 will be described. 3, the input data 25b and the input attribute data 25 stored in the data memory 25 are shown.
The base scale value 38, full scale value 39, unit physical quantity 34, and data format 35 of e are supplied to the CPU 23 according to a program from the program memory 24.
【0065】CPU23は入力データ25bのデータ形
式35を参照し、入力データ25bが正規化整数形式3
5aで表現されている場合、ベーススケール値38及び
フルスケール値39に基づいて入力データ25bを実数
データに変換してから、変換により得られた実数データ
に基づいて演算を行ったり、ベーススケール値38、フ
ルスケール値39及び単位物理量34を使用することに
より、正規化整数形式35aの物理量を示す入力データ
25bを整数形式35cのデータに変換してデータメモ
リ25に格納したりする。The CPU 23 refers to the data format 35 of the input data 25b and converts the input data 25b into the normalized integer format 3
5a, the input data 25b is converted into real number data based on the base scale value 38 and the full scale value 39, and then the calculation is performed based on the real number data obtained by the conversion. The input data 25b indicating the physical quantity in the normalized integer format 35a is converted into data in the integer format 35c by using the 38, the full scale value 39, and the unit physical quantity 34, and stored in the data memory 25.
【0066】ここで、CPU23より演算が行われた後
の実数データは、出力データ25cのデータ形式35が
正規化整数形式35aを示す場合、ベーススケール値3
8及びフルスケール値39に基づいて正規化整数形式3
5aのデータに変換され、この変換された正規化整数形
式35aのデータは、データメモリ25に格納される。
このデータメモリ25に格納された出力データ25c
は、PIOインタフェース31を介してPIO32によ
り外部に出力される。出力データ25cのデータ形式3
5が実数形式35bを示す場合、CPU23より演算が
行われた後の実数データをそのまま出力する。Here, the real number data after the calculation by the CPU 23 is the base scale value 3 when the data format 35 of the output data 25c indicates the normalized integer format 35a.
8 and normalized integer form 3 based on full scale value 39
5a, and the converted data in the normalized integer format 35a is stored in the data memory 25.
The output data 25c stored in the data memory 25
Is output to the outside by the PIO 32 via the PIO interface 31. Data format 3 of output data 25c
When 5 indicates the real number format 35b, the real number data after the calculation is performed by the CPU 23 is output as it is.
【0067】入力データ25bが実数形式35bで表現
されている場合、入力データ25bをそのまま用いて演
算を行ったり、単位物理量34を使用することにより、
実数形式の物理量35bを示す入力データ25bを整数
形式35cのデータに変換してデータメモリ25に格納
したりする。In the case where the input data 25b is expressed in the real number format 35b, an operation is performed using the input data 25b as it is, or by using the unit physical quantity 34,
The input data 25b indicating the physical quantity 35b in the real number format is converted into data in the integer format 35c and stored in the data memory 25.
【0068】入力データ25bが整数形式35cで表現
されており、かつ、入力データ25bに直接アクセスす
る場合、入力データ25bをそのまま取り出して演算を
行い、入力データ25bが整数形式35cで表現されて
おり、かつ、入力データ25bを物理量として取り出す
場合、単位物理量34を使用して、整数形式35cの入
力データ25bを実数形式35bの物理量に変換した
り、フルスケール値39、ベーススケール値38及び単
位物理量34を使用して、整数形式35cの入力データ
25bを正規化整数形式35aの物理量に変換したりす
る。この変換により得られた実数形式35bの物理量や
正規化整数形式35aの物理量は、データメモリ25に
格納される。When the input data 25b is expressed in the integer format 35c and the input data 25b is directly accessed, the input data 25b is taken out as it is and the operation is performed, and the input data 25b is expressed in the integer format 35c. When the input data 25b is extracted as a physical quantity, the input data 25b in the integer format 35c is converted into a physical quantity in the real format 35b using the unit physical quantity 34, or the full scale value 39, the base scale value 38, and the unit physical quantity 34 are used. Is used to convert the input data 25b in the integer format 35c into physical quantities in the normalized integer format 35a. The physical quantity in the real number format 35b and the physical quantity in the normalized integer format 35a obtained by this conversion are stored in the data memory 25.
【0069】次に、本発明の一実施例によるプログラマ
ブルコントローラの変換動作をPIO32で行う例につ
いて説明する。図3において、PIO32は、データメ
モリ25に格納されている入力データ25bと入力属性
データ25eのベーススケール値38、フルスケール値
39、単位物理量34及びデータ形式35とをPIOイ
ンタフェース31を介して読み出して、入力データ25
bのデータ形式35を参照し、入力データ25bが正規
化整数形式35aで表現されている場合、ベーススケー
ル値38及びフルスケール値39に基づいて入力データ
25bを実数データに変換し、変換により得られた実数
データをCPU23に供給したり、ベーススケール値3
8、フルスケール値39及び単位物理量34を使用する
ことにより、正規化整数形式35aの物理量を示す入力
データ25bを整数形式35cのデータに変換して出力
したりする。Next, an example in which the conversion operation of the programmable controller according to one embodiment of the present invention is performed by the PIO 32 will be described. 3, the PIO 32 reads the input data 25b and the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 of the input attribute data 25e stored in the data memory 25 via the PIO interface 31. And input data 25
b, when the input data 25b is expressed in the normalized integer format 35a, the input data 25b is converted into real number data based on the base scale value 38 and the full scale value 39, and obtained by the conversion. The supplied real number data is supplied to the CPU 23 or the base scale value 3
8. By using the full scale value 39 and the unit physical quantity 34, the input data 25b indicating the physical quantity in the normalized integer format 35a is converted into the data in the integer format 35c and output.
【0070】入力データ25bが実数形式35bで表現
されている場合、入力データ25bをそのままCPU2
3に供給したり、単位物理量34を使用することによ
り、実数形式35bの物理量を示す入力データ25bを
整数形式35cのデータに変換して出力したりする。When the input data 25b is expressed in the real number format 35b, the input data 25b is
3, the input data 25b indicating the physical quantity in the real number format 35b is converted into the data in the integer format 35c and output by using the unit physical quantity 34.
【0071】入力データ25bが整数形式35cで表現
されており、かつ、入力データ25bに直接アクセスす
る場合、入力データ25bをそのままCPU23に供給
したり、入力データ25bが整数形式35cで表現され
ており、かつ、入力データ25bを物理量として取り出
す場合、単位物理量34を使用して、整数形式35cの
入力データ25bを実数形式35bの物理量に変換して
出力したり、ベーススケール値38、フルスケール値3
9及び単位物理量34を使用して、整数形式35cの入
力データ25bを正規化整数形式35aの物理量に変換
して出力したりする。When the input data 25b is expressed in the integer format 35c and the input data 25b is directly accessed, the input data 25b is directly supplied to the CPU 23, or the input data 25b is expressed in the integer format 35c. Further, when extracting the input data 25b as a physical quantity, the input data 25b in the integer format 35c is converted into a physical quantity in the real format 35b using the unit physical quantity 34 and output, or the base scale value 38, the full scale value 3
The input data 25b in the integer format 35c is converted into a physical quantity in the normalized integer format 35a using the 9 and the unit physical quantity 34, and is output.
【0072】次に、CPU23は、PIO32から入力
された実数データに基づいて演算を行い、演算により得
られた実数データをPIOインタフェース31を介して
PIO32に出力したり、PIO32から入力された整
数データに対して加算演算などを行ってPIO32に出
力したりする。Next, the CPU 23 performs an operation based on the real number data input from the PIO 32 and outputs the real number data obtained by the operation to the PIO 32 via the PIO interface 31 or the integer data input from the PIO 32 , And outputs the result to the PIO 32.
【0073】PIO32は、出力データ25cのデータ
形式35が正規化整数形式35aを示す場合、ベースス
ケール値38及びフルスケール値39に基づいて、CP
U23から供給された実数データを正規化整数形式35
aのデータに変換し、PIOインタフェース31を介し
て外部に出力する。出力データ25cのデータ形式35
が実数形式35bを示す場合、CPU23より演算が行
われた後の実数データをそのまま出力する。When the data format 35 of the output data 25c indicates the normalized integer format 35a, the PIO 32 generates a CP based on the base scale value 38 and the full scale value 39.
Convert real number data supplied from U23 into normalized integer format 35
The data is converted to the data of “a” and output to the outside via the PIO interface 31. Data format 35 of output data 25c
Indicates the real number format 35b, the CPU 23 outputs the real number data after the calculation is performed as it is.
【0074】次に、本発明の一実施例によるプログラマ
ブルコントローラの変換動作をネットワーク27で行う
例について説明する。図3において、ネットワーク27
は、データメモリ25に格納されている入力データ25
bと入力属性データ25eのベーススケール値38、フ
ルスケール値39、単位物理量34及びデータ形式35
とをネットワークインタフェース26を介して読み出し
て、入力データ25bのデータ形式35を参照し、入力
データ25bが正規化整数形式35aで表現されている
場合、ベーススケール値38及びフルスケール値39に
基づいて入力データ25bを実数データに変換し、変換
により得られた実数データをCPU23に供給したり、
ベーススケール値38、フルスケール値39及び単位物
理量34を使用することにより、正規化整数形式35a
の物理量を示す入力データ25bを整数形式35cのデ
ータに変換して出力したりする。Next, an example in which the conversion operation of the programmable controller according to one embodiment of the present invention is performed on the network 27 will be described. In FIG. 3, the network 27
Is the input data 25 stored in the data memory 25
b, base scale value 38, full scale value 39, unit physical quantity 34, and data format 35 of input attribute data 25e
Are read out via the network interface 26, and the data format 35 of the input data 25b is referred to. When the input data 25b is expressed in the normalized integer format 35a, the input data 25b is read based on the base scale value 38 and the full scale value 39. The input data 25b is converted into real number data, and the real number data obtained by the conversion is supplied to the CPU 23,
By using the base scale value 38, the full scale value 39, and the unit physical quantity 34, the normalized integer form 35a
Is converted into data of an integer format 35c and output.
【0075】入力データ25bが実数形式35bで表現
されている場合、入力データ25bをそのままCPU2
3に供給したり、単位物理量34を使用することによ
り、実数形式35bの物理量を示す入力データ25bを
整数形式35cのデータに変換して出力したりする。When the input data 25b is expressed in the real number format 35b, the input data 25b is
3, the input data 25b indicating the physical quantity in the real number format 35b is converted into the data in the integer format 35c and output by using the unit physical quantity 34.
【0076】入力データ25bが整数形式35cで表現
されており、かつ、入力データ25bに直接アクセスす
る場合、入力データ25bをそのままCPU23に供給
したり、入力データ25bが整数形式35cで表現され
ており、かつ、入力データ25bを物理量として取り出
す場合、単位物理量34を使用して、整数形式35cの
データを実数形式35bの物理量に変換して出力した
り、フルスケール値39、ベーススケール値38及び単
位物理量34を使用して、整数形式35cのデータを正
規化整数形式35aの物理量に変換して出力したりす
る。When the input data 25b is expressed in the integer format 35c and the input data 25b is directly accessed, the input data 25b is directly supplied to the CPU 23, or the input data 25b is expressed in the integer format 35c. When the input data 25b is taken out as a physical quantity, the data in the integer format 35c is converted into a physical quantity in the real number format 35b using the unit physical quantity 34 and output, or the full scale value 39, the base scale value 38, the unit physical quantity For example, the data of the integer format 35c is converted into a physical quantity of the normalized integer format 35a by using the data 34 and output.
【0077】次に、CPU23はネットワーク27から
入力された実数データに基づいて演算を行い、演算によ
り得られた実数データをネットワークインタフェース2
6を介してネットワーク27に出力したり、ネットワー
ク27から入力された整数データに対して加算演算など
を行ってネットワーク27に出力したりする。Next, the CPU 23 performs an operation based on the real number data input from the network 27 and transmits the real number data obtained by the operation to the network interface 2.
6 and outputs the result to the network 27 by performing an addition operation or the like on the integer data input from the network 27.
【0078】ネットワーク27は、出力データ25cの
データ形式35が正規化整数形式35aを示す場合、ベ
ーススケール値38及びフルスケール値39に基づい
て、CPU23から供給された実数データを正規化整数
形式35aのデータに変換し、ネットワークインタフェ
ース26を介して外部に出力する。出力データ25cの
データ形式35が実数形式35bを示す場合、CPU2
3より演算が行われた後の実数データをそのまま出力す
る。When the data format 35 of the output data 25c indicates the normalized integer format 35a, the network 27 converts the real number data supplied from the CPU 23 into the normalized integer format 35a based on the base scale value 38 and the full scale value 39. , And output to the outside via the network interface 26. When the data format 35 of the output data 25c indicates the real format 35b, the CPU 2
The real number data after the calculation is performed from 3 is output as it is.
【0079】次に、本発明の一実施例によるプログラマ
ブルコントローラの変換動作及び表示動作を監視操作部
28で行う例について説明する。図3において、監視操
作部28は、データメモリ25に格納されている入力デ
ータ25bと入力属性データ25eのベーススケール値
38、フルスケール値39、単位物理量34及びデータ
形式35とを読み出して、入力データ25bのデータ形
式35を参照する。そして、単位物理量34を使用する
ことにより、実数形式35bの物理量を整数形式35c
のデータに変換してデータメモリ25に格納したり、ベ
ーススケール値38、フルスケール値39及び単位物理
量34を使用することにより、正規化整数形式35aの
物理量を整数形式35cのデータに変換してデータメモ
リ25に格納する。設定器30から入力データ25bを
設定する場合、10進形式や10進指数形式などで入力
された数値をベーススケール値38及びフルスケール値
39を用いて正規化整数データや実数データに変換し、
データメモリ25に格納したり、また、監視操作部28
は、例えば、入力データ25bを棒グラフで表示する場
合、入力データ25bとともにベーススケール値38及
びフルスケール値39をデータメモリ25から読み出
し、ベーススケール値38及びフルスケール値39を用
いて入力データ25bを適当な表示ドット数に変換して
表示器29に表示したり、入力データ25bが整数形式
35cで表現されている場合、単位物理量34を使用し
て、入力データ25bを実数形式35bの物理量に変換
して表示したり、フルスケール値39、ベーススケール
値38及び単位物理量34を使用して、入力データ25
bを正規化整数形式35aの物理量に変換して表示した
りする。Next, an example in which the conversion operation and the display operation of the programmable controller according to the embodiment of the present invention are performed by the monitoring operation unit 28 will be described. 3, the monitoring operation unit 28 reads out the base scale value 38, the full scale value 39, the unit physical quantity 34, and the data format 35 of the input data 25b and the input attribute data 25e stored in the data memory 25, and Reference is made to the data format 35 of the data 25b. Then, by using the unit physical quantity 34, the physical quantity in the real number format 35b is converted into the integer format 35c.
By converting the physical quantity in the normalized integer format 35a into data in the integer format 35c by using the base scale value 38, the full scale value 39, and the unit physical quantity 34 to store the data in the data memory 25. It is stored in the data memory 25. When setting the input data 25b from the setting device 30, a numerical value input in a decimal format or a decimal exponent format is converted into normalized integer data or real number data using the base scale value 38 and the full scale value 39,
The data is stored in the data memory 25 and the monitoring operation unit 28
For example, when the input data 25b is displayed as a bar graph, the base scale value 38 and the full scale value 39 are read from the data memory 25 together with the input data 25b, and the input data 25b is read using the base scale value 38 and the full scale value 39. When the input data 25b is converted into an appropriate display dot number and displayed on the display 29, or when the input data 25b is expressed in an integer format 35c, the input data 25b is converted into a physical value in a real number format 35b using the unit physical quantity 34. Input data 25 using the full scale value 39, the base scale value 38, and the unit physical quantity 34.
b is converted into a physical quantity in the normalized integer format 35a and displayed.
【0080】次に、本発明の一実施例によるプログラマ
ブルコントローラの変換動作及び表示動作をプログラム
ローダ21で行う例について説明する。図3において、
プログラムローダ21は、データメモリ25に格納され
ている入力データ25bと入力属性データ25eのベー
ススケール値38、フルスケール値39、単位物理量3
4及びデータ形式35とを読み出して、入力データ25
bのデータ形式35を参照する。そして、10進形式や
10進指数形式などで入力された数値をベーススケール
値38及びフルスケール値39を用いて正規化整数デー
タや実数データに変換し、データメモリ25に格納した
り、単位物理量34を使用することにより、実数形式3
5bの物理量を整数形式35cのデータに変換してデー
タメモリ25に格納したり、ベーススケール値38、フ
ルスケール値39及び単位物理量34を使用することに
より、正規化整数形式35aの物理量を整数形式35c
のデータに変換してデータメモリ25に格納したりす
る。Next, an example in which the conversion operation and the display operation of the programmable controller according to the embodiment of the present invention are performed by the program loader 21 will be described. In FIG.
The program loader 21 calculates the base scale value 38, the full scale value 39, and the unit physical quantity 3 of the input data 25b and the input attribute data 25e stored in the data memory 25.
4 and the data format 35, and read the input data 25.
Reference is made to the data format 35 of b. Then, a numerical value input in a decimal format or a decimal exponent format is converted into normalized integer data or real number data using the base scale value 38 and the full scale value 39, and stored in the data memory 25 or a unit physical quantity. 34, the real number format 3
The physical quantity of the normalized integer format 35a is converted into the integer format by converting the physical quantity of the 5b into the data of the integer format 35c and storing it in the data memory 25, or by using the base scale value 38, the full scale value 39 and the unit physical quantity 34. 35c
, And store it in the data memory 25.
【0081】また、プログラムローダ21は、入力デー
タ25bとともにベーススケール値38及びフルスケー
ル値39をデータメモリ25から読み出し、ベーススケ
ール値38及びフルスケール値39を用いて入力データ
25bを適当な表示ドット数に変換してモニタ表示した
り、入力データ25bが整数形式35cで表現されてい
る場合、単位物理量34を使用して、入力データ25b
を実数形式35bの物理量に変換して表示したり、フル
スケール値39、ベーススケール値38及び単位物理量
34を使用して、入力データ25bを正規化整数形式3
5aの物理量に変換して表示したりする。The program loader 21 reads the base scale value 38 and the full scale value 39 together with the input data 25b from the data memory 25, and uses the base scale value 38 and the full scale value 39 to convert the input data 25b into an appropriate display dot. If the input data 25b is converted to a number and displayed on a monitor, or the input data 25b is expressed in an integer format 35c, the input data 25b
Is converted to a physical quantity in the real number format 35b and displayed, or the input data 25b is converted to the normalized integer format 3 using the full scale value 39, the base scale value 38, and the unit physical quantity 34.
It is converted to the physical quantity of 5a and displayed.
【0082】次に、本発明の一実施例によるプログラマ
ブルコントローラで物理量変換演算及び整数演算を行う
例について説明する。図8において、物理量変換演算器
43は、入力データを物理量として取り出す場合、属性
データの単位物理量を使用して、整数形式35cの入力
データを実数形式35bの物理量に変換するものであ
り、実数変換器44及び実数乗算器45を備ている。Next, an example in which a physical quantity conversion operation and an integer operation are performed by a programmable controller according to an embodiment of the present invention will be described. In FIG. 8, when extracting the input data as a physical quantity, the physical quantity conversion calculator 43 converts the input data in the integer format 35c into the physical quantity in the real format 35b using the unit physical quantity of the attribute data. And a real number multiplier 45.
【0083】整数加算演算器47は、整数データの加算
を行うものであり、整数加算器48を備えている。物理
量変換演算器51は、入力データを物理量として取り出
す場合、属性データの単位物理量を使用して、整数形式
35cの入力データを実数形式35bの物理量に変換す
るものであり、実数変換器52及び実数乗算器53を備
ている。The integer adder 47 performs addition of integer data, and has an integer adder 48. When extracting the input data as a physical quantity, the physical quantity conversion computing unit 51 converts the input data in the integer format 35c into the physical quantity in the real number format 35b using the unit physical quantity of the attribute data. A multiplier 53 is provided.
【0084】入力データ41、カウント積算値49はそ
れぞれ属性データ42、50を備えており、属性データ
42は入力データ41のデータ形式35が整数形式35
cであること及び単位物理量34が2.5mmであるこ
とを示し、属性データ50はカウント積算値49のデー
タ形式35が整数形式35cであること及び単位物理量
34が2.5mmであることを示している。The input data 41 and the count integrated value 49 have attribute data 42 and 50, respectively.
c and the unit physical quantity 34 is 2.5 mm, and the attribute data 50 indicates that the data format 35 of the count integrated value 49 is an integer format 35c and that the unit physical quantity 34 is 2.5 mm. ing.
【0085】入力データ41を物理量として取り出す場
合、入力データ41のデータ形式35が整数形式35c
であるので、入力データ41を物理量変換演算器43に
供給して物理量に変換する。すなわち、入力データ41
を実数変換器44により実数に変換してから、属性デー
タ42の単位物理量34として設定されている2.5m
mを実数乗算器45により乗算し、入力データ41を物
理量としての長さデータ46に変換する。When the input data 41 is taken out as a physical quantity, the data format 35 of the input data 41 is changed to the integer format 35c.
Therefore, the input data 41 is supplied to the physical quantity conversion calculator 43 to be converted into a physical quantity. That is, the input data 41
Is converted to a real number by the real number converter 44, and then the 2.5 m set as the unit physical quantity 34 of the attribute data 42 is set.
m is multiplied by a real number multiplier 45 to convert the input data 41 into length data 46 as a physical quantity.
【0086】入力データ41に直接アクセスして入力デ
ータ41の積算を行う場合、入力データ41をそのまま
整数加算演算器47に供給し、カウント積算値49との
加算を整数加算器48により行って、この加算結果を新
たなカウント積算値49とする。When the input data 41 is directly accessed and the input data 41 is integrated, the input data 41 is supplied as it is to the integer adder 47, and the addition with the count integrated value 49 is performed by the integer adder 48. The addition result is set as a new count integrated value 49.
【0087】カウント積算値49を物理量として取り出
す場合、カウント積算値49のデータ形式35が整数形
式35cであるので、カウント積算値49を物理量変換
演算器51に供給して物理量に変換する。すなわち、カ
ウント積算値49を実数変換器52により実数に変換し
てから、属性データ50の単位物理量34として設定さ
れている2.5mmを実数乗算器53により乗算し、カ
ウント積算値49を物理量としての長さ積算データ54
に変換する。When the count integrated value 49 is taken out as a physical quantity, since the data format 35 of the count integrated value 49 is an integer format 35c, the count integrated value 49 is supplied to the physical quantity conversion calculator 51 to be converted into a physical quantity. That is, the count integrated value 49 is converted into a real number by the real number converter 52, and then multiplied by 2.5 mm set as the unit physical quantity 34 of the attribute data 50 by the real number multiplier 53, and the count integrated value 49 is converted into a physical quantity. Length integrated data 54
Convert to
【0088】この長さ積算データ54は、カウント値を
そのまま積算したカウント積算値49に基づいて算出さ
れているので、従来のプログラマブルコントローラで算
出した場合に比べて精度が向上する。Since the length integrated data 54 is calculated based on the count integrated value 49 obtained by integrating the count value as it is, the accuracy is improved as compared with the case where it is calculated by the conventional programmable controller.
【0089】なお、物理量変換演算器43、51は、図
3のCPU22の機能として実現できるほか、ネットワ
ーク27や監視操作部28の機能としても実現すること
ができる。The physical quantity conversion calculators 43 and 51 can be realized as functions of the CPU 22 in FIG. 3 and also as functions of the network 27 and the monitoring operation unit 28.
【0090】以上説明したように、本発明の一実施例に
よるプログラマブルコントローラによれば、データに対
応してデータ形式とデータの1ディジットに対する単位
物理量を設定し、整数形式のデータの変換を行わないよ
うにして整数形式のデータに直接アクセスし、整数形式
のデータのままで演算を行うことにより、データ変換に
より発生する誤差の増大を抑制することができるととも
に、データに対応して設定された単位物理量をデータと
乗算してからデータを取り出すことにより、データを物
理量でアクセスすることもできる。As described above, according to the programmable controller of one embodiment of the present invention, the data format and the unit physical quantity for one digit of the data are set in accordance with the data, and the conversion of the integer format data is not performed. In this way, by directly accessing the data in the integer format and performing the operation with the data in the integer format as it is, it is possible to suppress the increase in the error caused by the data conversion and to set the unit physical quantity corresponding to the data. Is multiplied by the data and then the data is taken out, so that the data can be accessed with a physical quantity.
【0091】なお、上述した実施例では、単位物理量3
4を浮動小数点形式で表現した場合について説明した
が、図7に示すように、単位物理量34を10進形式の
係数値36と指数値37との組み合わせで表現するよう
にしてもよい。例えば、係数値36を1〜255の範囲
の8ビット値、10を底とする指数値37を−128〜
127の範囲の8ビット値とすると、単位物理量34は
16ビットとなるので、浮動小数点形式で表現した場合
に比べてメモリの容量を節約することができる。また、
監視操作部の28の表示器29やプログラムローダ21
の表示器では、通常10進表示とするので、わかりやす
い。In the above embodiment, the unit physical quantity 3
4 has been described in the floating-point format, but the unit physical quantity 34 may be represented by a combination of the coefficient value 36 and the exponent value 37 in the decimal format as shown in FIG. For example, the coefficient value 36 is an 8-bit value in the range of 1 to 255, and the exponent value 37 with the base 10 is -128 to
If the 8-bit value is in the range of 127, the unit physical quantity 34 is 16 bits, so that the memory capacity can be saved as compared with the case where the unit physical quantity 34 is expressed in the floating-point format. Also,
The display 29 and the program loader 21 of the monitoring operation unit 28
Is easy to understand because it is usually displayed in decimal.
【0092】[0092]
【発明の効果】以上説明したように、本発明によれば、
データの1ディジットに相当する単位物理量を示す情報
と、データ形式を示す情報とをデータに対応させて設定
することにより、データ形式に基づいて整数形式のデー
タをそのまま取り出したり、データと単位物理量とを乗
算して取り出したりすることが可能となり、誤差の増大
させることなくデータを物理量に変換して取り出すこと
ができる。As described above, according to the present invention,
By setting information indicating a unit physical quantity corresponding to one digit of data and information indicating a data format in association with the data, data in an integer format can be directly extracted based on the data format, or data and a unit physical quantity can be extracted. Can be multiplied and extracted, and the data can be converted into a physical quantity and extracted without increasing the error.
【図1】本発明の一実施例によるプログラマブルコント
ローラの機能的な構成を示すブロック図である。FIG. 1 is a block diagram showing a functional configuration of a programmable controller according to one embodiment of the present invention.
【図2】本発明の一実施例によるプログラマブルコント
ローラの機能的な構成を示すブロック図である。FIG. 2 is a block diagram showing a functional configuration of a programmable controller according to one embodiment of the present invention.
【図3】本発明の一実施例によるプログラマブルコント
ローラの概略構成を示すブロック図である。FIG. 3 is a block diagram showing a schematic configuration of a programmable controller according to one embodiment of the present invention.
【図4】本発明の一実施例によるデータメモリの概略構
成を示すブロック図である。FIG. 4 is a block diagram showing a schematic configuration of a data memory according to one embodiment of the present invention.
【図5】本発明の第1実施例による属性データの概略構
成を示すブロック図である。FIG. 5 is a block diagram showing a schematic configuration of attribute data according to the first embodiment of the present invention.
【図6】本発明の一実施例によるデータ形式を示すデー
タの構成を示す図である。FIG. 6 is a diagram showing a data structure indicating a data format according to an embodiment of the present invention.
【図7】本発明の第2実施例による属性データの概略構
成を示すブロック図である。FIG. 7 is a block diagram showing a schematic configuration of attribute data according to a second embodiment of the present invention.
【図8】本発明の一実施例による演算装置の概略構成を
示すブロック図である。FIG. 8 is a block diagram showing a schematic configuration of an arithmetic unit according to one embodiment of the present invention.
【図9】従来のデータメモリの概略構成を示すブロック
図である。FIG. 9 is a block diagram showing a schematic configuration of a conventional data memory.
【図10】従来の加算演算器の概略構成を示すブロック
図である。FIG. 10 is a block diagram illustrating a schematic configuration of a conventional addition operation unit.
【図11】先願の属性データの概略構成を示すブロック
図である。FIG. 11 is a block diagram showing a schematic configuration of attribute data of the prior application.
【図12】先願の加算演算器の概略構成を示すブロック
図である。FIG. 12 is a block diagram showing a schematic configuration of an addition arithmetic unit of the prior application.
【図13】先願の属性データの概略構成を示すブロック
図である。FIG. 13 is a block diagram showing a schematic configuration of attribute data of the prior application.
【図14】先願のデータ形式を示すデータの構成を示す
図である。FIG. 14 is a diagram showing the structure of data indicating the data format of the prior application.
【図15】先願の加算演算器の概略構成を示すブロック
図である。FIG. 15 is a block diagram showing a schematic configuration of an addition arithmetic unit of the prior application.
1 プログラマブルコントローラ 2 データ形式付与手段 3 単位物理量付与手段 4 演算処理手段 11 入出力手段 12 通信手段 13 プログラム手段 14 プログラム記憶手段 15 データ記憶手段 15a 正規化整数データ 15b 属性データ 16 演算手段 17 監視操作手段 21 プログラムローダ 22 ローダインターフェース 23 CPU 24 プログラムメモリ 25 データメモリ 25a 演算データ 25b、41 入力データ 25c 出力データ 25d 演算属性データ 25e 入力属性データ 25f 出力属性データ 26 ネットワークインターフェース 27 ネットワーク 28 監視操作部 29 表示器 30 設定器 31 PIOインターフェース 32 PIO 42、50 属性データ 34 単位物理量 35 データ形式を示すデータ 35a 正規化整数形式を示すデータ 35b 実数形式を示すデータ 35c 整数形式を示すデータ 36 係数値 37 指数値 38 ベーススケール値 39 フルスケール値 43、51 物理量変換演算器 44、52 実数変換器 45、53 実数乗算器 46 長さデータ 47 整数加算演算器 48 整数加算器 49 カウント積算値 54 長さ積算データ DESCRIPTION OF SYMBOLS 1 Programmable controller 2 Data format provision means 3 Unit physical quantity provision means 4 Arithmetic processing means 11 Input / output means 12 Communication means 13 Program means 14 Program storage means 15 Data storage means 15a Normalized integer data 15b Attribute data 16 Calculation means 17 Monitoring operation means Reference Signs List 21 program loader 22 loader interface 23 CPU 24 program memory 25 data memory 25a operation data 25b, 41 input data 25c output data 25d operation attribute data 25e input attribute data 25f output attribute data 26 network interface 27 network 28 monitoring operation unit 29 display 30 Setting device 31 PIO interface 32 PIO 42, 50 Attribute data 34 Unit physical quantity 35 Data indicating data format 35 Data indicating a normalized integer format 35b Data indicating a real number format 35c Data indicating an integer format 36 Coefficient value 37 Exponent value 38 Base scale value 39 Full scale value 43,51 Physical quantity conversion calculator 44,52 Real number converter 45,53 Real number Multiplier 46 Length data 47 Integer adder 48 Integer adder 49 Count integrated value 54 Length integrated data
───────────────────────────────────────────────────── フロントページの続き (72)発明者 永塚 一人 東京都日野市富士町1番地 富士ファコム 制御株式会社内 ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Hitoshi Nagatsuka 1 Fujimachi, Hino City, Tokyo Inside Fujifacom Control Co., Ltd.
Claims (28)
手段と、 外部とデータ通信を行う通信手段と、 プログラムの作成を行うプログラム手段と、 前記プログラムの格納を行うプログラム記憶手段と、 データと、前記データの1ディジットが表す単位物理量
及び整数形式を含むデータ形式とを前記データに対応さ
せて格納するデータ記憶手段と、 前記プログラムに基づいて演算を行う演算手段と、 システムの監視操作を行う監視操作手段とを備えること
を特徴とするプログラマブルコントローラ。An input / output means for inputting / outputting data from / from the outside; a communication means for performing data communication with the outside; a program means for creating a program; a program storage means for storing the program; A data storage unit for storing a data format including a unit physical quantity and an integer format represented by one digit of the data in association with the data; a calculation unit for performing a calculation based on the program; and a system monitoring operation. A programmable controller, comprising:
記プログラム手段により生成し、前記プログラム手段に
より生成されたデータ形式を前記データ記憶手段に格納
することを特徴とする請求項1に記載のプログラマブル
コントローラ。2. The programmable controller according to claim 1, wherein the unit physical quantity and the data format are generated by the program unit, and the data format generated by the program unit is stored in the data storage unit. .
理量及び前記データ形式を、データとともに前記データ
記憶手段に格納することを特徴とする請求項1に記載の
プログラマブルコントローラ。3. The programmable controller according to claim 1, wherein the unit physical quantity and the data format received by the communication unit are stored together with data in the data storage unit.
記監視操作手段により変更し、前記監視操作手段により
変更された前記単位物理量及び前記データ形式を前記デ
ータ記憶手段に格納することを特徴とする請求項1に記
載のプログラマブルコントローラ。4. The method according to claim 1, wherein the unit physical quantity and the data format are changed by the monitoring operation means, and the unit physical quantity and the data format changed by the monitoring operation means are stored in the data storage means. Item 2. The programmable controller according to Item 1.
表現し、前記単位物理量に基づいて浮動小数点演算を行
うことにより、整数形式のデータを実数形式の物理量に
変換することを特徴とする請求項1に記載のプログラマ
ブルコントローラ。5. The method according to claim 1, wherein the unit physical quantity is expressed in a floating-point format, and floating-point arithmetic is performed based on the unit physical quantity to convert the integer-format data into a real-format physical quantity. 4. The programmable controller according to 1.
み合わせによる10進形式により表現し、前記単位物理
量に基づいて整数演算を行うことにより、整数形式のデ
ータを10進形式の物理量に変換することを特徴とする
請求項1に記載のプログラマブルコントローラ。6. The integer physical data is converted to a decimal physical quantity by expressing the unit physical quantity in a decimal form by a combination of a coefficient value and an exponent value and performing an integer operation based on the unit physical quantity. The programmable controller according to claim 1, wherein:
いて、前記単位物理量を使用することにより、整数形式
のデータを実数形式の物理量に変換し、前記データ記憶
手段に格納することを特徴とする請求項1に記載のプロ
グラマブルコントローラ。7. The arithmetic means converts the data in integer format into a physical quantity in real number format by using the unit physical quantity based on the data format, and stores the data in the data storage means. The programmable controller according to claim 1.
いて、前記単位物理量、前記データが表す物理量の演算
対象とする範囲の100%及び0%を示すフルスケール
値及びベーススケール値を使用することにより、整数形
式のデータを正規化整数形式の物理量に変換し、前記デ
ータ記憶手段に格納することを特徴とする請求項1に記
載のプログラマブルコントローラ。8. The calculation means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the data in the integer format is converted into a physical quantity in a normalized integer format and stored in the data storage means.
いて、前記単位物理量を使用することにより、実数形式
の物理量を整数形式のデータに変換し、前記データ記憶
手段に格納することを特徴とする請求項1に記載のプロ
グラマブルコントローラ。9. The method according to claim 8, wherein the calculating means uses the unit physical quantity based on the data format to convert a real quantity physical quantity into integer format data and stores the data in the data storage means. The programmable controller according to claim 1.
づいて、前記単位物理量、前記データが表す物理量の演
算対象とする範囲の100%及び0%を示すフルスケー
ル値及びベーススケール値を使用することにより、正規
化整数形式の物理量を整数形式のデータに変換し、前記
データ記憶手段に格納する請求項1に記載のプログラマ
ブルコントローラ。10. The arithmetic means uses a full scale value and a base scale value indicating 100% and 0% of a range to be operated on the unit physical quantity, the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the physical quantity in a normalized integer format is converted into data in an integer format and stored in the data storage means.
基づいて、前記単位物理量を使用することにより、整数
形式のデータを実数形式の物理量に変換して入力するこ
とを特徴とする請求項1に記載のプログラマブルコント
ローラ。11. The method according to claim 1, wherein the input / output unit converts the data in the integer format into a physical quantity in the real number format and inputs the data by using the unit physical quantity based on the data format. 4. The programmable controller according to 1.
基づいて、前記単位物理量、前記データが表す物理量の
演算対象とする範囲の100%及び0%を示すフルスケ
ール値及びベーススケール値を使用することにより、整
数形式のデータを正規化整数形式の物理量に変換して入
力することを特徴とする請求項1に記載のプログラマブ
ルコントローラ。12. The input / output means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the data in the integer format is converted into a physical quantity in a normalized integer format and input.
基づいて、前記単位物理量を使用することにより、実数
形式の物理量を整数形式のデータに変換して出力するこ
とを特徴とする請求項1に記載のプログラマブルコント
ローラ。13. The system according to claim 1, wherein said input / output means converts the physical quantity in a real number format into data in an integer format and outputs the data by using said unit physical quantity based on said data format. 4. The programmable controller according to 1.
基づいて、前記単位物理量、前記データが表す物理量の
演算対象とする範囲の100%及び0%を示すフルスケ
ール値及びベーススケール値を使用することにより、正
規化整数形式の物理量を整数形式のデータに変換して出
力することを特徴とする請求項1に記載のプログラマブ
ルコントローラ。14. The input / output means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the controller converts the physical quantity in the normalized integer format into data in the integer format and outputs the data.
づいて、前記単位物理量を使用することにより、整数形
式のデータを実数形式の物理量に変換して入力すること
を特徴とする請求項1に記載のプログラマブルコントロ
ーラ。15. The method according to claim 1, wherein the communication unit converts the data in the integer format into a physical quantity in the real number format and inputs the data by using the unit physical quantity based on the data format. The programmable controller as described.
づいて、前記単位物理量、前記データが表す物理量の演
算対象とする範囲の100%及び0%を示すフルスケー
ル値及びベーススケール値を使用することにより、整数
形式のデータを正規化整数形式の物理量に変換して入力
することを特徴とする請求項1に記載のプログラマブル
コントローラ。16. The communication means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the data in the integer format is converted into a physical quantity in the normalized integer format and input.
づいて、前記単位物理量を使用することにより、実数形
式の物理量を整数形式のデータに変換して出力すること
を特徴とする請求項1に記載のプログラマブルコントロ
ーラ。17. The method according to claim 1, wherein the communication unit converts the physical quantity in real number format into data in integer format and outputs the data by using the unit physical quantity based on the data format. The programmable controller as described.
づいて、前記単位物理量、前記データが表す物理量の演
算対象とする範囲の100%及び0%を示すフルスケー
ル値及びベーススケール値を使用することにより、正規
化整数形式の物理量を整数形式のデータに変換して出力
することを特徴とする請求項1に記載のプログラマブル
コントローラ。18. The communication means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the physical quantity in a normalized integer format is converted into integer format data and output.
に基づいて、前記単位物理量を使用することにより、整
数形式のデータを実数形式の物理量に変換して表示する
ことを特徴とする請求項1に記載のプログラマブルコン
トローラ。19. The system according to claim 1, wherein the monitoring operation unit converts the data in the integer format into a physical quantity in the real number format and displays the data by using the unit physical quantity based on the data format. 4. The programmable controller according to 1.
に基づいて、前記単位物理量、前記データが表す物理量
の演算対象とする範囲の100%及び0%を示すフルス
ケール値及びベーススケール値を使用することにより、
整数形式のデータを正規化整数形式の物理量に変換して
表示することを特徴とする請求項1に記載のプログラマ
ブルコントローラ。20. The monitoring operation means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. By doing
2. The programmable controller according to claim 1, wherein data in an integer format is converted into a physical quantity in a normalized integer format and displayed.
に基づいて、前記単位物理量を使用することにより、実
数形式の物理量を整数形式のデータに変換し、前記デー
タ記憶手段に格納することを特徴とする請求項1に記載
のプログラマブルコントローラ。21. The monitoring and operating means converts a physical quantity in a real number format into data in an integer format by using the unit physical quantity based on the data format, and stores the data in the data storage means. The programmable controller according to claim 1, wherein
に基づいて、前記単位物理量、前記データが表す物理量
の演算対象とする範囲の100%及び0%を示すフルス
ケール値及びベーススケール値を使用することにより、
正規化整数形式の物理量を整数形式のデータに変換し、
前記データ記憶手段に格納することを特徴とする請求項
1に記載のプログラマブルコントローラ。22. The monitoring operation means uses a full-scale value and a base-scale value indicating 100% and 0% of a calculation target range of the unit physical quantity, the physical quantity represented by the data, based on the data format. By doing
Convert a physical quantity in normalized integer format to data in integer format,
2. The programmable controller according to claim 1, wherein the data is stored in the data storage unit.
式に基づいて、前記単位物理量を使用することにより、
整数形式のデータを実数形式の物理量に変換して表示す
ることを特徴とする請求項1に記載のプログラマブルコ
ントローラ。23. The program unit, by using the unit physical quantity based on the data format,
2. The programmable controller according to claim 1, wherein data in an integer format is converted into a physical quantity in a real number format and displayed.
式に基づいて、前記単位物理量、前記データが表す物理
量の演算対象とする範囲の100%及び0%を示すフル
スケール値及びベーススケール値を使用することによ
り、整数形式のデータを正規化整数形式の物理量に変換
して表示することを特徴とする請求項1に記載のプログ
ラマブルコントローラ。24. The program means uses a full-scale value and a base-scale value indicating 100% and 0% of a range to be calculated for the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the data in an integer format is converted into a physical quantity in a normalized integer format and displayed.
式に基づいて、前記単位物理量を使用することにより、
実数形式の物理量を整数形式のデータに変換し、前記デ
ータ記憶手段に格納することを特徴とする請求項1に記
載のプログラマブルコントローラ。25. The program unit, by using the unit physical quantity based on the data format,
2. The programmable controller according to claim 1, wherein a physical quantity in a real number format is converted into data in an integer format and stored in the data storage unit.
式に基づいて、前記単位物理量、前記データが表す物理
量の演算対象とする範囲の100%及び0%を示すフル
スケール値及びベーススケール値を使用することによ
り、正規化整数形式の物理量を整数形式のデータに変換
し、前記データ記憶手段に格納することを特徴とする請
求項1に記載のプログラマブルコントローラ。26. The program unit uses a full scale value and a base scale value indicating 100% and 0% of a calculation target range of the physical quantity represented by the data, based on the data format. 2. The programmable controller according to claim 1, wherein the physical quantity in the normalized integer format is converted into data in the integer format and stored in the data storage means.
付与するデータ形式付与手段と、 前記データの1ディジットが表す単位物理量を付与する
単位物理量付与手段と、 前記データ形式及び前記単位物理量に基づいて演算処理
を行う演算処理手段とを備えることを特徴とするプログ
ラマブルコントローラ。27. A data format assigning unit for assigning a data format including an integer format to data, a unit physical quantity assigning unit for assigning a unit physical quantity represented by one digit of the data, and a data format and a unit physical quantity based on the data format and the unit physical quantity. A programmable controller comprising: an arithmetic processing unit for performing arithmetic processing.
を前記データに対応させて記憶しているプログラマブル
コントローラ用記憶媒体。28. A storage medium for a programmable controller which stores attribute data including a unit physical quantity of data in association with the data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17935796A JPH1027011A (en) | 1996-07-09 | 1996-07-09 | Programmable controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17935796A JPH1027011A (en) | 1996-07-09 | 1996-07-09 | Programmable controller |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH1027011A true JPH1027011A (en) | 1998-01-27 |
Family
ID=16064441
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17935796A Pending JPH1027011A (en) | 1996-07-09 | 1996-07-09 | Programmable controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH1027011A (en) |
-
1996
- 1996-07-09 JP JP17935796A patent/JPH1027011A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20170315778A1 (en) | Semiconductor device | |
| US5995991A (en) | Floating point architecture with tagged operands | |
| JP3178746B2 (en) | Format converter for floating point numbers | |
| JPS648856B2 (en) | ||
| JP2981769B2 (en) | Waveform display device | |
| US7890558B2 (en) | Apparatus and method for precision binary numbers and numerical operations | |
| JPH1027011A (en) | Programmable controller | |
| JP4228706B2 (en) | Electronic control device and storage device of the electronic control device | |
| JPS5939774B2 (en) | Exponential function calculation method | |
| JPH09167005A (en) | Programmable controller | |
| US7941473B2 (en) | Calculation apparatus and storage medium in which calculation program is stored | |
| JP2974683B2 (en) | Numerical data management processing method | |
| JPH03192429A (en) | square root calculation device | |
| JP4337719B2 (en) | COMPUTER DEVICE AND COMPUTER PROCESSING PROGRAM | |
| Kraeling | Fixed-point math in time-critical C applications | |
| WO2024261944A1 (en) | Information processing device, information processing method, and computer-readable non-transitory storage medium | |
| JPH07248898A (en) | Scale factor calculating method | |
| JP4428778B2 (en) | Arithmetic device, arithmetic method, and computing device | |
| JP2005031847A (en) | Integer arithmetic method, integer arithmetic program, and integer arithmetic device | |
| JPH02165225A (en) | Arithmetic processing unit for floating point numeral with accuracy | |
| JPS6275838A (en) | Variable precision numerical data calculation device | |
| JPS6033629A (en) | Operating device | |
| CN117707471A (en) | Environment acquisition equipment, target equipment and data processing method and system thereof | |
| JPH01297721A (en) | Real number data converter | |
| JPH11241943A (en) | Electronic toll scale |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Effective date: 20040318 Free format text: JAPANESE INTERMEDIATE CODE: A971007 |
|
| A131 | Notification of reasons for refusal |
Effective date: 20040406 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20041019 |