Get String Right: Rght$(653) - 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
Flags
Precautions
Example
D

3-33-5 GET STRING RIGHT: RGHT$(653)

Purpose
Ladder Symbol
Variations
Applicable Program Areas
Name
Label
Error Flag
ER
Equals Flag
=
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.
In this example, LEFT$(652) is used to read four characters.
Text string ABCDE
S1:
43
44
Reads a designated number of characters from the right (end) of a text string.
RGHT$(653)
S1: Text string first word
S1
S2: Number of characters
S2
D: First destination word
D
Variations
Executed Each Cycle for ON Condition
Executed Once for Upward Differentiation
Executed Once for Downward Differentiation
Immediate Refreshing Specification
Block program areas
OK
OK
Operation
ON if more than 4,095 characters are designated by S1.
ON if more than 4,095 characters (0FFF hex) are desig-
nated by S2.
ON if the Communications Port Enabled Flag for the com-
munications port number specified as the Com Port num-
ber for Background Execution is OFF when background
processing is specified.
OFF in all other cases.
ON if 0000 (hex) is output to D.
OFF in all other cases.
S2: D00200
Four characters
(bytes) read.
Step program areas
Subroutines
OK
Section 3-33
Text string ABCD
D: D00300
RGHT$(653)
@RGHT$(653)
Not supported
Not supported
Interrupt tasks
OK
1229

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents