5 - 79 5 - 79
5 MELSEC FUNCTIONS
5.17.13 Device comment data read COMRD_S_MD
The comment of the specified device is read as ASCII code data.
Function definition
BOOL COMRD_S_MD (BOOL EN, ANY_SIMPLE S1, STRING (32) D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1
IN
Data from which comment will be read
D
OUT
Comment read result (ASCII code data)
Remarks: The DINT, REAL and STRING types cannot be used in argument "S1".
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the comment set in D100 is read,
*)
(* and stored into sData in ASCII code.
*)
COMRD_S_MD (X0, D100, sData);
Corresponding MELSEC command
COMRD (Device comment data read)
5.17.14 Character string length detection LEN_S_MD
The length of the specified character string is obtained.
Function definition
BOOL LEN_S_MD (BOOL EN, STRING S1, ANY16 D);
Argument Name
IN/OUT
Description
EN IN
Execution condition (Function is executed only when the
result is TRUE)
S1 IN
Data whose character string length will be detected
(character string data)
D
OUT
Detection result (BIN 16-bit data)
Return Value
Description
BOOL Execution
condition
Example of use
(* When execution condition X0 turns ON, the length of the character string
*)
(* specified in sData is detected, and stored into iData.
*)
LEN_S_MD (X0, sData, iData);
Corresponding MELSEC command
LEN (Character string length detection)
For the usable data type, refer to "3.2.2 About
ANY type".
Содержание MELSEC L series
Страница 1: ...Programming Manual Structured Text ...
Страница 2: ......
Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...
Страница 297: ......