3. Instructions
682
CS/CJ/NSJ Series Instructions Reference Manual (W474)
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.
∆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
∆X (0200)
∆Y
∆X
P1
R
0.00
D0
D100
Offset
Contents of R (2011, signed binary)
∆Y (0FA0 Hex)
Contents of S (D0, signed BCD)
Max. conversion
Min. conversion
P1:
P1+1:
P1+2:
P1+3:
P1+4:
D100
D101
D102
D103
D104