19 bcd conversion instruction (bcd), Outline, Format parameter – Yaskawa MP900 Series Machine Controller New Ladder Editor User Manual
Page 58

1 Ladder Program Instructions
1.2.19 BCD CONVERSION Instruction (BCD)
1-48
1.2.19 BCD CONVERSION Instruction (BCD)
Outline
The BCD instruction converts a binary value in the Source into a BCD value (BCD conver-
sion) and the result is stored in the Dest. If the 4 - digit decimal value in the Source is abcd,
the output value (Dest) of the BCD instruction can be determined by the following formula:
Dest
= (a × 4096) + (b × 256) + (c × 16) + d
Although the above formula is applicable even if the value in the Source cannot be
expressed in BCD notation (e.g. numbers greater than 9999 or negative numbers), correct
results are obtained in such cases.
Format
Parameter
Parameter Name
Setting
Source
• Any integer type and double-length integer type register
• Any integer type and double-length integer type register with
subscript
• Subscript register
Dest
• Any integer type and double-length integer type register
(except for # and C registers)
• Any integer type and double-length integer type register with
subscript (except for # and C registers)
• Subscript register
Symbol: BCD
Full Name: Convert to BCD
Category: MATH
Icon: