EasyManua.ls Logo

Omron CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1089
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Text String Processing Instructions
3
LEFT$/RGHT$
Flags
Function
z LEFT$
LEFT$(652) reads the number of characters
designated by S2, from the left (the beginning)
of the first word of the text string designated by
S1 until the NUL code (00 hex), and outputs
the result to D (with NUL added at the end).
If the number of characters fetched exceeds
the number of characters designated by S1,
the entire S1 text string will be output.
If 0 (0000 hex) is designated as the number of
characters to be read, the two NUL characters
(0000 hex) will be output to D.
LEFT$(652) can be processed in the background. Refer to the SYSMAC CS/CJ/NSJ Series PLC
Programming Manual (W394) or the CJ2 CPU Unit Software Operation Manual (W473) for details.
z RGHT$
RGHT$(653) reads the number of characters
designated by S2, from the right (end) of the
first word of the text string designated by S1
until the NUL code (00 hex), and outputs the
result to D (with NUL added at the end).
If the number of characters to be read exceeds
the number of characters designated by S1,
the entire S1 text string will be output.
If 0 (0000 hex) is designated as the number of
characters to be read, the two NUL characters
(0000 hex) will be output to D.
RGHT$(653) can be processed in the background. Refer to the SYSMAC CS/CJ/NSJ Series PLC
Programming Manual (W394) or the CJ2 CPU Unit Software Operation Manual (W473) for details.
Name Label Operation
Error Flag ER ON if more than 4,095 characters are designated by S1.
ON if more than 4,095 characters (0FFF hex) are designated by S2.
ON if the Communications Port Enabled Flag for the communications port number specified as the
Com Port number for Background Execution is OFF when background processing is specified.
OFF in all other cases.
Equal Flag = ON if 0000 (hex) is output to D.
OFF in all other cases.

Table of Contents

Related product manuals