Справочник Пользователя для Mitsubishi Electronics MELSEC -Q/L

Скачать
Страница из 1086
6  BASIC INSTRUCTIONS
6.1  Comparison Operation Instructions
207
6
BIN 32-bit data comparisons (small, match, large)
DCMP(P)
Processing details
 • Either of (D), (D)+1 or (D)+2 turns ON depending on the results (small, match, large) after the comparison is made for 
between comparison value (S1), (S1)+1 and the comparison source (S2), (S2)+1.
 • When the contact turns OFF, "(D) to (D)+2" hold the conditions which are immediately before the contact turns ON
OFF.
Operation error
 • In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Program example
 • Program that compares the current values of counter C20 with the constant value K100.
• LCPU: The serial number (first five digits) is "16042" or later.
• QnUDVCPU: The serial number (first five digits) is "16043" or later.
(S1):  Head number of devices where comparison data is stored (BIN 32-bit)
(S2):  Data for comparison or the head number of devices where data for comparison is stored (BIN 32-bit)
(D):   Head number of devices where the comparison results are stored (Bit)
Setting 
data
Internal device
R, ZR
J\
U\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
(S1)
(S2)
(D)
Error 
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH
QnPRH QnU
LCPU
4101
The range of 3 points from the device specified in (D) exceeds the range of 
the corresponding device.
Basic
High
performance
Process
Redundant
Universal
Ver.
LCPU
Ver.
D
S2
S1
DCMPP
DCMP
DCMPP
DCMP
D
S2
S1
Command
Command
DCMP
Contact
S1
S2
D
S1
S2
S1
S2
>
=
<
+1
+1
+1
[
[
[
[
[
[
]
]
]
+1
+1
+1
]
]
]
,
,
,
,
,
,
S2
S1
Turns on when
Turns on when
Turns on when
S2
S2
S2
S1
S1
S1
D
D
D +2
+1
Compare K100 with C20.
M0 turns on when K100 > C20 (present value).
M1 turns on when K100 = C20 (present value).
M2 turns on when K100 < C20 (present value).