18 binary conversion (bin), 1 ) operation, 2 ) format – Yaskawa MP900 Series Ladder Programming Manual User Manual

Page 123: 3 ) programming example

Advertising
background image

5.3 Numeric Operation Instructions

5.3.18 Binary Conversion (BIN)

5-54

5.3.18 Binary Conversion (BIN)

( 1 ) Operation

The value of the input data is converted from BCD data to binary data and stored in the output data.
If the input data is not BCD data, such as 123F hex, the result of the binary conversion will be incorrect.

( 2 ) Format

∗ C and # registers cannot be used.

( 3 ) Programming Example

In the following programming example, the value 4,660 (1234 hex) in input data A in MW00000 is converted to binary
and stored in the output data in MW00001.
MW00000 = 1234 hex: (1

× 1,000) + (2 × 100) + (3 × 10) + 4 → MW00001 = 1,234

When performing operations with different data types, the result of the operation will depend on the data type of the output reg-
ister.
Refer to 4.4.2 ( 3 ) Precautions When Using Local Registers within a User Function for details.

Output data

Input data

Converted to binary.

The output data is computed as shown below when the input BCD data is abcd.

Output data = (a × 1,000) + (b × 100) + (c × 10) + d

Input data

Output data

Icon:

Key entry: BIN

Parameter Name

Applicable Data Types

B

W

L

F

A

Index

Constant

Input data (Src)

×

{

{

×

×

{

{

Output data (Dest)

×

{

*

{

*

×

×

{

×

INFO

Advertising
This manual is related to the following products: