5 - 77 5 - 77
5 MELSEC FUNCTIONS
5.17.9 Hexadecimal ASCII BIN conversion HABIN_S_MD
The specified hexadecimal ASCII code data is converted into BIN 16-bit data.
Function definition
BOOL HABIN_S_MD (BOOL EN, STRING(4) S1, ANY16 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 (hexadecimal ASCII code data)
D
OUT
Conversion result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the hexadecimal ASCII data stored
*)
(* in sData is converted into BIN 16-bit data, and the result is stored into iData.
*)
HABIN_S_MD (X0, sData, iData);
Corresponding MELSEC command
HABIN (Hexadecimal ASCII BIN 16-bit conversion)
5.17.10 Hexadecimal ASCII 32-bit BIN conversion DHABIN_S_MD
The specified hexadecimal ASCII code data is converted into BIN 32-bit data.
Function definition
BOOL DHABIN_S_MD (BOOL EN, STRING (8) S1, ANY32 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 (hexadecimal ASCII code data)
D
OUT
Conversion result (BIN 32-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the hexadecimal ASCII data stored in *)
(* sData is converted into BIN 32-bit data, and the result is stored into dData.
*)
DHABIN_S_MD (X0, sData, dData);
Corresponding MELSEC command
DHABIN (Hexadecimal ASCII BIN 32-bit conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
Summary of Contents for MELSEC L series
Page 1: ...Programming Manual Structured Text ...
Page 2: ......
Page 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Page 297: ......