EasyManuals Logo

Mitsubishi MELSEC iQ-F FX5 series User Manual

Mitsubishi MELSEC iQ-F FX5 series
888 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #819 background imageLoading...
Page #819 background image
22 CHARACTER STRING FUNCTIONS
22.3 Extract Mid String
817
22
22.3 Extract Mid String
MID(_E)
These functions output the specified number of characters from an arbitrary position of an input character string.
Setting data
â– Descriptions, types, and data types
Processing details
â– Operation processing
• These functions output the data for the specified number of characters from an arbitrary position of a character string input
to (s).
• The value input to (n1) specifies the number of characters to be extracted.
• The value input to (n2) specifies the number of the head character position of a character string to be extracted.
Ex.
When the value input to (n1) and (n2) is 5
• A value input to (s) is the STRING type data value and within the range from 0 to 255 byte(s).
• A value input to (n1) is the INT type data value and within the range from 0 to 255. (However, the value must be within the
number of characters of the character string to be input to (s).)
• A value input to (n2) is the INT type data value and within the range from 1 to 255. (However, the value must be within the
number of characters of the character string to be input to (s).)
Ladder diagram Structured text
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
d:=MID(s,n1,n2);
[With EN/ENO]
d:=MID_E(EN,ENO,s,n1,n2);
Argument Description Type Data type
EN Execution condition (TRUE: Execution, FALSE: Stop) Input variable BOOL
s Input Input variable STRING(255)
n1 Specification of number of characters to be extracted Input variable INT
n2 Specification of head character position of a character string to be
extracted
Input variable INT
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable STRING(255)
sd
n1
n2
EN ENO
ds
n1
n2
42H (B) 41H (A)
44H (D) 43H (C)
46H (F) 45H (E)
32H (2) 31H (1)
34H (4) 33H (3)
00H 35H (5)
2nd word
3rd word
4th word
5th word
6th word
1st word
2nd word
3rd word
1st word
46H (F) 45H (E)
32H (2) 31H (1)
00H 33H (3)
High-order byte Low-order byte High-order byte Low-order byte
"ABCDEF12345" "EF123"
(s)
(d)
Head character
position of a
character string to
be extracted
n2
:
5th character
Number of characters
to be extracted
n1
: 5

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELSEC iQ-F FX5 series and is the answer not in the manual?

Mitsubishi MELSEC iQ-F FX5 series Specifications

General IconGeneral
BrandMitsubishi
ModelMELSEC iQ-F FX5 series
CategoryController
LanguageEnglish

Related product manuals