Character String 32-Bit 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.17 Character string
The specified character string is converted into BIN 16-bit data, and its number of digits and BIN 16-bit data are
obtained.
Function definition
5.17.18 Character string
The specified character string is converted into BIN 32-bit data, and its number of digits and BIN 32-bit data are
obtained.
Function definition
5 - 81
BIN conversion
BOOL VAL_S_MD (BOOL EN, STRING (8) S1, ANY32 D1, ANY16 D2);
Argument
IN/OUT
Name
Execution condition (Function is executed only when the result is
EN
IN
TRUE)
Data to be converted (character string data)
Remarks: The number of characters in the fraction part of the character
S1
IN
string specified in S1 is 0 to 5 characters. Note that the character string
should be specified within the (total number of digits - 3) or less.
D1
OUT
Conversion result (number of digits) (BIN 32-bit data)
D2
OUT
Conversion result (BIN 16-bit data)
Remarks: The digits of a bit device cannot be specified in "D1".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the character string specified in
(* sData is converted into BIN 16-bit data, the number of digits is stored
(* into dData, and the BIN data is stored into iData.
VAL_S_MD (X0, sData, dData, iData);
Corresponding MELSEC command
VAL (Character string
32-bit BIN conversion
BOOL DVAL_S_MD (BOOL EN, STRING(13) S1, ANY32 D1, ANY32 D2);
Argument
IN/OUT
Name
Execution condition (Function is executed only when the result is
EN
IN
TRUE)
Data to be converted (character string data)
Remarks: The number of characters in the fraction part of the character
S1
IN
string specified in S1 is 0 to 5 characters. Note that the character string
should be specified within the (total number of digits - 3) or less.
D1
OUT
Conversion result (number of digits) (BIN 32-bit data)
D2
OUT
Conversion result (BIN 32-bit data)
Remarks: The digits of a bit device cannot be specified in "D1".
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the character string specified
(* in sData is converted into BIN 32-bit data,the number of digits is stored into
(* dData1, and the BIN data is stored into dData2.
DVAL_S_MD (X0, sData, dData1, dData2);
Corresponding MELSEC command
DVAL (Character string
VAL_S_MD
Description
Description
BIN 16-bit conversion)
DVAL_S_MD
Description
Description
BIN 32-bit conversion)
For the usable data type, refer to "3.2.2 About
ANY type".
*)
*)
*)
*)
*)
*)
5 - 81

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec-l

Table of Contents