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 #400 background imageLoading...
Page #400 background image
398
7 APPLICATION INSTRUCTION
7.6 Character string operation instruction
Searching character string
INSTR(P)
These instructions search the character string data stored in the device specified by (s2) and later starting from the (s3)th
character from the left, for the character string data stored in the device specified by (s1) and later and store the search result
in the device specified by (d).
Setting data
Descriptions, ranges, and data types
Applicable devices
*1 T, ST, C cannot be used.
Processing details
These instructions search the character string data stored in the device specified by (s2) and later starting from the (s3)th
character from the left, for the character string data stored in the device specified by (s1) and later and store the search
result in the device specified by (d). The search result stores the position where the first detected character is located from
the start character in the character string data stored in (s2).
If no matched character string data is found, 0 is stored in (d).
When the search start position "s3" is a negative number or "0", search processing is not executed.
Ladder diagram Structured text
ENO:=INSTR(EN,s1,s2,s3,d);
ENO:=INSTRP(EN,s1,s2,s3,d);
Operand Description Range Data type Data type (label)
(s1) Character string to be searched for or head device number
storing a character string to be searched for
Character string Character string
(s2) Character string to be searched or head device number storing a
character string to be searched
Character string Character string
(d) Head device number storing search result 16-bit signed binary ANY16
(s3) Search start position 1 to 16383 16-bit unsigned binary ANY16
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB
U\G T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U\G Z LC LZ K, H E $
(s1) 
*1

(s2) 
*1

(d) 
(s3) 
(s1) (s2) (d) (s3)
41H (A)42H (B)
43H (C)44H (D)
45H (E)46H (F)
47H (G)48H (H)
45H (E)46H (F)
47H (G)48H (H)
49H (I)4AH (J)
4BH (K)00H
00H
"ABCDEFGHIJK"
"EFGH"
b15 b0b7b8
b15 b0
b7b8
(s2)
(s2)+1
(s2)+2
(s2)+3
(s2)+4
(s2)+5
(s1)
(s1)+1
(s1)+2
3
(s3)
5
(d)
Search start position (s3):
3rd character
Fifth character from the
head character

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