EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 665

Mitsubishi Electric MELSEC FX Series
838 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
Loading...
7 Applied Instructions
7.20 Character String Control
663
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
1
Outline
2
Instruction List
3
Configuration of
Instruction
4
How to Read
Explanation of
Instructions
5
Basic Instruction
6
Step Ladder
Instructions
7
Applied
Instructions
8
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
Function and operation explanation
1. 16-bit operation (INSTR/INSTRP)
1) The character string stored in the device specified by and later is searched for within the character
string of the device specified by and later. The search begins at the "n"th character from the left end
(head character) of the device specified by and the search result is stored in the device specified by
.
The search result provides the first matching character (located from the left end (head character)) in the
device specified by .
2) When the searched character string is not detected, "0" is stored in the device specified by .
3) When the search start position "n" is a negative number or "0", search processing is not executed.
4) A character string can be directly specified in the character string to search for specified by .
Cautions
1) When handling character string data in a structured program, a 16-bit device cannot be specified directly
as in the case of a simple project. Use a label to handle character string data.
Use a global label to specify a device.
2) The FX
3UC PLC of V 2.20 or later supports this instruction.
Command
input
INSTR
EN ENO
d
s1
s2
n
Head device storing search result
Label 1
*1
Label 2
*2
Search start position
*1. This defines the head of the device that stores the character string to search for.
*2. This defines the head of the device that stores the character string to be searched.
+0
+2
+3
+4
"ABCDEFGHIJK"
+1
+5
Search is started from
the 3rd character. (n=3)
5th character from
the head character
46H(F)
48H(H)
45H(E)
47H(G)
42H(B)
44H(D)
41H(A)
43H(C)
4AH(J) 49H(I)
00H 4BH(K)
+0
"EFGH"
+1
+2
5
Stores the position where
the first detected characte
r
is located from the head
character in the character
string data stored in .
46H(F)
48H(H)
45H(E)
47H(G)
00H
Character string to search forCharacter string to be searched
b15 b8 b7 b0
b15 b8 b7 b0
d
s2
s1s2
42H(B)
41H(A)
+0
b15
+2
+3
+4
b8 b7 b0
"1234AB56AB"
+1
+5
Search is started from
the 3rd character. (n=3)
5th character from
he head character
32H(2)
34H(4)
36H(6)
31H(1)
33H(3)
35H(5)
42H(B) 41H(A)
"AB"
5
D100
Character string to search fo
r
Character string to be searched
00H
s2

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals