3 . I n s t r u c t i o n S e t
M N050 03003E F or mo re infor ma tio n vi sit:
w w w. e a t o n . c o m
3-87
API Mnemonic
Operands
Function
35
SFTL P
S, D, n
1
, n
2
Bit Shift Left
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
D
*
*
*
n
1
*
*
n
2
*
*
SFTL, SFTLP: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P 32 16 P 32 16
P
Operands:
S
: Starting source address
D
: Starting destination address
n
1
: Number of bits to be shifted
n
2
: Number of bit positions to shift the data bits as a group
Description:
1. Shift
n
1
bits of
S
to the left by
n
2
bit positions. Shift
n
2
bits of
D
to the least significant bits of
S.
2.
This instruction works best with the pulse instruction (SFTLP).
3.
Valid range of operand
n1
,
n2
: 1
≤
n2
≤
n1
≤
1024, In ELC-PB, ELCB-PB models: 1
≦
n2
≦
n1
≦
512
Program Example:
1.
When X0 OFF
→
ON, the 16 bit data of M0~M15 will shift 4 bits to the left. And 4 bits from X0
into the low order bits of M0.
2.
Please refer to the following
n
~
r
steps to perform SFTR instruction during a single scan.
n
M15~M12
→
Carry
o
M11~M8
→
M15~M12
p
M7~M4
→
M11~M8
q
M3~M0
→
M7~M4
r
X3~X0
→
M3~M0
complete
X0
SFTR
X0
M0
K16
K4
X3
X2
X1 X0
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0
1
2
3
4
5
4 bits in a group shift to the left
Carry
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...