Structured Text; Serial_Port_Control Structure - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

ARL(Channel,Destination,
SerialPortControl);
Mnemonic
Data Type
.EN
BOOL
.EU
BOOL
.DN
BOOL
.RN
BOOL
.EM
BOOL
.ER
BOOL
.FD
BOOL
.LEN
DINT
.POS
DINT
.ERROR
DINT
Description:
ASCII Serial Port Instructions (ABL, ACB, ACL, AHL, ARD, ARL, AWA, AWT)

Structured Text

The operands are the same as those for the relay ladder ARL instruction.
However, you specify the Serial Port Control Length and the Characters Read
values by accessing the .LEN and .POS members of the
SERIAL_PORT_CONTROL structure, rather than by including the values in
the operand list.

SERIAL_PORT_CONTROL Structure

Description
The enable bit indicates that the instruction is enabled.
The queue bit indicates that the instruction entered the ASCII queue.
The done bit indicates when the instruction is done, but it is asynchronous to the logic scan.
The run bit indicates that the instruction is executing.
The empty bit indicates that the instruction is done, but it is synchronous to the logic scan.
The error bit indicates when the instruction fails (errors).
The found bit does not apply to this instruction.
The length indicates the maximum number of characters to move to the destination (that is, when to
stop reading if no termination characters are found).
The position displays the number of characters that were read.
The error contains a hexadecimal value that identifies the cause of an error.
The ARL instruction removes characters from the buffer and stores them in the
Destination.
· The ARL instruction continues to execute until it removes either the:
– first set of termination characters
– specified number of characters (Serial Port Control Length)
· While the ARL instruction is executing, no other ASCII serial port
instruction executes.
Follow these guidelines to program the ARL instruction.
1. Configure the serial port of the controller.
a. Select User mode.
b. Define the characters that serve as the termination characters.
2. Use the results of an ABL instruction to trigger the ARL instruction. This
prevents the ARL instruction from holding up the ASCII queue while it
waits for the termination characters.
3. This is a transitional instruction.
· In relay ladder, toggle the rung-condition-in from cleared to set each
time the instruction should execute.
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 17
595

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents