231
4
4 Instructions 4.6.3 Matrix Read/Write
2) The value in [D] ranges from 0 to (16n – 1). If [D] is out of range, the pointer error ag M8324 is set to
ON and the instruction is not executed.
◆
Application
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
45
D100
D101
D102
R100
M8327
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
D100
D101
D102
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0
46R100
Before
execution
After every
execution
The initial value of R100 is set to 45, and reading starts from bit 45 (the 46th bit).
M8325 is set to ON. The following results are returned in sequence when M100 switches from OFF to ON:
R100 = 45, the carry ag of matrix shift output M8327 is set to OFF, and the matrix search end ag M8321
is set to OFF.
R100 = 46, the carry ag of matrix shift output M8327 is set to ON, and the matrix search end ag M8321 is
set to OFF.
R100 = 47, the carry ag of matrix shift output M8327 is set to OFF, and the matrix search end ag M8321
is set to OFF.
R100 = 47, the carry ag of matrix shift output M8327 remains OFF, 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 read.
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.
M8327: Carry ag of matrix shift output