1013
Text String Processing Instructions Section 3-31
Description +$(664) connects the text string data designated by S1 to the text string data
designated by S2, and outputs the result to D as text string data (including the
final NUL).
The maximum number of characters that can be designated by S1 and S2 is
4,095 (0FFF hex). If there is no NUL until 4,096 characters, an error will be
generated and the Error Flag will turn ON. Moreover, the result of the linkage
can be no more than 4,095 characters (0FFF hex). If the linkage results in
more characters than that, only the first 4,095 characters (with NUL added as
the 4,096th) will be output to D.
If there is a NUL for both S1 and S2, the two NUL characters (0000 hex) will
be output to D.
Flags
Precautions If more than 4,095 characters are designated by S1 and S2, an error will be
generated and the Error Flag will turn ON.
If 0000 (hex) is transferred to D, the Equals Flag will turn ON.
Do not overlap the beginning word designated by D with the character data
area for S2. If they overlap, the instruction cannot be executed properly.
Example In this example, +$(656) is used to connect the text strings ABCD and EFG
and output the result to D.
3-31-4 GET STRING LEFT: LEFT$(652)
Purpose Fetches a designated number of characters from the left (beginning) of a text
string.
Ladder Symbol
+
→→→→
Name Label Operation
Error Flag ER ON if more than 4,095 characters are designated by S1
and 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 (CP1H only).
OFF in all other cases.
Equals Flag = ON if 0000 (hex) is transferred to D.
OFF in all other cases.
0.00
D100
D200
D300
S1: D100
D101
D102
S2: D200
D201
D: D300
D301
D302
D303
LEFT$(652)
S1
S2
D
S1: Text string first word
S2: Number of characters
D: First destination word