Installation manual

Publication 1747-RM001G-EN-P - November 2008
10-6 ASCII Instructions
Test ASCII Buffer for Line
(ABL)
Use the ABL instruction to determine the total number of characters in the
input buffer, up to and including the end-of-line characters (termination). This
instruction looks for two termination characters that you configure via the
ASCII port configuration screen. On a false-to-true transition, the processor
reports the number of characters in the POS field of the ASCII control block.
The serial port must be configured for User mode.
Entering Parameters
Enter the following parameters when programming this instruction.
Channel is the number of the RS-232 port (Channel 0).
Control is the area that stores the control register required to operate
the instruction.
Characters are the number of characters in the buffer that the
processor finds (0-1024). This parameter is display only and resides in
word 2 of the control block.
Error displays the hexadecimal error code that indicates why the ER bit
was set in the control data file (R6). See page 10-24 error code
descriptions.
Example
When the rung goes from false-to-true, the Enable bit (EN) is set. The
instruction is put in the ASCII instruction queue, the Queue bit (EU) is set,
and program scan continues. The instruction is then executed outside of the
program scan. However, if the queue is empty the instruction executes
immediately. Upon execution, the Running bit (IN) is set.
The processor determines the number of characters (up to and including the
end-of-line/termination characters) and puts this value in the position field.
The Done bit (DN) is then set.
If a zero appears in the POS field, no end-of-line/termination characters were
found. The Found bit (FD) is set if the position field was set to a non-zero
value.
When the program scans the instruction and finds the Done bit (DN) set, the
processor then sets the Synchronous Done bit (EM). The EM bit acts as a
secondary done bit corresponding to the program scan.
EN
DN
ER
ABL
Ascii Test For Line
Channel 0
Control R16:0
Characters 0
Error 0
ABL
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••