233
4
4 Instructions 4.6.4 Matrix Rotation and Shift
The initial value of R100 is set to 45, and writing starts from bit 45 (the 46th bit).
M8325 and M8328 (placeholder ag of matrix shift input) are both set to ON. The following results are
returned in sequence when M100 switches from OFF to ON:
R100 = 45, bit 45 in D102 is set to 1, and the matrix search end ag M8321 is set to OFF.
R100 = 46, bit 46 in D102 is set to 1, and the matrix search end ag M8321 is set to OFF.
R100 = 47, bit 47 in D102 is set to 1, and the matrix search end ag M8321 is set to OFF.
R100 = 47, bit 47 in D102 remains 1, and the matrix search end ag M8321 is set to ON.
●
Flags
M8321: Matrix search end ag. It is set to ON when the last bit is written.
M8324: Matrix pointer error ag. It is set to ON when the pointer exceeds the range 0 to (16n – 1).
M8325: Matrix pointer increment ag, used to increment the pointer by 1.
M8326: Matrix pointer clearance ag, used to clear the pointer.
M8328: Placeholder ag of matrix shift input
4.6.4 Matrix Rotation and Shift
Matrix rotation and shift
MBS Matrix bit shift operation
MBR Matrix bit rotation operation
MBS: Matrix bit shift operation
◆
Overview
The MBS instruction shifts bits in a matrix.
MBS S D n
Matrix bit shift
operation
Applicable model:
H3U
S Matrix Operand element in an operation 16-bit instruction (7
steps)
MBS: Continuous
execution
MBSP: Pulse
execution
D
Operation
result
Start number of elements that store the operation
result
n Data count
Number of data entries in an operation; value range:
1 to 256
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
n X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.