9 Application Instructions API 150-199
DVP-PLC Application Manual
9-65
API Mnemonic
Operands
Function
185
MCMP P
Matrix Compare
Controllers
ES/EX/SS SA/SX/SC EH/SV
Bit Devices
Word Devices
Program Steps
Type
OP
X Y M S K H
KnX KnY KnM KnS T
C
D
E
F
S
1
*
*
*
*
*
*
*
S
2
*
*
*
*
*
*
*
n
*
*
*
D
*
*
*
*
*
*
*
*
MCMP, MCMPP: 9 steps
PULSE 16-bit 32-bit
ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV
Operands:
S
1
: Matrix source device 1
S
2
: Matrix source device 2
n
: Array length
D
: Pointer (Pr), for storing the value of target location
Explanations:
1. Range
of
n
: K1 ~ K256
2.
S
1
, and
S
2
designate KnX, KnY, KnM and KnS;
D
designates KnY, KnM and KnS.
3.
SA/SX/SC can designate n = 4. EH/EH2/SV can designate n
4
≦
.
4.
See the specifications of each model for their range of use.
5.
Flags: M1088 ~ M1092. See remarks for more details.
6.
This instruction compares every bit in
S
1
with every bit in
S
2
starting from location
D
and finds out the location
of different bits. The location will be stored in
D
.
7.
The matrix comparison flag (M1088) decides to compare between equivalent values (M1088 = 1) or different
values (M1088 = 0). When the comparison is completed, it will stop immediately and the matrix bit search flag
will turn “On” (M1091 = 1). When the comparison progresses to the last bit, the matrix search end flag (M1089)
will turn “On” and the No. where the comparison is completed is stored in
D
. The comparison will start from the
0
th
bit in the next scan period and the matrix search start flag will turn “On” (M1090 = 1). When
D
exceeds the
range, the pointer error flag will turn “On” (M1092 = 1).
8.
The matrix operation will need a 16-bit register to designate a point among the 16n points in the matrix for the
operation. The register is the Pointer (Pr) of the matrix, designated by the user in the instruction. The vaild
range of Pr is 0 ~ 16n -1, corresponding to b0 ~ b16n-1 in the matrix. Please avoid changing the Pr value
during the operation in case the comparing and searching will not ne correct. If the Pr value exceeds its range,
M1092 will be On and the instruction will not be executed.
9.
When M1089 and M1091 take place at the same time, both flags will be “1” at the same time.
Program Example:
1.
When X0 goes from Off to On, the matrix search start falg M1090 = 0. The searching will start from the bit
marked with “*” (current Pr value +1) for bits of different status (M1088 = 0).
2.
Set the Pr value D20 = 2. When X0 goes from Off to On for 4 times, we can obtain the 4 execution results
n
,
o
,
p
,
q
.
n
D20 = 5, M1091 = 1, M1089 = 0.
o
D20 = 45, M1091 = 1, M1089 = 0.
Содержание DVP-PLC
Страница 1: ...PLC PLC...
Страница 28: ...1 Basic Principles of PLC Ladder Diagram DVP PLC Application Manual 1 24 MEMO...
Страница 192: ...4 Step Ladder Instructions DVP PLC Application Manual 4 22 MEMO...
Страница 250: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 38 X0 DIV D0 D10 D20 D0 D10 K4Y0 DIV...
Страница 270: ...6 Application Instructions API 00 49 DVP PLC Application Manual 6 58 RST M0 X0 RST T0 RST Y0 FMOV K0 D10 K5...
Страница 337: ...7 Application Instructions API 50 99 DVP PLC APPLICATION MANUAL 7 53 X10 STMR T10 K50 Y0 Y3 X10 Y1 Y2 5 sec 5 sec...
Страница 458: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 56 or relay itself See 2 3 for more information...
Страница 472: ...8 Application Instructions API 100 149 DVP PLC Application Manual 8 70 MEMO...
Страница 574: ...9 Application Instructions API 150 199 DVP PLC Application Manual 9 102 MEMO...