Fnc 10 - Cmp / Compare - Mitsubishi FX3G Series Programming Manual

Programmable controllers
Hide thumbs Also See for FX3G Series:
Table of Contents

Advertisement

FX
/FX
/FX
/FX
3G
3U
3GC
3UC
Programming Manual - Basic & Applied Instruction Edition
9.1
FNC 10 – CMP / Compare
Outline
This instruction compares two values, and outputs the result (smaller, equal or larger) to bit devices (3 points).
1. Instruction format
FNC 10
D
CMP
P
2. Set data
Operand Type
S
1
S
2
D
3. Applicable devices
Bit Devices
Oper-
and
System User
Type
X Y M T C S D .b KnX KnY KnM KnS T
S
1
S
2
D
1: "D .b" is available only in FX
2: This function is supported only in FX
Explanation of function and operation
1. 16-bit operation (CMP and CMPP)
The comparison value
result (smaller, equal or larger), either one among
• The source data
• Comparison is executed algebraically. Example: −10 < 2
Command
input
D
D
D
Even if the command input turns OFF and CMP instruction is not executed,
the status just before the command input turns OFF from ON.
Series
Mnemonic
16-bit Instruction
CMP
7 steps
CMPP
Data or device number handled as comparison value
Data or device number handled as comparison source
Head bit device number to which comparison result is output
Digit Specification
1
and FX
3U
3UC
/FX
3U
3UC
S
and the comparison source
1
are handled as binary values.
S
S
1
2
FNC 10
S
S
1
2
CMP
Turns ON in the case of
>
" [
] ".
S
S
1
2
Turns ON in the case of
+1
=
" [
] ".
S
S
1
2
Turns ON in the case of
+2
" [
] ".
S
<
S
1
2
9 Move and Compare – FNC 10 to FNC 19
→ For the contact comparison instruction, refer to Chapter 28.
→ For floating point comparison, refer to Section 18.1.
Operation Condition
32-bit Instruction
Continuous
13 steps
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Index
Unit
C D R U \G
V
Z Modify K H
2
2
PLCs. However, index modifiers (V and Z) are not available.
PLCs.
S
are compared with each other. According to the
2
D
,
D
+1 or
D
+2 turns ON.
Command
input
D
S
2
D
+1
D
D
+2
9.1 FNC 10 – CMP / Compare
Mnemonic
Operation Condition
DCMP
Continuous
Operation
DCMPP
Pulse (Single)
Operation
Data Type
16- or 32-bit binary
16- or 32-bit binary
Bit
Others
Con-
Real
Charac-
stant
Number
ter String
E
" "
51
50
49
48
S
1
Latched
Latched
Latched
D
,
D
+1 and
D
+2 latch
1
2
3
4
5
Pointer
P
6
7
8
9
10
239

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3gc seriesFx3uc series

Table of Contents