368
6 BASIC INSTRUCTIONS
6.5 Shift Instructions
SFTL(P)
These instructions shift the (n2) bit(s) of area to the left within the (n1) bits of data area starting from the specified device.
■Execution condition
■Description, range, data type
*1 Set values so that (n2)(n1).
■Applicable devices
*1 T, ST, C, and FD cannot be used.
*2 Only 0 or 1 can be used.
*3 FX and FY cannot be used.
• The RnCPU and RnENCPU with firmware version "17" or later support this instruction. (Use an engineering tool with version "1.020W" or later.)
Ladder ST
ENO:=SFTL(EN,s,n1,n2,d);
ENO:=SFTLP(EN,s,n1,n2,d);
FBD/LD
Instruction Execution condition
SFTL
SFTLP
Operand Description Range Data type Data type (label)
(s) Start device stored in the empty area after the shift Bit ANY_BOOL
(d) Shift target start device Bit ANY_BOOL
(n1)
*1
Data length of shift data 0 to 65535 16-bit unsigned binary ANY16_U
(n2)
*1
Number of shifts 0 to 65535 16-bit unsigned binary ANY16_U
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s)
*1
*2
(d)
*1
(n1)
*3
(n2)
*3
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)