3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E F or m o r e i nf o r m a t i o n v i s i t : www. e a t o n. c o m
3-439
API Mnemonic
Operands
Function
186
MBRD P
S, n, D
Matrix Bit Read
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
*
*
*
n
*
*
*
D
*
*
*
*
*
*
*
*
MBRD, MBRDP: 7 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
: matrix source address
n
: matrix length (K1~K256).
D
: pointer to where the target address is
saved
Description:
1.
When executing the instruction, it will look at M1094 (matrix pointer clear flag) to see if it is ON.
If it is ON, pointer
D
will be cleared to 0 and it will read
S
starting from bit 0 and read the
ON/OFF state of each bit and write it to M1095 (matrix rotate/shift/output/carry). It will see if
M1093 (matrix pointer increase flag) is ON after reading each bit and increase
D
by 1 if it is ON.
When reading to the last bit, M1089 (matrix search end flag) =ON, pointer
D
records the bit
number of the read bit and ends execution of the instruction.
2.
The Pointer should be a 16-bit D-register.
3.
S
designates KnX, KnY, KnM and KnS;
D
designates KnY, KnM and KnS ELC-PC/PA/PH,
ELCM-PH/PA can designate n = 4. ELC-PV can designate n=1- 4.
Program Example:
1.
When X0 transitions from OFF
→
ON, the pointer clear flag M1094=ON, the matrix pointer
increases by 1 if flag M1093=1, after the first bit is read.
2.
When present value of pointer D20=45, it will read each of the last 3 bits with each false-to-true
transition of the instruction, while M1093 = 1. The following three results will be obtained.
D20=46, matrix rotate/shift/output carry flag M1095=0, matrix search end flag M1089=0.
D20=47, matrix rotate/shift/output carry flag M1095=1, matrix search end flag M1089=0.
D20=47, matrix rotate/shift/output carry flag M1095=1, matrix search end flag M1089=1.
X0
MBRDP
D0
D20
K3
b0
D20
45
1
0
1
0
1
0
1
0
1
0
1
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
1
0
1
0
1
0
1
0
1
0
1
0
b47
0
0
1
0 1
Pointer
D0
D1
D2
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...