18 binary conversion instruction (bin) – Yaskawa Ladder Works Programming Manual User Manual
Page 48

2.18 BINARY CONVERSION Instruction (BIN)
2-31
2.18 BINARY CONVERSION Instruction (BIN)
[Outline]
The BIN instruction converts a binary coded decimal (BCD) value in the Source and into a binary
value (binary conversion) and the result is stored in the Dest. If the 4 - digit BCD value in the integer
is abcd, the output value (Dest) of the BIN instruction can be determined by the following formula:
Dest = (a x 1,000) + (b x 100) + (c x 10) + d
Although the above formula is applicable even if the value in the Source is not in BCD notation (e.g.
123FH), correct results are obtained in such cases.
[Format]
Symbol : BIN
Full Name : Convert to Binary
Category : MATH
Icon :
[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
[Program Example]
Integer type data
Double-length integer data