Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 603
ASCII Serial Port Instructions (ABL, ACB, ACL, AHL, ARD, ARL, AWA, AWT) Chapter 17
Structured Text
The operands are the same as those for the relay ladder AWT instruction.
However, you specify the Serial Port Control Length and the Characters Sent
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 AWT instruction sends the specified number of characters (Serial Port
Control Length) of the Source tag to the device that is connected to the serial
port of the controller.
Follow these guidelines to program the AWT instruction.
1. Configure the serial port of the controller.
2. This is a transitional instruction.
· In relay ladder, toggle the rung-condition-in from cleared to set each
time the instruction should execute.
· In structured text, condition the instruction so that it executes only on a
transition.
AWT(Channel,Source,
SerialPortControl);
Mnemonic Data Type Description
.EN BOOL The enable bit indicates that the instruction is enabled.
.EU BOOL The queue bit indicates that the instruction entered the ASCII queue.
.DN BOOL The done bit indicates when the instruction is done, but it is asynchronous to the logic scan.
.RN BOOL The run bit indicates that the instruction is executing.
.EM BOOL The empty bit indicates that the instruction is done, but it is synchronous to the logic scan.
.ER BOOL The error bit indicates when the instruction fails (errors).
.FD BOOL The found bit does not apply to this instruction.
.LEN DINT The length indicates the number of characters to send.
.POS DINT The position displays the number of characters that were sent.
.ERROR DINT The error contains a hexadecimal value that identifies the cause of an error.
If your application Then
Uses ARD or ARL instructions Select User mode
Does not use ARD or ARL instructions Select either System or User mode