VA Motion Controller Programming Manual
190
TRUNC type data
conversion
10.3.1 Conversion of BYTE type BCD data
BYTE type BCD data
conversion
The conversion of BYTE type BCD data includes the following three
instructions : B_BCD_TO_SINT,
B_BCD_TO_INT and B_BCD_TO_DINT . These three instructions convert
a BCD (binary encoded decimal) input value of a BYTE data type into
an output value of the SINT , INT, and DINT data types, respectively.
BYTE
type
BCD
data conversion instruction
Input value
range BCD code 16#0099;
The corresponding
output values SINT,
INT and DINT are 0~99 .
usage (take B_BCD_TO_SINT as an example)
LD, FBD
programming language
OUT:=B_ BCD_TO_
SINT ( IN )