![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_7420301282.webp)
1242
Text String Processing Instructions
Section 3-33
Description
Within the text string designated by S1, DEL$(658) deletes the number of
characters designated by S2, from the beginning word designated by S3, and
outputs the result to D as text string data (with NUL added at the end).
Note DEL$(658) can be processed in the background. Refer to the SYSMAC CS/
CJ/NSJ Series PLC Programming Manual (W394) for details.
Flags
Precautions
The maximum number of characters for S1 is 4,095 (0FFF hex). If there are
more than that (i.e., if there is no NUL before the 4,096th character), an error
will be generated and the Error Flag will turn ON.
The range for the beginning position designated by S3 is the 1st to the
4,095th character (0001 to 0FFF hex). If the setting is outside of this range, an
error will be generated and the Error Flag will turn ON.
If the number of words specified for S1 exceeds the length of the text string,
the Error Flag will turn ON.
If the number of characters to be deleted extends beyond the end of the S1
text string, all of the characters up to the end will be deleted. If all of the char-
acters from the beginning of S1 to the end are designated to be deleted, then
000 hex will be output to D.
Example
In this example, DEL$(658) is used to read three characters.
3-33-11 EXCHANGE STRING: XCHG$(665)
Purpose
Replaces a designated text string with another designated text string.
Ladder Symbol
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 desig-
nated by S2.
ON if the S3 data is within the range of 1 to 4,095 (0001 to
0FFF hex).
ON if S3 is greater than S1.
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.
Equals Flag
=
ON when 0000 hex is output to D.
OFF in all other cases.
S1:
D:
00
S3: D00500
Text string ABCDMHI
From 5th character.
Three bytes discarded.
Text string ABCDEFGHI
S2: D00200
Summary of Contents for SYSMAC CS Series
Page 2: ......
Page 4: ...iv ...
Page 30: ...xxx ...
Page 186: ...146 List of Instructions by Function Code Section 2 4 ...
Page 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Page 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Page 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Page 1392: ...1352 ASCII Code Table Appendix A ...
Page 1404: ...1364 Revision History ...