(Fun06); 6: Bshf - FATEK FBS Series Manual

Plc
Hide thumbs Also See for FBS Series:
Table of Contents

Advertisement

Basic Function Instruction
FUN 6
D P
BSHF
(Shifts the data of the 16-bit or 32-bit register to left or to right by one bit)
Symbol
Description
When the status of clear control "CLR" is at 1, then the data of register D and FO0 will all be cleared to 0.
Other input signals are all in effect.
When the status of clear control is "CLR" at 0, then the shift operation is permissible. When the shift control
"EN" = 1 or "EN↑" (
left (L/R=1) by one bit. The shifted-out bit (MSB when shift to left and LSB when shift to right) for both
cases will be sent to FO0. The vacated bit space (LSB when shift to left and MSB when shift to right) due to
shift operation will be filled in by the input status of fill-in bit "INB".
Example
Shifts the 16-bit register data
Ladder diagram
6P.BSHF
X1
D :
EN
X2
INB
X3
L/R
X4
CLR
X3=1
(Left shift)
X3=0
(Right shift)
Range
Ope-
rand
D
P
instruction) from 0 to 1, the data of the register will be shifted to right (L/R=0) or to
Y0
R
3
OTB
B15
← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ←
Y0
Shifts the 16-bit data to left by one bit
B15
→ → → → → → → → → → → → → → → → → →
X2
Shifts the 16-bit data to right by one bit
BIT SHIFT
Operand
D: The register number for shifting
WY
WM
WS
TMR CTR
WY0
WM0
WS0
WY240
WM1896
WS984
T255
Key Operations
ORG
LD
LD
LD
FUN
OUT
6 - 20
HR
OR
T0
C0
R0
R3904
R3968
C255
R3839
R3967
R4167
Mnemonic Codes
ORG
X
LD
X
LD
X
LD
X
FUN
6P
D: R
FO
0
OUT
Y
B0
X2
B0
Y0
FUN 6
D P
BSHF
SR
ROR
DR
R5000
D0
R8071
D4095
○*
○*
1
2
3
4
3
0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents