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

MotionSuite™ Series Machine Controller Motion Programming Manual
Chapter 4: Sequence Commands
4-38
4.6.9
BIN
→
→
→
→BCD (BCD)
!
!
!
! Outline
The BCD command converts a binary number (BIN code) to the BCD code. It can only be
used for the integer number data. If the BIN data is greater than 9999, or it is a negative
value, the correct result cannot be obtained.
!
!
!
! Detailed Explanation
Command Method
Data Type
$ = Yes
× = No
!
!
!
! Program Example
Supplement
If the BIN data is greater than 9999, 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=BCD(MW00100);
L
ML00102=BCD(MW00100);
F
—
—
MW00100=BCD(MW00101);
MW00100=BCD(1234);
MF00200=BCD(ML00202);
MW00100
BCD
⇒MW00101
ML00100
BCD
⇒ML00102
(Example 1)
0
4
D
2
MW00101
1
2
3
4
MW00100
Convert
1234 (Decimal)
(1234H)
(Example 2)
3
0
3
9
MW00101
C
3
4
5
MW00100
Convert
12345 (Decimal)
(C345H)