Fnc 10 - Cmp / Compare - Mitsubishi Electric FX3G SERIES Programming Manual

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

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
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
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 C D R U \G
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
Even if the command input turns OFF and CMP instruction is not executed,
the status just before the command input turns OFF from ON.
244
Mnemonic
16-bit Instruction
P
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
3U
S
and the comparison source
1
are handled as binary values.
S
S
1
2
FNC 10
S
S
1
CMP
Turns ON in the case of
D
>
" [
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
→ For the contact comparison instruction, refer to Chapter 28.
→ For floating point comparison, refer to Section 18.1.
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Description
Word Devices
Special
System User
Unit
2
2
PLCs. However, index modifiers (V and Z) are not available.
3UC
/FX
PLCs.
3UC
S
are compared with each other. According to the
2
D
,
D
+1 or
Command
input
D
2
] ".
S
2
D
] ".
D
] ".
D
9 Move and Compare – FNC 10 to FNC 19
9.1 FNC 10 – CMP / Compare
Mnemonic
32-bit Instruction
DCMP
13 steps
DCMPP
Con-
Real
Index
stant
Number
V
Z Modify K H
E
D
+2 turns ON.
49
48
S
Latched
+1
+2
D
,
D
+1 and
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Data Type
16- or 32-bit binary
16- or 32-bit binary
Bit
Others
Charac-
Pointer
ter String
" "
P
51
50
1
Latched
Latched
D
+2 latch

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents