Publication 1762-RM001C-EN-P
ASCII Instructions 20-15
Instruction Operation
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 Run bit (RN) is set.
The controller determines the number of characters (up to and including
the termination characters) and puts this value in the POS field of the
control data file. The Done bit (DN) is then set. If a zero appears in the
POS field, no termination characters were found. The Found bit (FD) is
set if the POS field is set to a non-zero value.
ACB - Number of
Characters in Buffer
Instruction Type: output
Use the ACB instruction to determine the number of characters in the
buffer. On a false-to-true transition, the controller determines the total
number of characters and records it in the POS field of the control data
file. The channel configuration must be set to ASCII.
Entering Parameters
Enter the following parameters when programming this instruction:
•
Channel is the number of the RS-232 port, Channel 0. (For the
1764-LRP only, you can select either Channel 0 or Channel 1).
•
Control is the control data file. See page 20-6.
•
Characters are the number of characters in the buffer that the
controller finds (0 to 1024). This parameter is read-only.
•
Error displays the hexadecimal error code that indicates why the ER
bit was set in the control data file. See page 20-30 for error
descriptions.
EN
DN
ER
ACB
Ascii Chars In Buffer
Channel 0
Control R6:1
Characters 2<
Error 0<
ACB
Table 20.13 Execution Time for the ACB Instruction
Controller When Instruction Is:
True False
MicroLogix 1200 Series B, FRN 3 or later 103.1 12.1
MicroLogix 1500 Series B, FRN 4 or later 84.2
µ
s11.0
µ
s