![Omron CJ1G-CPUxx Instructions Manual Download Page 1043](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_7424911043.webp)
1022
Text String Processing Instructions
Section 3-33
Precautions
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 0000 (hex) is output to D, the Equals Flag will turn ON.
Example
In this example, RGHT$(653) is used to read four characters.
3-33-6 GET STRING MIDDLE: MID$(654)
Purpose
Reads a designated number of characters from any position in the middle of a
text string.
Ladder Symbol
Variations
Applicable Program Areas
Operands
S1: Text String
S2: Number of Characters (0000 to 0FFF hex or &0 to &4095)
S3: Beginning Position (0001 to 0FFF hex or &1 to &4095)
S1:
S2: D00200
D:
Text string ABCDEF
Text string CDEF
Four characters
(bytes) read.
S1: Text string first word
S2: Number of characters
S3: Beginning position
D: First destination word
MID$(654)
S1
S2
S3
D
Variations
Executed Each Cycle for ON Condition
MID$(654)
Executed Once for Upward Differentiation
@MID$(654)
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
Text string data: 4,095 characters max. + NUL
S1 + maximum 2,047 words
15
0
S1
to
Text string data: 4,095 characters max. + NUL
D + maximum 2,047 words
to
15
0
D
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 ...