Bcd Bin Conversion; 32-Bit Bcd Bin Conversion - Mitsubishi MELSEC-q Programming Manual

Melsec q series; melsec l series
Hide thumbs Also See for MELSEC-q:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS
5.6.3 BCD
BIN conversion
The specified BCD 4-digit data (0 to 9999) is converted into BIN 16-bit data.
Function definition
5.6.4 32-bit BCD
The specified BCD 8-digit data (0 to 99999999) is converted into BIN 32-bit data.
Function definition
5 - 24
BIN_M
BOOL BIN _M (BOOL EN, ANY16 S1, ANY16 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BCD data stored in D0 is
(* converted into BIN, and the result is stored into D100.
BIN_M (X0, D0, D100);
Corresponding MELSEC command
BIN (Conversion from BCD 4-digit data to BIN data)
BIN conversion
DBIN_M (BOOL EN, ANY32 S1, ANY32 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BCD data stored in dwData1 is
(* converted into BIN, and the result is stored into Result.
DBIN_M (X0, dwData1, Result);
Corresponding MELSEC command
DBIN (Conversion from BCD 8-digit data to BIN data)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (BCD 4-digit data)
IN
OUT
Conversion result (BIN 16-bit data)
DBIN_M
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Data to be converted (BCD 8-digit data)
IN
Conversion result (BIN 32-bit data)
OUT
For the usable data type, refer to "3.2.2
About ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 24

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents