![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681273.webp)
1234
Text String Processing Instructions
Section 3-33
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.
Example
In this example, MID$(654) is used to read three characters.
3-33-7 FIND IN STRING: FIND$(660)
Purpose
Finds a designated text string from within a text string.
Ladder Symbol
Variations
Applicable Program Areas
Operands
S1: Source Text String
S2: Found Text String
S1:
S3:
D: D00300
S2: D00200
S3: D00400
Text string ABCDEFGHIJ
Three characters read.
From 5th character
(leftmost byte in D00102).
Text string EFG
FIND$(660)
S1
S2
D
S1
: Source text string first word
S2
: Found text string first word
D
: First destination word
Variations
Executed Each Cycle for ON Condition
FIND$(660)
Executed Once for Upward Differentiation
@FIND$(660)
Executed Once for Downward Differentiation
Not supported
Immediate Refreshing Specification
Not supported
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
15
0
S1
to
Text string data: 4,095 characters max. + NUL
S1 + maximum 2,047 words
15
0
S2
to
Text string data: 4,095 characters max. + NUL
S2 + maximum 2,047 words
Summary of Contents for SYSMAC CS1D-CPU**
Page 3: ...iv...
Page 29: ...xxx...
Page 185: ...146 List of Instructions by Function Code Section 2 4...
Page 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Page 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Page 1391: ...1352 ASCII Code Table Appendix A...