Panasonic FP-E Programming Manual page 392

Fp series
Table of Contents

Advertisement

High−level Instructions
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
Comparison between
S1 and S2
S1 < S2
S1 = S2
S1 > S2
" ": 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).
Always on relay.
R9010
F60 CMP, DT 0, K 100
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
F60 CMP, DT 0, K 100
R900A
R900B
RDS
POPS
R900C
This is a program in which operation is the same as the above program example.
3 − 128
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