![Omron CJ1G-CPUxx Instructions Manual Download Page 1033](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_7424911033.webp)
1012
Text String Processing Instructions
Section 3-33
3-33 Text String Processing Instructions
This section describes instructions used to manipulate text strings.
3-33-1 Text String Processing Overview
Data from the beginning until a NUL code (00 hex) is handled as text string
data expressed in ASCII (except for 1-byte, special characters). It is stored
from leftmost to rightmost bytes, and from rightmost to leftmost words.
When there is an odd number of characters, 00 hex (NUL code) is stored in
the available space in the rightmost byte of the final word.
When there is an even number of characters, 0000 hex (two NUL codes) is
stored in the leftmost and rightmost bytes of the word following the final word.
As shown in the following diagram, a text string can be specified by simply
designating the first word of that string. The text string data up until the next
NUL code (00 hex) will then be handled as a single block of ASCII data.
Text string processing instructions can be used to execute at a PLC the vari-
ous kinds of text string processing (product data, and so on) that used to be
executed at the host computer.
Instruction
Mnemonic
Function code
Page
MOV STRING
MOV$
664
CONCATENATE STRING
+$
656
GET STRING LEFT
LEFT$
652
GET STRING RIGHT
RGHT$
653
GET STRING MIDDLE
MID$
654
FIND IN STRING
FIND$
660
STRING LENGTH
LEN$
650
REPLACE IN STRING
RPLC$
661
DELETE STRING
DEL$
658
EXCHANGE STRING
XCHG$
665
CLEAR STRING
CLR$
666
INSERT INTO STRING
INS$
657
String Comparison Instructions
=$, <>$, <$, <=$,
>$, >=$
670 to 675
Example: Text string ABCDE
42
=
Example: Text string ABCD
42
=
Example: MOV$ D00000 D00100
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 ...