String Extract (Aex); Entering Parameters - Allen-Bradley SLC 500 Series Reference Manual

Hide thumbs Also See for SLC 500 Series:
Table of Contents
10-12
ASCII Instructions

String Extract (AEX)

AEX
AEX
String Extract
Source
ST28:0
Index
32
Number
10
Dest
ST14:3
Fixed SLC
SLC
SLC
5/01
5/02
5/03
Output Instruction
Publication 1747-RM001G-EN-P - November 2008
Use the AEX instruction to create a new string by taking a portion of an
existing string and linking it to a new string.

Entering Parameters

Enter the following parameters when programming this instruction.
• Source is the existing string. The source value is not affected by this
instruction.
SLC
SLC
• Index is the starting position (from 1 to 82) of the string you want to
5/04
5/05
extract. (An index of 1 indicates the left-most character of the string.)
• Number is the number of characters (from 1 to 82) you want to extract,
starting at the indexed position. If the index plus the number is greater
than the total characters in the source string, the destination string will
be the characters from the index to the end of the source string.
• Destination is the string element (ST) where you want the extracted
string stored.
Example
The following conditions cause the processor to set the ASCII Error bit
(S:5/15).
• Invalid source string length or string length of zero
• Index or number values outside of range
• Index value greater than the length of the source string
The destination string is not changed in any of the above error conditions.
However, the destination will be changed if the index value plus the number
value are greater than the string length. Note that the ASCII Error bit (S:5/15)
is not set.
Table of Contents
loading

Table of Contents