EasyManua.ls Logo

Panasonic FP-E - Page 392

Panasonic FP-E
1334 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
High−level Instructions
3 − 128
Explanation of example
Compares decimal constant K100 with the contents of data register DT0 when trigger R0 turns on.
When DT0 > K100, R900A turns on and external output relay Y10 turns on.
When DT0 = K100, R900B turns on and external output relay Y11 turns on.
When DT0 < K100, R900C turns on and external output relay Y12 turns on.
Description
Compares the 16-bit data specified by S1 with that specified by S2. The comparison result is output to the
special internal relays R9009, R900A, R900B and R900C.
The following table lists the states of the carry flag (R9009), > flag (R900A), = flag (R900B), and < flag
(R900C), depending on the relative sizes of S1 and S2.
Comparison
between
Flag
Comparison between
S1 and S2
R900A
(> flag)
R900B
(= flag)
R900C
(< flag)
R9009
(carry flag)
S1 < S2
off off on
S1 = S2
off on off off
S1 > S2
on off off
“ ”: turns on or off according to the conditions
Execution condition (Trigger)
In this program example, the comparison will be performed only when R0 turns on.
If ongoing comparison is necessary, relay R9010, which is always on, should be used in the execution
conditions (trigger).
R9010 can be eliminated in this case.
Y10
Y11
Y12
R9010
R9010
R9010
R9010
F60 CMP, DT 0, K 100
R900A
R900B
R900C
Always on relay.
You can also program the above using the PSHS, RDS, and POPS instructions.
RDS
Y10
POPS
Y11
Y12
X0
F60 CMP, DT 0, K 100
R900A
R900B
R900C
PSHS
This is a program in which operation is the same as the above program example.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com