VA Motion Controller Programming Manual
191
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#37 changed to short type
When the contact
C003
is
ON
time , the
instruction is executed; address
as
V006
in the
16
hexadecimal into
numbers short integer , stored in the
V007
in ;
Execution of results :
16 # 37----37
10.3.2 Conversion of WORD type BCD data
WORD type BCD data
conversion
The conversion of WORD type BCD data includes the
following three instructions : W_BCD_TO_SINT,
W_BCD_TO_INT and W_BCD_TO_DINT . These three instructions
convert a BCD ( binary encoded decimal ) input value
of a WORD data type into an output value of
the SINT , INT, and DINT data types, respectively.
WORD
Type
BCD
conversion instruction data
Input value BCD code 16
# 0127 , the output value
corresponding to SINT to 127 ,
and then input the output is
increased - . 1; the input
values BCD code 16 # 16 # 0000
~ 9999 , the output value
corresponding to INT, DINT are 0
to 9999 .
usage (take W_BCD_TO_SINT as an example)
LD, FBD
programming language