EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 695

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
662
Data Control Instructions Section 3-17
Description SCL3(487) is used to convert the signed BCD data (the BCD data contains
the absolute value and the Carry Flag shows the sign) contained in the source
word S into signed binary data and place the result in the result word R
according to the linear function defined by the slope (
X, Y) and an offset.
The maximum and minimum conversion values are also specified. The
address of the first word containing
X, Y, the offset, the maximum conver-
sion, and the minimum conversion is specified for the first parameter word P1.
The sign of the result is indicated by the status of the Carry Flag (ON: nega-
tive, OFF: positive). Use STC(040) and CLC(041) to turn the Carry Flag ON
and OFF.
The following equations are used for the conversion.
The offset and slope can be a positive value, 0, or a negative value. Using a
negative slope enables reverse scaling.
The result will be rounded to the nearest integer.
The source value in S is treated as an absolute BCD value and the sign is
indicated by the Carry Flag. The source value can thus be between –9999
and 9999.
If the result is less than the minimum conversion value, the minimum conver-
sion value will be output as the result. If the result is greater than the maxi-
mum conversion value, the maximum conversion value will be output.
SCL3(487) is used to convert data using a user-defined scale to signed binary
for Analog Output Units. For example, SCL3(487) can convert 0 to 200
°C to
0000 to 0FA0 (hex) and output an analog output signal 1 to 5 V from the Ana-
log Output Unit.
Y
R =
Binary conversion of X
x ((Binary conversion of S)+(Offset))
The slope of the line is Y/X.
X
Y
X
Y
X
Y
S (signed BCD)
Offset
Offset
S (signed BCD)
Offset of 0000
Positive Offset
R (signed binary)
Negative Offset
R (signed binary)
Max conversionMax conversion
Min. conversion
S (signed BCD)
Min. conversion
R (signed binary)
Max conversion
Min. conversion

Table of Contents

Related product manuals