EasyManua.ls Logo

Delta VP3000 Series - Page 312

Delta VP3000 Series
714 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter 7 Second Development PlatformVP3000
303
API Instruction code Operand Function
13 SMOV P S, m
1
, m
2
, D, n Shift move
Type
Operand
Bit devices Word devices
16-bit instruction (11 steps)
SMOV
Continuous
execution
type
SMOVP
Pulse
execution
type
32-bit instruction
- - - -
Associated flag: none
X Y M K H KnX KnY KnM T C D
S
m
1
m
2
D
n
Caution for using operand
M1168 can adjust BCD (OFF), BIN (ON) modes.
Description
S: source of data
m
1
: start digit to be moved of the source data
m
2
: number of digits to be moved of the source data
D: destination device
n: start digit of the destination position for the moved digits
BCD mode (M1168 = OFF): in this mode, SMOV enables to operate BCD number, the
operation is similar to the way SMOV operates decimal numbers. That is to say, this
instruction copies the designated digit of the operand S (a 4-digit BCD number), and send to
the operand D (also a 4-digit BCD number).
BIN mode (M1168 = ON): this instruction copies the designated digit of the operand S (a 4-
digit decimal number), and send to the operand D (also a 4-digit decimal number). The
current data on the target register will be covered.
Scope of m
1
: 1–4
Scope of m
2
: 1–m
1
(m
2
cannot be larger than m
1
)
Scope of n: m
2
–4 (n cannot be smaller than m
2
)
Example
Example 1
1. When M1168 = OFF (BCD mode) and X0 = ON, transfer the two digit content that starts
calculating from the 4
th
digit (means the thousands digit) of D10’s decimal value to the two
digit content that starts from the 3
rd
digit (means the hundreds digit) of D20’s decimal
number. 10
3
and 10
0
of D20 remain unchanged after this instruction is executed.
2. When the BCD value exceeds the range of 0–9,999, PLC determines an operation error
and will not execute the instruction. M1067, M1068 = ON, and D1067 records the error
code OE18 (hex).

Table of Contents

Related product manuals