Arithmetic instructions
496
Part III FP Instructions
F98_CMPR
Data table shift-out and compress
Contents of d2 (highest address) are shifted out to the area specified by d3.
Non-zero data is shifted (compressed) in sequential order, in the direction of the higher address in
the specified range.
d1
K3
0
K2
0
K1
d2
d1
0
0
0
K3
K2
d2
K1
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".
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types
Availability of F98_CMPR (see page 1326)
Variable Data type Function
d1 starting (lowest) address of data to be compressed
d2 final (highest) address of data to be compressed, data at d2
is shifted out
d3
ANY16
receives data shifted out from d2
For Relay T/C Register Const.
d1, d2, d3 - WY WR WL SV EV DT LD FL -
No. IEC address Set If
R9007 %MX0.900.7 permanently d1 > d2
R9008 %MX0.900.8 for an instant d1 and d2 are not in the same memory
area
Description
Shifts out non-zero data stored at the highest address of the table to the specified area and
compresses the data in the table to the higher address. The data in the table specified by d1 and
d2 is rearranged as follows:
Data types
Operands
Error flags