5 - 74 5 - 74
5 MELSEC FUNCTIONS
5.17.3 BIN hexadecimal ASCII conversion BINHA_S_MD
The numeric value in each digit of the specified BIN 16-bit data represented in hexadecimal is converted into
ASCII code data.
Function definition
BOOL BINHA_S_MD (BOOL EN, ANY 16S1, 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 (BIN 16-bit data)
D
OUT
Conversion result (hexadecimal 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 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);
5.17.4 32-bit BIN hexadecimal ASCII conversion DBINHA_S_MD
The numeric value in each digit of the specified BIN 32-bit data represented in hexadecimal is converted into
ASCII code data.
Function definition
BOOL DBINHA_S_MD (BOOL EN, ANY32 S1, STRINGS (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 (BIN 32-bit data)
D
OUT
Conversion result (hexadecimal 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 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 hexadecimal 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: ......