594 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 17 ASCII Serial Port Instructions (ABL, ACB, ACL, AHL, ARD, ARL, AWA, AWT)
ASCII Read Line (ARL)
The ARL instruction removes specified characters from the buffer and stores
them in the Destination.
Operands:
Relay Ladder
EN
DN
ER
ASCII Read Line
Channel ?
Destination ?
??
SerialPort Control ?
SerialPort Control Length ?
Characters Read ?
ARL
Operand Type Format Enter Notes
Channel DINT Immediate
Tag
0
Destination String
SINT
INT
DINT
Tag Tag into which the characters
are moved (read):
·For a string data type, enter
the name of the tag.
·For a SINT, INT, or DINT
array, enter the first
element of the array.
·If you want to compare, convert, or manipulate
the characters, use a string data type.
·String data types are:
· Default STRING data type
· Any new string data type that you create
Serial Port
Control
SERIAL_PORT_
CONTROL
Tag Tag that controls the operation
Serial Port Control
Length
DINT Immediate Maximum number of
characters to read if no
termination characters are
found
·Enter the maximum number of characters that any
message will contain (that is, when to stop
reading if no termination characters are found).
For example, if messages range from 3 to 6
characters in length, enter 6.
·The Serial Port Control Length must be less than
or equal to the size of the Destination.
·If you want to set the Serial Port Control Length
equal to the size of the Destination, enter 0.
Characters Read DINT immediate 0 During execution, displays the number of characters
that were read.