Bin Ascii Conversion; 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.21 BIN
ASCII conversion
The specified BIN 16-bit data is converted into the hexadecimal ASCII data of the specified number of characters.
Function definition
5.17.22 ASCII
BIN conversion
The hexadecimal ASCII data stored in the specified number of characters is converted into BIN 16-bit data.
Function definition
5 - 83
ASC_S_MD
BOOL ASC_S_MD (BOOL EN, ANY16 S1, ANY16 n, STRING D);
Argument Name
EN
S1
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BIN 16-bit data specified in
(* iData1 is converted into hexadecimal ASCII, and the result is stored into the
(* range of the number of characters specified in iData2, starting at the device
(* number specified in sData.
ASC_S_MD (X0, iData1, iData2, sData);
Corresponding MELSEC command
ASC (BIN 16-bit data
HEX_S_MD
BOOL HEX_S_MD (BOOL EN, STRING S1, ANY16n, ANY16 D);
Argument Name
EN
S1
n
D
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the hexadecimal ASCII data stored
(* in the number of characters specified in iData1, starting at the device number *)
(* specified in sData, is converted into a BIN value, and the result is stored into
(* iData2.
HEX_S_MD (X0, sData, iData1, iData2);
Corresponding MELSEC command
HEX (ASCII
BIN 16-bit conversion)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (BIN 16-bit data)
IN
Number of characters to be stored (BIN 16-bit data)
OUT
Conversion result (ASCII data)
ASCII conversion)
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
IN
Data to be converted (hexadecimal ASCII data)
IN
Number of characters to be converted (BIN 16-bit data)
OUT
Conversion result (BIN 16-bit data)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
Description
Description
Description
*)
*)
*)
*)
*)
*)
*)
5 - 83

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents