Publication 1766-RM001A-EN-P - October 2008
ASCII Instructions 385
• String Length (LEN) is the number of characters you want to read
from the buffer. The maximum is 82 characters. If you specify a
length larger than 82, only the first 82 characters are read and
moved to the destination. (A length of “0” defaults to 82.) This is
word 1 in the control data file.
• Characters Read (POS) is the number of characters that the
controller moved from the buffer to the string (0…82). This field is
read-only and resides in word 2 of the control data file.
• Error displays the hexadecimal error code that indicates why the
ER bit was set in the control data file. See page 390 for error code
descriptions.
Addressing Modes and File Types can be used as shown below:
Instruction Operation
When the rung goes from false-to-true, the control element Enable (EN)
bit is set. When the instruction is placed in the ASCII queue, the Queue
bit (EU) is set. The Running bit (RN) is set when the instruction is
executing. The DN bit is set on completion of the instruction.
Once the requested number of characters are in the buffer, all characters
(including the Termination characters) are moved to the destination string.
The number of characters moved is stored in the POS word of the control
data file. The number in the Characters Read field is continuously updated
and the Done bit (DN) is not set until all of the characters have been read.
Exception: If the controller finds termination characters before done
reading, the Done bit (DN) is set and the number of characters found is
stored in the POS word of the control data file.
ARL 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
Channel • •
Destination •
• •
Control •
• •
(1) The Control data file is the only valid file type for the Control Element.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive