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

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

Advertisement

Data Control Instructions
Flags
Precautions
Examples
798
Name
Label
Error Flag
ER
Equals Flag
=
An error will occur and the Error Flag will turn ON if the values for Ar (C) and
Br (C+2) are not in BCD, or if the values for As (C+1) and Bs (C+3) are equal.
The Equals Flag will turn ON when the contents of the result word D is 0000.
In the following example, it is assume that an analog signal from 1 to 5 V is
converted and input to D00000 as 0000 to 0FA0 hexadecimal. SCL(194) is
used to convert (scale) the value in CIO 0200 to a value between 0000 and
0300 BCD.
When CIO 000000 is ON, the contents of D00000 is scaled using the linear
function defined by point A (0000, 0000) and point B (0FA0, 0300). The coor-
dinates of these points are contained in D00100 to D00103, and the result is
output to D00200.
D00000
P1
R
Contents of D00200 (R)
Point B
Point A
Negative Values
An Analog Input Unit actually inputs values from FF38 to 1068 hexadecimal
for 0.8 to 5.2 V. SCL(194), however, can handle only unsigned binary values
between 0000 and FFFF hexadecimal, making it impossible to use SCL(194)
directly to handle signed binary values below 1 V (0000 hexadecimal), i.e.,
FF38 to FFFF hexadecimal. In an actual application, it is thus necessary to
add 00C8 hexadecimal to all values so that FF38 hexadecimal is represented
as 0000 hexadecimal before using SCL(194), as shown in the following exam-
ple.
Operation
ON if the contents of C (Ar) or C+1 (Br) is not BCD.
ON if the contents of C+1 (As) and C+3 (Bs) are equal.
OFF in all other cases.
ON if the result is 0.
OFF in all other cases.
P1:
D00100
P1+1: D00101
P1+2: D00102
P1+3: D00103
Contents of D00000 (S)
Section 3-18
(BCD)
(BIN)
(BCD)
(BIN)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cs seriesSysmac one nsj seriesSysmac cj series

Table of Contents