Bin; 32-Bit Bin Character String Conversion; Character String Bin 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.15 BIN

character string conversion
The specified BIN 16-bit data is converted into a character string with a decimal point added in the specified
position.
Function definition
5.17.16 32-bit BIN
The specified BIN 32-bit data is converted into a character string with a decimal point added in the specified
position.
Function definition
5 - 80
BOOL STR_S_MD (BOOL EN, ANY32 S1, ANY16 S2, STRING(9) D);
Argument Name
EN
S1
S2
D
Remarks: The digits of a bit device cannot be specified in "S1".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BIN 16-bit data specified in
(* iData is converted into a character string with a decimal point added in the
(* position specified in dData, and the result is stored into sData.
STR_S_MD (X0, dData, iData, sData);
Corresponding MELSEC command
STR (BIN 16-bit
character string conversion
BOOL DSTR_S_MD (BOOL EN, ANY32 S1, ANY32 S2 STRING(14) D);
Argument Name
EN
S1
S2
D
Remarks: The digits of a bit device cannot be specified in "S1".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the BIN 32-bit data specified in
(* dData1 is converted into a character string with a decimal point added in
(* the position specified in dData2, and the result is stored into sData.
DSTR_S_MD (X0, dData1, dData2, sData);
Corresponding MELSEC command
DSTR (BIN 32-bit
STR_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Number of digits of
numeric value to be
IN
converted
(BIN 32-bit data)
IN
Data to be converted (BIN 16-bit data)
OUT
Conversion result (character string data)
character string conversion)
DSTR_S_MD
IN/OUT
Execution condition (Function is executed only when the
IN
result is TRUE)
Number of digits of
numeric value to be
IN
converted
(BIN 32-bit data)
IN
Data to be converted (BIN 32-bit data)
OUT
Conversion result (character string data)
character string conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
Description
S1
Total number of digits (2 to
8 digits)
S1+1 Number of fraction part
digits (0 to 5 digits)
Description
Description
S1
Total number of digits (2 to
8 digits)
S1+1 Number of fraction part
digits (0 to 5 digits)
Description
*)
*)
*)
*)
*)
*)
5 - 80

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents