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

Table of Contents

Advertisement

3. Instructions
Hint
• SCL2(486) can be used to scale the results of analog signal conversion values from Analog Input
Units according to user-defined scale parameters. For example, if a 1 to 5-V input to an Analog Input
Unit is input to memory as 0000 to 0FA0 hexadecimal, the value in memory can be scaled to –100 to
200 C using SCL2(486).
• SCL2(486) converts signed binary to signed BCD. Negative values can thus be handled directly for S.
The result of scaling in R and the Carry Flag can also be used to output negative values for the
scaling result.
Example Programming
Scaling 1 to 5-V Analog Input to 0 to 300
In the following example, it is assumed that an analog signal from 1 to 5 V is converted and input to
CIO 205 as 0000 to 0FA0 hexadecimal. SCL2(486) is used to convert (scale) the value in CIO 205 to a
value between 0000 and 0300 BCD.
When CIO 0.00 is ON, the contents of CIO 205 is scaled using the linear function defined by X (0FA0),
Y (0300), and the offset (0). These values are contained in D100 to D102, and the result is output to
D200.
0.00
P1
R
676
D100
Contents of R (D200)
D200
1068Hex
( X)
P1:
D100
P1+1:
D101
P1+2:
D102
Contents of S (CIO 205)
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Offset
X
Y

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - REFERENCE MANUAL 02-2010 and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents