8 bcd-to-binary (bin), Joverview, Jdescription designation method – Yaskawa MP900 Series Motion Programming Manual User Manual
Page 167: Data types, Jprogramming examples
Sequence Commands
4.6.8 BCD-TO-BINARY (BIN)
4 -34
4.6.8 BCD-TO-BINARY (BIN)
J
Overview
The 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 ob-
tained.
J
Description
Designation Method
MW00100=BIN(MW00101);
MW00100=BIN(1234H);
MF00200=BIN(ML00202);
Data Types
Bit (B)
Integer (W)
Double Integer
(L)
Real Number
(F)
Constant
No
Yes
Yes
No
Yes
J
Programming Examples
Type
Motion Program
Ladder Logic Program
B
−
−
W
MW00101=BIN(MW00100);
MW00100 BIN
⇒ MW00101
L
ML00102=BIN(MW00100);
ML00100 BIN
⇒
ML00102
F
−
−
Example 1:
2
3
4
1
MW00101
(1234H)
Conversion
4
D
2
0
MW00100
1234 (decimal)
Example 2:
2
3
F
1
MW00101
(123FH)
4
D
D
0
MW00100
Conversion
1245 (decimal)
If non-BCD data is specified, a correct result cannot be obtained.
4
A
EXAMPLE
"
INFO