![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681260.webp)
1221
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
1222
CONCATENATE STRING
+$
656
1224
GET STRING LEFT
LEFT$
652
1227
GET STRING RIGHT
RGHT$
653
1229
GET STRING MIDDLE
MID$
654
1231
FIND IN STRING
FIND$
660
1234
STRING LENGTH
LEN$
650
1236
REPLACE IN STRING
RPLC$
661
1238
DELETE STRING
DEL$
658
1241
EXCHANGE STRING
XCHG$
665
1243
CLEAR STRING
CLR$
666
1246
INSERT INTO STRING
INS$
657
1247
String Comparison Instructions
=$, <>$, <$, <=$,
>$, >=$
670 to 675
1251
WRITE TEXT FILE
TWRIT
704
1256
=
Example: Text string ABCDE
42
42
=
Example: Text string ABCD
Example: MOV$ D00000 D00100
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...