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-443
API Mnemonic
Operands
Function
188
MBS P
S, D, n
Matrix Bit Shift
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
*
*
*
D
*
*
*
*
*
*
n
*
*
*
MBS, MBSP: 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
D
: result
n
: matrix length (K1~K256)
Description:
1.
This instruction is used to shift bits left or right within a matrix
S
. When M1097=0 bits are
shifted to the left in the matrix. When M1097=1 bits are shifted to the right in the matrix.
2.
M1096 is used to fill the empty bit when a shift occurs. M1095 is the carry flag and is where
the bit shifted out of the matrix goes
.
3.
This instruction works best when used as a pulse instruction (MBSP).
4. If
S
uses KnX, KnY, KnM and KnS or if
D
uses KnY, KnM and KnS with an ELC-PC/PA/PH, or
a ELCM-PH/PA, n must equal 4. For the ELC-PV n can be 1, 2, 3 or 4.
5. Flags:
M1095: matrix rotate/shift/output carry flag
M1096: matrix shift/input complement flag
M1097: matrix rotate/shift direction flag
Program Example 1:
When X0=ON, M1097=OFF means shift the matrix to the left by one bit for each false-to-true
transition of the instruction. For this example, flag M1096 was 0. This bit is moved into the first
position of the matrix as shown below when a shift occurs. The bit shifted out of the matrix goes to
the Carry Bit M1095. The resulting matrix after the shift is the matrix represented by D20-D22. The
source matrix represented by D0-D2 is unaffected.
X0
RST
MBSP
D0
D20
K3
M1097
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...