588 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Chapter 17 ASCII Serial Port Instructions (ABL, ACB, ACL, AHL, ARD, ARL, AWA, AWT)
3. 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.
Arithmetic Status Flags: Not affected
Fault Conditions:
Execution:
Example:
When get_control_line_status becomes set, obtain the status of the control lines
of the serial port and store the status in the Channel Status operand. To view the
status of a specific control line, monitor the SerialPortControl tag and expand the
POS member.
Relay Ladder
Type Code Cause Recovery Method
4 57 The AHL instruction failed to execute because the serial port
is set to no handshaking.
Either:
·Change the Control Line setting of the serial port.
·Delete the AHL instruction.
Condition Relay Ladder Action Structured Text Action
Prescan The rung-condition-out is set to false. No action taken.
Rung-condition-in is false The rung-condition-out is set to false. N/A
Rung-condition-in is true The instruction executes when rung-condition-in toggles
from cleared to set.
The rung-condition-out is set to true.
N/A
EnableIn is set N/A EnableIn is always set.
The instruction executes.
Instruction execution The instruction obtains the control line status and turns on or off DTR and RTS signals.
The .EN bit is set.
The remaining status bits, except .UL, are cleared.
The instruction attempts to enter the ASCII queue.
Postscan The rung-condition-out is set to false. No action taken.
get_control_line_status
EN
DN
ER
ASCII Handshake Lines
Channel 0
AND Mask
0
OR Mask 0
SerialPort Control serial_port
Channel Status(Decimal) 29
AHL