Omron SYSMAC CJ - REFERENCE MANUAL 08-2008 Reference Manual page 842

Programmable controllers
Hide thumbs Also See for SYSMAC CJ - REFERENCE MANUAL 08-2008:
Table of Contents

Advertisement

Data Control Instructions
Flags
Precautions
Examples
802
Positive Offset
R (signed BCD)
Offset
S (signed binary)
(Signed binary)
Offset
P1
Y
(Signed binary)
P1+1
X
P1+2
(Signed BCD)
SCL2(486) can be used to scale the results of analog signal conversion val-
ues 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.
Name
Label
Error Flag
ER
Equals Flag
=
Carry Flag
CY
An error will occur and the Error Flag will turn ON if the value for X (C+1) is
0000 or if the value for Y (C+2) is not BCD.
The Equals Flag will turn ON when the contents of the result word D is 0000.
The Carry Flag will turn ON if the value placed in the result word is negative.
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 0205 as 0000 to 0FA0 hexadecimal. SCL2(486) is
used to convert (scale) the value in CIO 0205 to a value between 0000 and
0300 BCD.
When CIO 000000 is ON, the contents of CIO 0205 is scaled using the linear
function defined by X (0FA0), Y (0300), and the offset (0). These values are
contained in D00100 to D00102, and the result is output to D00200.
Negative Offset
R (signed BCD)
Y
X
Offset
Offset of 0000
R (signed BCD)
Offset = 0000 hex
Operation
ON if the contents of C+1 ( X) is 0000.
ON if the contents of C+2 ( Y) is not BCD.
OFF in all other cases.
ON if the result is 0.
OFF in all other cases.
ON if the result is negative.
OFF if the result is zero or positive.
Section 3-18
Y
X
S (signed binary)
Y
X
S (signed binary)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents