Hexadecimal Ascii Bin Conversion - Mitsubishi Electric MELSEC Q Series Programming Manual

Structured text
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

5 MELSEC FUNCTIONS
5.17.3 BIN
hexadecimal ASCII conversion
The numeric value in each digit of the specified BIN 16-bit data represented in hexadecimal is converted into
ASCII code data.
Function definition
5.17.4 32-bit BIN
The numeric value in each digit of the specified BIN 32-bit data represented in hexadecimal is converted into
ASCII code data.
Function definition
5 - 74
BOOL BINHA_S_MD (BOOL EN, ANY 16S1, 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 BIN data stored in iData and represented in hexadecimal is converted
(* into ASCII code, and the result is stored into sData.
BINHA_S_MD (X0, iData, sData);
Corresponding MELSEC command
BINHA (BIN 16-bit
hexadecimal ASCII conversion
BOOL DBINHA_S_MD (BOOL EN, ANY32 S1, STRINGS (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 BIN data stored in dData and represented in hexadecimal is converted
(* into ASCII code, and the result is stored into sData.
DBINHA_S_MD (X0, dData, sData);
Corresponding MELSEC command
DBINHA (BIN 32-bit
BINHA_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (BIN 16-bit data)
OUT
Conversion result (hexadecimal ASCII code data)
hexadecimal ASCII conversion);
DBINHA_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (BIN 32-bit data)
OUT
Conversion result (hexadecimal ASCII code data)
hexadecimal ASCII conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
*)
*)
5 - 74

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents