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-55
API Mnemonic
Operands
Function
13
SMOV P
S, m1, m2, S2, D, n
Shift Move
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
*
*
*
*
*
*
*
*
*
m
1
*
*
m
2
*
*
D
*
*
*
*
*
*
*
*
n
*
*
SMOV, SMOVP: 11 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
: Data source
m
1
: Source position (nibble) of the first digit to be moved
m
2
: Number of source
digits (nibbles) to be moved
D
: Destination
n
: Destination position for the first digit (nibble)
Description:
1.
BCD mode (M1168=OFF):
This mode of the SMOV operation allows BCD numbers to be manipulated in exactly the same
way as the ‘normal’ SMOV manipulates decimal numbers, i.e. this instruction copies a
specified number of digits from a 4 digit BCD source(
S
) and places them at a specified location
within a destination (
D
) address (also a 4 digit BCD number).
2.
BIN mode (M1168=ON):
This instruction copies a specified number of digits from a 4 digit decimal source (
S
) and
places them at a specified location within a destination (
D
) address (also a 4 digit decimal).
The existing data in the destination is overwritten.
Points to note:
1.
The range of
m
1
: 1 ~ 4
2.
The range of
m
2
: 1 ~
m
1
(cannot be great than
m
1
)
3.
The range of
n
:
m
2
~ 4 (cannot be less than
m
2
)
Program Example 1:
1.
When M1168=OFF and X0=ON, the two upper digits of D10 are moved to the two middle digits
of D20. The contents of the high and low digits of D20 remain unchanged after SMOV is
executed.
2.
If the source is not a valid BCD number an operation error will occur in ELC. The instruction
will not be executed and M1067 and M1068 = ON, D1067 = error code H0E18.
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...