8 bcd to binary (bin), 1) overview, 2) format – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual
Page 252: 3) programming examples
8.9 Basic Functions
8-145
8
Command Reference
8.9.8 BCD to Binary (BIN)
(1) Overview
The BCD to Binary (BIN) command converts BCD data to binary data.
Only integer data can be used. If a non-BCD data is specified, a correct result cannot be obtained.
(2) Format
Note: Example 1
Example 2
If non-BCD data is specified, a correct result cannot be obtained.
(3) Programming Examples
BIN command programming examples are shown below.
Motion Programs
Sequence Programs
Applicable
Applicable
MW00100 = BIN (1234H);
A B
Item Description
Usable Registers
A
Binary data
output
• All integer and double integer type registers (Excluding # and C registers)
• The above registers with subscript
• Subscript registers
B
BCD data
input
• All integer and double integer type registers (Excluding # and C registers)
• The above registers with subscript
• Subscript registers
• Constants
2
3
4
1
MW00101
(1234H)
Converted to
4
D
2
0
MW00100
1234 (decimal)
2
3
F
1
MW00101
(123FH)
Converted to
4
D
D
0
MW00100
1245 (decimal)
INFO
Type
Motion Programs/
Sequence Programs
Ladder Programs
B
−
−
W
MW00101=BIN(MW00100);
L
ML00102=BIN(ML00100);
F
−
−
EXAMPLE