8 bcd → → → → bin (bin) ! ! ! ! outline, Detailed explanation, Program example – Yaskawa MotionSuite Series Machine Controller Programming Manual User Manual
Page 169

MotionSuite™ Series Machine Controller Motion Programming Manual
Chapter 4: Sequence Commands
4-37
4.6.8
BCD
→
→
→
→BIN (BIN)
!
!
!
! Outline
The BIN command converts the BCD code data to a binary number (BIN code). It can
only be used for integer number data. If a value other than the BCD code is designated, the
correct result cannot be obtained.
!
!
!
! Detailed Explanation
Command Method
Data Type
$ = Yes
× = No
!
!
!
! Program Example
Supplement
If data other than the BCD code is designated, the correct result cannot be obtained.
Bit (B)
Integer (W)
32-bit Integer (L)
Real (F)
Constant
×
$
$
×
$
Type
Motion Program
Ladder Program
B
—
—
W
MW00101=BIN(MW00100);
L
ML00102=BIN(MW00100);
F
—
—
MW00100=BIN(MW00101);
MW00100=BIN(1234H);
MF00200=BIN(ML00202);
MW00100
BIN
⇒MW00101
ML00100
BIN
⇒ML00101
(Example 1)
1
2
3
4
MW00101
0
4
D
2
MW00101
Convert
(1234H)
1234 (Decimal)
(Example 2)
1
2
3
F
MW00101
0
4
D
D
MW00101
Convert
(1234H)
1245 (Decimal)