698
7 APPLICATION INSTRUCTIONS
7.8 String Processing Instructions
Searching string data
INSTR(P)
These instructions search string data for the specified string.
■Execution condition
■Descriptions, ranges, and data types
■Applicable devices
Ladder ST
ENO:=INSTR(EN,s1,s2,s3,d);
ENO:=INSTRP(EN,s1,s2,s3,d);
FBD/LD
Instruction Execution condition
INSTR
INSTRP
Operand Description Range Data type Data type (label)
(s1) Character strings to be searched or the start device
containing these character strings
String ANYSTRING_SINGLE
(s2) Character string to be searched for or the start device
containing the character string to be searched for
String ANYSTRING_SINGLE
(d) Device for storing the search result 16-bit signed binary ANY16
(s3) Search start position 1 to 16383 16-bit unsigned binary ANY16
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s1)
(s2)
(d)
(s3)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)