Panasonic FP Series Programming Manual page 605

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Comparison instructions
F60_CMP
Compares the 16-bit data specified by s1 with one specified by s2 if the trigger EN is in the
Description
ON-state. The compare operation result is stored in special internal relays R9009, R900A to
R900C.
Instead of using this FP instruction, we recommend using the related IEC instruction of the
comparison instructions. Please refer also to Advantages of the IEC instructions in the online help.
Data
16-bit data
with sign
16-bit data
without sign
# turns ON or OFF depending on the conditions
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
Availability of F60_CMP (see page 1325)
PLC types
Data types
Variable
Data type
ANY16
s1, s2
The variables s1 and s2 have to be of the same data type.
Operands
For
s1, s2
In this example the function has been programmed in ladder diagram (LD) and structured text
Example
(ST).The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
604
16-bit data compare
Comparison
between s1 and s2
R900A
(>flag)
s1<s2
Off
s1=s2
Off
s1>s2
On
s1<s2
s1=s2
Off
s1>s2
Function
16-bit area or 16-bit equivalent constant to be compared
Relay
WX
WY
WR
WL
Flags
R900B
R900C
(=flag)
(<flag)
Off
On
On
Off
Off
Off
#
Off
#
On
Off
#
Off
#
T/C
Register
SV
EV
DT
LD
FL
R9009
(carry-fl
ag)
#
Off
#
On
Off
Off
Constant
dec. or hex.

Advertisement

Table of Contents
loading

Table of Contents