Download Print this page

Shifting N-Bit(S) Data To The Right By (N) Bit(S) - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

Shifting n-bit(s) data to the right by (n) bit(s)

SFTR(P)
These instructions shift (n1) bits of data to the right by (n2) bit(s) from the device specified by (d).
Ladder diagram
(s)
(d)
(n1) (n2)
FBD/LD
EN
ENO
s
d
n1
n2
Setting data
■Descriptions, ranges, and data types
Operand
Remarks
(s)
Head device number stored to the shift data after the shift
(d)
Head device number to be shifted
*1
(n1)
Data length of shift data
*1
(n2)
Number of shifts
EN
Execution condition
ENO
Execution result
*1 Set so that n2n1.
■Applicable devices
Operand
Bit
X, Y, M, L, SM,
F, B, SB, S
(s)
(d)
(n1)
(n2)
*1 T, ST, C cannot be used.
*2 Only 0 or 1 can be used.
Word
T, ST, C, D, W,
U\G
SD, SW, R
*1
*1
Structured text
ENO:=SFTR(EN,s,n1,n2,d);
ENO:=SFTRP(EN,s,n1,n2,d);
Range
Data type
Bit
Bit
0 to 65535
16-bit unsigned binary
0 to 65535
16-bit unsigned binary
Bit
Bit
Double word Indirect
specification
Z
LC
LZ
Data type (label)
ANY_BOOL
ANY_BOOL
ANY16_U
ANY16_U
BOOL
BOOL
Constant
Others
K, H
E
$
*2
6 SEQUENCE INSTRUCTIONS
6.4 Shift Instructions
6
149

Hide quick links:

Advertisement

loading