Installation manual
Publication 1747-RM001G-EN-P - November 2008
ASCII Instructions 10-7
The Error bit (ER) is set during the execution of the instruction if:
• the instruction is aborted - serial port not in User mode.
• the instruction is aborted due to channel mode change.
• the Unload bit (UL) is set and the instruction is not executed.
Number of ASCII
Characters In Buffer (ACB)
Use the ACB instruction to determine the total characters in the buffer. On a
false-to-true transition, the processor determines the total number of
characters and records it in the position field of the ASCII control block. The
serial port must be in 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.
• Error displays the hexadecimal error code that indicates why the ER bit
was set in the control data file (R6). See page 10-24 for error
descriptions.
Example
When the rung goes from false-to-true, the Enable bit (EN) is set. When the
instruction is placed in the ASCII queue, the Queue bit (EU) is set. The
Running bit (IN) is set when the instruction is executing. The Done bit (DN)
is set upon completion of the instruction.
The processor determines the number of characters in the buffer and puts this
value in the position field of the control block. The Done bit (DN) is then set.
If a zero appears in the characters field, no characters were found.
When the program scans the instruction and finds the Done bit (DN) set, the
processor then sets the Synchronous bit (EM). The EM bit acts as a secondary
done bit corresponding to the program scan.
EN
DN
ER
ACB
Ascii Chars In Buffer
Channel 0
Control R16:1
Characters 0
Error 0
ACB
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••