Any Data Fetch In Character String; Any Data Replacement In Character String - 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.25 Any data fetch in character string

S2[1] characters of data, starting at S2[0] of the specified character data, are acquired.
Function definition

5.17.26 Any data replacement in character string

The data of the number of characters specified in S2[1] are stored into the position, starting at S2[0], of the
specified character string data.
Function definition
5 - 85
BOOL MIDR_M (BOOL EN, STRING S1, ANY16(2) S2 , STRING D);
Argument Name
IN/OUT
EN
IN
S1
IN
S2
IN
D
OUT
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data of the number of
(* characters specified in StrArray [1] from the position specified in StrArray [0],
(* starting at the left of the character specified in sData (head of the character
(* string), are stored into Result.
MIDR_M (X0, sData, StrArray, Result);
Corresponding MELSEC command
MIDR (Any data fetch in character string)
BOOL MIDW_M (BOOL EN, STRING S1, ANY16(S) S2, STRING D);
Argument Name
IN/OUT
EN
IN
S1
IN
S2
IN
D
IN/OUT Data to be replaced, replacement result (character string data)
Return Value
BOOL
Execution condition
Example of use
(* When execution condition X0 turns ON, the data of the number of characters
(* specified in StrArray [1], starting at the left of the character specified in sData
(* (head of the character string), are stored into the position specified in StrArray *)
(* [0], starting at the left of the character string data stored in sData2.
MIDW_M (X0, sData1, StrArray, sData2);
Corresponding MELSEC command
MIDW (Any data replacement in character string)
MIDR_M
Execution condition (Function is executed only when the result is
TRUE)
Data to be acquired (character string data)
Position of first character
and storage destination of
characters to be acquired
(ARRAY [0..1] OF ANY16)
Acquisition result (character string data)
Description
MIDW_M
Execution condition (Function is executed only when the result is
TRUE)
Data to be acquired (character string data)
Position of first character and
storage destination of
characters to be acquired
(ARRAY [0..1] OF ANY16)
Description
For the usable data type, refer to "3.2.2 About
ANY type".
Description
S2 [0] Position of first character
S2 [1] Number of acquired
characters
Description
S2 [0] Position of first character of
replacement destination
S2 [1] Number of acquired
characters
*)
*)
*)
*)
*)
*)
*)
5 - 85

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents