Panasonic FP Series Programming Manual page 579

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Bit-shift instructions
F112_WBSR
Shifts one hexadecimal digit (4 bits) of the data range specified by d1 (starting) and d2 (ending) to
Description
the right (to the lower digit position) if the trigger EN is in the ON-state.
When one hexadecimal digit (4 bits) is shifted to the right:
the data in the lower hexadecimal digit (bit position 0 to 3) of the 16-bit data
specified by d1 is shifted out.
the data in the higher hexadecimal digit (bit position 12 to 15) of the 16-bit data
specified by d2 becomes 0.
d2
15 1211
8 7
· ·
· ·
15 1211
8 7
· ·
· ·
0
The higher hexadecimal
digit (bit positions 12 to
15) becomes 0
d1 and d2 should be:
the same type of operand
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 F112_WBSR (see page 1320)
Data types
Variable
Data type
d1
ANY16
d2
The variables d1 and d2 have to be of the same data type.
578
Right shift of one hex. digit (4 bits) of 16-bit 5 data range
Specified data range
4 3
0
15
· · 0
15 1211
· ·
· ·
· ·
· ·
· ·
d2
4 3
0
15
· · 0
15 1211
· ·
· ·
· ·
· ·
· ·
Function
starting 16-bit area
ending 16-bit area
d1
8 7
4 3
0
· ·
· ·
The data in the lower
hexadecimal digit (bit
d1
positions 0 to 3) is
8 7
4 3
0
· ·
· ·
shifted out

Advertisement

Table of Contents
loading

Table of Contents