Text String Processing Instructions; Text String Processing Overview - Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

Text String Processing Instructions

3-33 Text String Processing Instructions

3-33-1 Text String Processing Overview

This section describes instructions used to manipulate text strings.
Instruction
MOV STRING
CONCATENATE STRING
GET STRING LEFT
GET STRING RIGHT
GET STRING MIDDLE
FIND IN STRING
STRING LENGTH
REPLACE IN STRING
DELETE STRING
EXCHANGE STRING
CLEAR STRING
INSERT INTO STRING
String Comparison Instructions
WRITE TEXT FILE
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.
Example: Text string ABCDE
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.
Example: Text string ABCD
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.
Example: MOV$ D00000 D00100
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.
Mnemonic
Function code
MOV$
664
+$
656
LEFT$
652
RGHT$
653
MID$
654
FIND$
660
LEN$
650
RPLC$
661
DEL$
658
XCHG$
665
CLR$
666
INS$
657
=$, <>$, <$, <=$,
670 to 675
>$, >=$
TWRIT
704
42
=
42
=
Section 3-33
Page
1222
1224
1227
1229
1231
1234
1236
1238
1241
1243
1246
1247
1251
1256
1221

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents