10 Applied Instructions (Rotation and Shift Operation)
10.5 SFTR / Bit Shift Right
208
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
10.5 SFTR / Bit Shift Right
Outline
This instruction shifts bit devices of the specified bit length rightward by the specified number of bits.
After shift, the bit device specified by is transferred by "n2" bits from the most significant bit.
1. Format and operation, execution form
2. Set data
3. Applicable devices
S: Refer to "Cautions".
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Operation
Execution
form
Expression in each language
Structured ladder/FBD ST
SFTR 16 bits Continuous SFTR(EN,s,n1,n2,d);
SFTRP 16 bits Pulse SFTRP(EN,s,n1,n2,d);
Variable Description Data type
Input
variable
EN Execution condition Bit
Head bit device to be stored to the shift data after rightward shift. Bit
Bit length of the shift data (see Caution). ANY16
Number of bits to be shifted rightward (see Caution) ANY16
Output
variable
ENO Execution state Bit
Head bit device to be shifted rightward Bit
Operand
type
Bit Devices Word Devices Others
System User Digit Specification System User
Special
Unit
Index
Constant
Real
Number
Character
String
Pointer
XYMTCS
D
.b
KnX KnY KnM KnS T C D R
U\G
VZModifier K H E
"
"
P
zzz z
S1
z
zz
S2 S3
zz
zz z z
SFTR
EN
s
n1
ENO
d
n2
SFTRP
EN
s
n1
ENO
d
n2