VA Motion Controller Programming Manual
251
10.5.12 SWAP (swapping high byte and low
byte instructions )
LD, FBD programming language
Function: The SWAP instruction is used to swap the position of the highest byte ( MSB ) and
lower byte ( LSB ) of the input bit string .
Note
: IL, ST
language programming needs to insert variables
IN
and
OUT
or use constants in
the current
POU
variable worksheet
数据 Data type processed by SWAP instruction
Output bit string, exchange
the high and low bytes of the
input bit string and output
Funtion and Action examples
The address V556 ( 16 # 9900 ) is high . 8 bits
of the low . 8 bit swap
When the contact
C300
is
ON
,
the instruction is executed
to
exchange
the upper
8
bits of
the address
V556
with the lower
8
bits ;
Execution result:
16 #
9900
exchange into a
16 # 0099