Omron CP1E-NA@@D@-@ Computer Hardware User Manual


 
2-283
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Data Control Instructions
2
SCL2
Scaling 1 to 5-V Analog Input to –200 to 200
In the following example, it is assume that an analog signal from 1 to 5 V is converted and input to CIO
3 as 0000 to 1770 hexadecimal. SCL2(486) is used to convert (scale) the value in CIO 3 to a value
between –0200 and 0200 BCD.
When CIO 0.00 is ON, the contents of CIO 3 is scaled using the linear function defined by X (1770),
Y (0400), and the offset (07D0). These values are contained in D100 to D102, and the result is output
to D200.
SCL2
3
D100
D200
0.00
S
P1
R
FED4
0.8V
0200
0000
0220
1770
5V
0000
1V
189C
5.2V
1770 Hex
(X)
-0200
-0220
0400(Y)
Contents of S (CIO 200)
P1: D100
P1+1:D101
P1+2:D102
Contents of R(D200)
Offset
X
Y
07D0
1770
0400
Offset
07D0 Hex