Publication 1766-RM001A-EN-P - October 2008
380 ASCII Instructions
The AEX instruction creates a new string by taking a portion of an existing
string and storing it in 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.
• Index is the starting position (from 1…82) of the string you want to
extract. (An index of 1 indicates the left-most character of the
string.)
• Number is the number of characters (from 1…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.
Addressing Modes and File Types can be used as shown below:
Instruction Operation
This instruction executes on a true rung.
The following conditions cause the controller to set the ASCII String
Manipulation Error bit (S:5/15):
• Source string length is less than 1 or greater than 82
AEX Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 92.
Parameter
Data Files
(1)
Function Files
CS - Comms
IOS - I/O
DLS - Data Log
Address
Mode
Address Level
O
I
S
B
T, C, R
N
F
ST
L
MG, PD
RI/RIX
PLS
RTC
HSC
PTOX, PWMX
STI
EII
BHI
MMI
LCD
Immediate
Direct
Indirect
Bit
Word
Long Word
Element
Source • • • •
Index •• ••• •
• •
Number •• •••
• •
Destination •
• •
(1) The Control data file is the only valid file type for the Control Element.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive