High−level Instructions
3 − 228
Explanation of example
If the execution condition (trigger) R0 is on, the contents of data register DT10 are sent to data register DT0.
Also, in the range from DT0 to DT5, non−zero contents are stored in sequential order, starting from DT5. The
“0 (zero)” is set in the other areas of the data table.
DT4
555
[D1]
444
0
11
0
10
DT0
DT1
[D2]
DT2
DT3
DT5
0
0
32
444
11
10
32
DT10
[S]
Specified
data range
F99 (CMPW)
execution
Note
Because the contents of S are written to DT0, the original
contents of DT0 (for example, “555”) are overwritten.
Description
The data in the table specified by D1 and D2 is rearranged as follows:
− Data specified by S is shifted in to the area specified by D1 (starting address).
− Non−zero data is shifted (compressed) in sequential order, in the direction of the higher address in
the specified range.
K4
D1
K3
K0
K2
K0
K1
D2
D1
K0
K0
K4
K2
K1
D2
D3
Starting area D1 and ending area D2 should be the same type of operand.
Be sure to specify D1 and D2 with “D1 D2”.
If the content of S is “0”, only a compressed shift is carried out.
Flag conditions
・Error flag (R9007): Turns on and stays on when:
・Error flag (R9008): Turns on for an instant when:
− The area specified using the index modifier exceeds the limit.
− D1 > D2
− Starting area D1 and ending area D2 are not in the same memory area.