Panasonic FP Series Programming Manual page 500

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F99_CMPW
Shifts in data to the smallest address of the specified data table and compresses the data in the
Description
table toward the higher address. 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.
s
K4
d1
K3
K0
K2
K0
d2
K1
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.
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.
Availability of F99_CMPW (see page 1326)
PLC types
For an example on how to construct a FIFO buffer using F/P99 and F/P98, see
Example 2 from F/P98.
Data types
Variable
Data type
s
d1
ANY16
d2
Operands
For
s
d1, d2
Data table shift-in and compress
d1
K0
K4
K3
K2
d2
K1
Function
data to be shifted in
starting address of area that is compressed into which
data from s is shifted
end address of area where data is compressed
Relay
WX
WY
WR
WL
-
WY
WR
WL
T/C
Register
SV
EV
DT
LD
FL
SV
EV
DT
LD
FL
Arithmetic instructions
Constant
dec. or hex.
-
499

Advertisement

Table of Contents
loading

Table of Contents