Panasonic FP Series Programming Manual page 559

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Bit-shift instructions
F100_SHR
Shifts n bits of 16-bit data area specified by d to the right (to the lower bit position) if the trigger EN
Description
is in the ON-state.
Bit position
15
d
Bit position
15
0
d
When n bits are shifted to the right, the data in the nth bit
R9009 (carry-flag) and the higher n bits of the 16-bit data area
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 F100_SHR (see page 1320)
PLC types
Data types
Variable
Data type
ANY16
d
INT
n
Operands
For
d
n
In this example the function has been programmed in ladder diagram (LD) and structured text
Example
(ST).The same POU header is used for all programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start changes from FALSE to TRUE, the function is carried out.
558
Right shift of 16-bit data in bit units
1211
8 7
4 3
· ·
· ·
· ·
· ·
12
11
8 7
4 3
· ·
· ·
· ·
· ·
0 0
0
2
Function
16-bit area to be shifted to the right
number of bits to be shifted
Relay
-
WY
WR
WL
WX
WY
WR
WL
n
0
1
0
is transferred to special internal relay
1
2
T/C
Register
SV
EV
DT
LD
FL
SV
EV
DT
LD
FL
specified by d are filled with 0s.
Constant
-
dec. or hex.

Advertisement

Table of Contents
loading

Table of Contents