5 - 75 5 - 75
5 MELSEC FUNCTIONS
5.17.5 BCD 4-digit decimal ASCII conversion BCDDA_S_MD
The numeric value in each digit of the specified BCD 4-digit data is converted into ASCII code.
Function definition
BOOL BCDDA_S_MD (BOOL EN, ANY16 S1, STRING(6) D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Data to be converted (BCD 4-digit data)
D
OUT
Conversion result (decimal ASCII code data)
Return Value
Description
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)
5.17.6 BCD 8-digit decimal ASCII conversion DBCDDA_S_MD
The numeric value in each digit of the specified BCD 8-digit data is converted into ASCII code.
Function definition
BOOL DBCDDA_S_MD (BOOL EN, ANY32 S1, STRING (10) D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Data to be converted (BCD 8-digit data)
D
OUT
Conversion result (decimal ASCII code data)
Return Value
Description
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 decimal ASCII conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......