Decimal Ascii Bcd 4-Digit Conversion; Decimal Ascii Bcd 8-Digit 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.17.11 Decimal ASCII
The specified decimal ASCII code data is converted into BCD 4-digit data.
Function definition
5.17.12 Decimal ASCII
The specified decimal ASCII code data is converted into BCD 8-digit data.
Function definition
5 - 78
BCD 4-digit conversion
BOOL DABCD_S_MD (BOOL EN, STRING(4) S1, ANY16 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the decimal ASCII data stored in
(* sData is converted into BCD 4-digit data, and the result is stored into iData.
DABCD_S_MD (X0, sData, iData);
Corresponding MELSEC command
DABCD (Decimal ASCII
BCD 8-digit conversion
BOOL DDABCD_S_MD (BOOL EN, STRING(8) S1, ANY32 D);
Argument Name
EN
S1
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the decimal ASCII data stored in
(* sData is converted into BCD 8-digit data, and the result is stored into dData.
DDABCD_S_MD (X0, sData, dData);
Corresponding MELSEC command
DDABCD (Decimal ASCII
DABCD_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (decimal ASCII code data)
OUT
Conversion result (BCD 4-digit data)
BCD 4-digit conversion)
DDABCD_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (decimal ASCII code data)
OUT
Conversion result (BCD 8-digit data)
BCD 8-digit conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
5 - 78

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents