![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681275.webp)
1236
Text String Processing Instructions
Section 3-33
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
Operands
S: Text String
Name
Label
Operation
Error Flag
ER
ON if more than 4,095 characters are designated by S1
or S2.
ON if the Communications Port Enabled Flag for the com-
munications port number specified as the
Com Port num-
ber
for
Background Execution
is OFF when background
processing is specified.
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 C
Text string: ABCDEF
LEN$(650)
S
D
S
: Text string first word
D
:
First destination word
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
15
0
S
to
Text string data: 4,095 characters max. + NUL
S + 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...