230
4
4 Instructions4.6.3 Matrix Read/Write
●
Flags
M8320: Matrix comparison ag. When it is set to OFF, different values are compared; when it is set to ON,
same values are compared.
M8321: Matrix search end ag. It is set to ON after the last bits from [S1] and [S2] are compared.
M8322: Matrix search start ag. When it is set to ON, comparison starts from the rst bit.
M8323: Matrix bit found ag. When the conforming bit is found, comparison stops and this ag is set to ON.
M8324: Matrix pointer error ag. It is set to ON when the pointer exceeds the range 0 to (16n – 1).
4.6.3 Matrix Read/Write
Matrix read/write
MBRD Matrix bit read operation
MBWR Matrix bit write operation
MBRD: Matrix bit read operation
◆
Overview
The MBRD instruction reads bits in a matrix.
MBRD S n D
Matrix bit read
operation
Applicable model:
H3U
S Matrix Operand element in an operation 16-bit instruction (7
steps)
MBRD: Continuous
execution
MBRDP: Pulse
execution
n Data count
Number of data entries in an operation; value range:
1 to 256
D Pointer Position number of the current bit
◆
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
n 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
Note: The elements in gray background are supported.
◆
Function
1) The ([D]+1)th bit in [S] is read. The ON/OFF state of the read bit is stored in M8327 (carry ag of matrix
shift output). After a bit is read, the pointer in [D] is incremented by 1 if the matrix pointer increment ag
M8325 is set to ON. After the last bit is read, the matrix search end ag M8321 is set to ON, the pointer
records the number of this bit, and the instruction ends. If M8326 = ON, the pointer is cleared and
reading starts from the rst bit (bit 0) in [S].