Mitsubishi Electric MELSEC-Q/L Programming Manual page 157

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

■Operation result
• Function without EN/ENO
An operation is executed and the operation value is output from (d).
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
Operation error
These functions consist of the following instructions.
MID(_E): MIDR
• In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and the corresponding error
code is stored to SD0.
Error
Description
code
4101
The value of n2 exceeds the number of characters specified for (s).
The number of characters from the start position of (d) to n1 exceeds the
device range of (d).
The value of n2 is 0.
"00H" does not exist at the device number or later specified by (s) in the
range of the corresponding device.
Program example
■MID(_E)
The program which extracts the specified number of characters from the specified start position in the character string input to
(s), and outputs the operation result from (d).
• Function without EN/ENO (MID)
[Structured ladder/FBD]
[ST]
g_string2 := MID(g_string1, g_int1, g_int2);
• Function with EN/ENO (MID_E)
[Structured ladder/FBD]
[ST]
g_bool3 := MID_E(g_bool1, g_string1, g_int1, g_int2, g_string2);
ENO
TRUE
*1
FALSE
(d)
Operation output value
Undefined value
Q00J/
QnH
QnPH
QnPRH
Q00/
Q01
5 APPLICATION FUNCTIONS
5.7 Standard Character String Functions
5
QnU
LCPU
155

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents