Text String Processing Instructions
Example
3-33-7 FIND IN STRING: FIND$(660)
Purpose
Ladder Symbol
Variations
Applicable Program Areas
Operands
1234
The maximum number of characters to be read that can be designated by S2
is 4,095 (0FFF hex). If more than that are designated, an error will be gener-
ated and the Error Flag will turn ON.
If 0 (0000 hex) is designated as the number of characters to be read, the two
NUL characters (0000 hex) will be output to D.
If 0000 (hex) is output to D, the Equals Flag will turn ON.
In this example, MID$(654) is used to read three characters.
Text string ABCDEFGHIJ
S1:
S3:
Finds a designated text string from within a text string.
FIND$(660)
S1
S2
D
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation
Immediate Refreshing Specification
Block program areas
OK
S1: Source Text String
S1 + maximum 2,047 words
S2: Found Text String
S2 + maximum 2,047 words
S2: D00200
Three characters read.
S3: D00400
From 5th character
(leftmost byte in D00102).
S1: Source text string first word
S2: Found text string first word
D: First destination word
Step program areas
Subroutines
OK
OK
15
S1
Text string data: 4,095 characters max. + NUL
to
15
S2
Text string data: 4,095 characters max. + NUL
to
Section 3-33
Text string EFG
D: D00300
FIND$(660)
@FIND$(660)
Not supported
Not supported
Interrupt tasks
OK
0
0
Need help?
Do you have a question about the SYSMAC CJ - REFERENCE MANUAL 01-2008 and is the answer not in the manual?