![Omron CJ1G-CPUxx Instructions Manual Download Page 1047](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_7424911047.webp)
1026
Text String Processing Instructions
Section 3-33
Description
FIND$(660) finds the text string designated by S2 from within the text string
designated by S1, and outputs the result (a given number of characters from
the beginning of S1) in binary data to D. If there is no matching text string,
0000 hex is output to D.
Flags
Precautions
The maximum number of characters to be read that can be designated by S1
or S2 is 4,095 (0FFF hex). If more than that are designated, an error will be
generated and the Error Flag will turn ON.
If 0000 (hex) is output to D, the Equals Flag will turn ON.
Example
In this example, FIND$(660) is used to find one character from within a text
string.
3-33-8 STRING LENGTH: LEN$(650)
Purpose
Calculates the length of a text string.
Ladder Symbol
Variations
Applicable Program Areas
→
→
→
Found data
Name
Label
Operation
Error Flag
ER
ON if more than 4,095 characters are designated by S1
or S2.
OFF in all other cases.
Equals Flag
=
ON if 0000 (hex) is output to D.
OFF in all other cases.
S1: D00100
S2: D00200
D: D00300
Text string: ABCDEF
Text string C
S: Text string first word
D
:
First destination word
LEN$(650)
S
D
Variations
Executed Each Cycle for ON Condition
LEN$(650)
Executed Once for Upward Differentiation
@LEN$(650)
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
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...