Panasonic FP-E Programming Manual page 396

Fp series
Table of Contents

Advertisement

High−level Instructions
Explanation of example
Compares the content (32−bit data) of data registers DT11 and DT10 with the content (32−bit data) of data
registers DT1 and DT0 when trigger R0 turns on.
When (DT1 and DT0) > (DT11 and DT10), R900A turns on and external output relay Y10 turns on.
When (DT1 and DT0) = (DT11 and DT10), R900B turns on and external output relay Y11 turns on.
When (DT1 and DT0) < (DT11 and DT10), R900C turns on and external output relay Y12 turns on.
Description
Compares the 32-bit data or 32-bit equivalent constant specified by S1 with that specified by S2. The
comparison result is output to special internal relays R9009, R900A, 900B, 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+1, S1) and (S2+1, S2).
Comparison between
Comparison between
(S1+1, S1) and (S2+1, S2)
(S1+1, S1) < (S2+1, S2)
(S1+1, S1) = (S2+1, S2)
(S1+1, S1) > (S2+1, S2)
" ": turns on or off according to the conditions
When processing 32-bit data, the higher 16-bit areas (S1+1, S2+1) are automatically determined once the
lower 16-bit areas (S1, S2) are specified.
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.
Always on relay.
R9010
F61 CMP, DT 0, DT10
R9010
R900A
R9010
R900B
R9010
R900C
R9010 can be eliminated in this case.
You can also program the above using the PSHS, RDS, and POPS instructions.
PSHS
X0
F61 DCMP, DT 0, DT10
R900A
RDS
R900B
POPS
R900C
This is a program in which operation is the same as the above program.
3 − 132
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
Flag
R900A
R900B
R900C
(> flag)
(= flag)
(< flag)
off
off
on
off
on
off
on
off
off
Y10
Y11
Y12
Y10
Y11
Y12
R9009
(carry flag)
off

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fp0Fp2Fp2shFp0rFrsFp10sh ... Show all

Table of Contents