Mitsubishi MELSEC-q Programming Manual page 148

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

Advertisement

5 MELSEC FUNCTIONS
5.17.5 BCD 4-digit
The numeric value in each digit of the specified BCD 4-digit data is converted into ASCII code.
Function definition
5.17.6 BCD 8-digit
The numeric value in each digit of the specified BCD 8-digit data is converted into ASCII code.
Function definition
5 - 75
decimal ASCII conversion
BOOL BCDDA_S_MD (BOOL EN, ANY16 S1, STRING(6) D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the numeric value in each digit of
(* the BCD data stored in iData and represented in decimal is converted into
(* ASCII code, and the result is stored into sData.
BCDDA_S_MD (X0, iData, sData);
Corresponding MELSEC command
BCDDA (BCD 4-digit
decimal ASCII conversion
BOOL DBCDDA_S_MD (BOOL EN, ANY32 S1, STRING (10) D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the numeric value in each digit of
(* the BCD data stored in dData and represented in decimal is converted into
(* ASCII code, and the result is stored into sData.
DBCDDA_S_MD (X0, dData, sData);
Corresponding MELSEC command
DBCDDA (BCD 8-digit
BCDDA_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (BCD 4-digit data)
OUT
Conversion result (decimal ASCII code data)
decimal ASCII conversion)
DBCDDA_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (BCD 8-digit data)
OUT
Conversion result (decimal ASCII code data)
decimal ASCII conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
*)
*)
5 - 75

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents