Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 716

Table of Contents

Advertisement

3. Instructions
Positive Offset
R (signed binary)
Max conversion
Min. conversion
S (signed BCD)
Offset of 0000
R (signed binary)
Max conversion
Min. conversion
Hint
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 Analog Output Unit.
Example Programming
When a value from 0 to 200 is scaled to an analog signal (1 to 5 V, for example), a signed BCD value of
0000 to 0200 is converted (scaled) to signed binary value of 0000 to 0FA0 for an Analog Output Unit.
When CIO 0.00 turns ON in the following example, the contents of D0 is scaled using the linear function
defined by X (0200), Y (0FA0), and the offset (0). These values are contained in D100 to D102. The
sign of the BCD value in D0 is indicated by the Carry Flag. The result is output to CIO 2011.
0.00
D0
D100
P1
R
680
Negative Offset
R (signed binary)
Max conversion
Y
X
Offset
Offset
Min. conversion
Y
X
S (signed BCD)
Contents of R (2011, signed binary)
X (0200)
Y
X
S (signed BCD)
P1:
D100
P1+1:
D101
P1+2:
D102
P1+3:
D103
P1+4:
D104
Y (0FA0 Hex)
Contents of S (D0, signed BCD)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Offset
X
Y
Max. conversion
Min. conversion

Advertisement

Table of Contents
loading

Table of Contents