VA Motion Controller Programming Manual
192
Note : IL, ST language programming needs to insert variables IN and OUT or use constants in
the current POU variable worksheet
Funtion and Action examples
16 # 0010
turn into a short integer
When the contact
C186
is
ON
time , the
instruction is executed; address
as
V332
in the
16
hexadecimal into
numbers short integer , stored in the
V333
in ;
Execution of Results :
16 #
0034
revolutions was
34
10.3.3 Conversion of DWOR D -type BCD data
DWORD
type
BCD
data
conversion
The conversion of
DWORD
type
BCD
data includes the
following three instructions
: D_BCD_TO_SINT,
D_BCD_TO_INT
and
D_BCD_TO_DINT
. These three instructions
convert a
BCD
( binary encoded decimal ) input value
of AD
WORD
data type into an output value of
the
SINT
,
INT,
and
DINT
data types, respectively.
DWORD
type
BCD
data conversion instruction
Enter the value BCD code
16#00000000~16#00000127 , the
corresponding output value
SINT is 0~127 , the input is
increased by -1; the input
value BCD code 16#00000000~16#0
0032767 , the output