Essrc (String Search: With Storage Area Size) - Panasonic FP7 Series Command Reference Manual

Cpu unit
Hide thumbs Also See for FP7 Series:
Table of Contents

Advertisement

14.32 ESSRC (String Search: With Storage Area Size)

14.32 ESSRC (String Search: With Storage Area Size)
Ladder diagram
List of operands
Operand
Description
Starting device address of the string data to be searched for (available range: 0 to 65534; for
S1
character constant: 0 to 256 characters)
p
Starting search position of the string to be searched for (available range: 1 to 65534)
Starting device address of the string to be searched (available range: 1 to 65534; for character
S2
constant: 0 to 256 characters)
D
Starting device address to store the search result
Available devices (●: Available)
Operan
d
W
W
X
Y
S1
p
S2
D
(Note 1)
Only 16-bit devices, and integer constants can be modified. (Character constants cannot be specified.)
Outline of operation
● This instruction searches for the string data specified by [S1] in the string table starting from
[S2].
● For [p], specify the relative position (by byte) in the string table where the search starts.
● For the search result, the number of same character data is stored in the device whose
address is specified by [D], and the relative position (by byte) of the first match is stored in [D
+1].
Processing
Example 1) Searching for string "EFG" stored in DT0, in the string table from DT10
[S1]...DT0 [p]...U1 [S2]...DT10 [S2]...DT120
14-126
16-Bit device:
W
W
W
S
D
L
R
L
S
D
T
D
32-Bit
device:
TS
TE
U
W
WI
IX
C
C
M
O
S
E
Real
St
Integer
numbe
rin
r
g
D
K
H
SF
" "
F
WUME-FP7CPUPGR-12
Index
modifie
r
(Note 1)

Advertisement

Table of Contents
loading

Table of Contents