PLC5 String Instructions
PLC5 String Instructions
Table 17.A
Available ASCII Instructions
See how many characters are in the buffer, up to and ABL 175
including the end of line character
See how many total characters are in the buffer ACB 177
Read characters from the buffer and put into a string ARD 1715
(Continued)
17-1
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Table 17.A
Available ASCII Instructions
See how many characters are in the buffer, up to and ABL 175
including the end of line character
See how many total characters are in the buffer ACB 177
Read characters from the buffer and put into a string ARD 1715
(Continued)
17-1
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Read one line of characters from the buffer and put into ARL 1718
a string
For more information on the operands (and valid data types/values of each operand)
used by the instructions discussed in this chapter, see Appendix C.
ASCII instructions are dependent upon one another. For example, if you have an
ARD (ASCII read instruction) and then an AWT (ASCII write), the done bit on the
ARD must be set before the AWT can begin executing (even if the AWT was
enabled while the processor was executing the ARD). A second ASCII instruction
cannot begin until the first has completed. However, the processor does not wait for
an ASCII instruction to complete before continuing to execute your ladder program
(non-ASCII instructions).
17-2
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Read one line of characters from the buffer and put into ARL 1718
a string
For more information on the operands (and valid data types/values of each operand)
used by the instructions discussed in this chapter, see Appendix C.
ASCII instructions are dependent upon one another. For example, if you have an
ARD (ASCII read instruction) and then an AWT (ASCII write), the done bit on the
ARD must be set before the AWT can begin executing (even if the AWT was
enabled while the processor was executing the ARD). A second ASCII instruction
cannot begin until the first has completed. However, the processor does not wait for
an ASCII instruction to complete before continuing to execute your ladder program
(non-ASCII instructions).
17-2
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
You can examine status bits in the ladder program to examine some event. The
processor changes the states of status bits as the processor executes the instruction.
You address the status bits by mnemonic (or bit number) in the control
element address.
The ASCII instructions use the length (.LEN) and position (.POS) fields in some
instructions as well as the following status bits:
17-3
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Length (.LEN)
Position (.POS)
This is the current character number which the operation has executed.
Using Strings
You can address string lengths by adding a .LEN to any string address (for example,
ST17:1.LEN).
String lengths must be between 0 and 82 bytes. In general, lengths that are outside
of this range cause the processor to set a minor fault (S:17/8) and the instruction is
not executed.
Note You configure append or end-of-line characters on the Channel Configuration
screen. The default append characters are carriage return and line feed; the default
end-of-line (termination) character is carriage return. For more information, see
your software user manual.
17-4
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ABL EN Use the ABL instruction to see how many characters are in the buffer, up to and
ASCII TEST FOR LINE
Channel DN including the end-of-line characters (termination). On a false-to-true transition, the
Control system reports the number of characters in the Position field, and sets the done bit.
Characters ER
The serial port must be in User mode.
Entering Parameters:
To use the ABL instruction, you must supply the following information:
Parameter: Definition:
Channel the number of the RS232 port. (The only valid value is 0).
Control the address of a control file element used for the control
status bits.
Characters the number of characters in the buffer (including the
endofline/termination characters) that the processor finds
(0256). This field is display only.
Example:
I:012 ABL
EN
[
[
ASCII TEST FOR LINE
10 Channel 0 DN
If input word 12, bit 10 is set, the processor Control R6:32
performs an ABL operation for channel 0.
Characters ER
When the rung goes from false to true, the control element enable bit (.EN) is set.
The instruction is put in the ASCII instruction queue, the .EU bit is set and program
scan continues. The instruction is then executed parallel to program scan.
17-5
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
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 is then set. If a zero appears in the position field, no end-of-line/termination
characters were found. The .FD bit is set if the position field was set to a
non-zero value.
When the program scans the instruction and finds the .DN bit set, the processor then
sets the .EM bit. The .EM bit acts as a secondary done bit corresponding to the
program scan.
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 processor mode change
17-6
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ACB Use the ACB instruction to see how many total characters are in the buffer. On a
EN
ASCII CHARS IN BUFFER
Channel DN
false-to-true transition, the system determines the total number of characters and
Control reports it in the Characters field. The serial port must be in User mode.
Characters ER
Entering Parameters:
To use the ACB instruction, you must provide the processor the
following information:
Parameter: Definition:
Channel the number of the RS232 port (The only valid value in this field is 0).
Control the address of a control file element used for control status bits.
Characters the number of the characters in the buffer that the processor finds
(0256). This field is display only.
Example:
I:012 ACB
[
[ EN
ASCII CHARS IN BUFFER
10 Channel 0 DN
If input word 12, bit 10 is set, the processor Control R6:32
performs an ACB operation for channel 0. Characters
ER
When the rung goes from false to true, the control element enable bit (.EN) is set.
When the instruction is put in the ASCII instruction queue, the .EU bit is set and
program scan continues. The instruction is then executed parallel to program scan.
The processor determines the number of characters in the buffer and puts this value
in the position field. The done bit is then set. If a zero appears in the position field,
no characters were found. The .FD bit is set if the position field was set to a
non-zero value.
17-7
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
When the program scans the instruction and finds the .DN bit set, the processor then
sets the .EM bit. The .EM bit acts as a secondary done bit corresponding to the
program scan.
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 processor mode change
17-8
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ACI Use the ACI instruction to convert an ASCII string to an integer value between
STRING TO INTEGER CONVERSION
Source –32,768 and 32,767.
Destination
The processor searches the source (file type ST) for the first character that is
between 0 and 9. All numeric characters are extracted until a non-numeric character
or the end of the string is reached. Commas and signs (–, +) are allowed in
the string.
If no numeric characters are found, no action is taken. Also, if the string has an
invalid length (less than zero or greater than 82), the fault bit is set (S:17/8) and the
instruction is not executed.
This instruction also sets the arithmetic flags (found in word 0, bits 0-3 in the
processor status file S):
S:0/0 Carry (C) the carry was generated while converting the string
to an integer
S:0/1 Overflow (V) the integer value was outside of the valid range
S:0/2 Zero (Z) the integer value is zero
S:0/3 Sign (S) the integer value is negative
Example:
I:012 ACI
[
[
STRING TO INTEGER
10 Source ST38:90
Destination N7:123
If input word 12, bit 10 is set, convert the string in
ST38:90 to an integer and store the result in N7:123. 75
17-9
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ACN The ACN instruction appends Source B to the end of Source A and stores the result
STRING CONCATENATE in the Destination.
Source A
Source B
Destination If the result is longer than 82 characters, only the first 82 are written to the
destination file and the error bit (S:17/8) is set. Also, if the length of either string is
invalid (less than zero or greater than 82), the fault bit is set and the string at the
destination address is not changed.
Example:
I:012 ACN
[
[
STRING CONCATENATE
10 Source A ST37:42
If input word 12, bit 10 is set, concatenate the string
Source B ST38:91
in ST37:42 with the string in ST38:91 and store the
Destination ST52:76
result in ST52:76
17-10
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
AEX
STRING EXTRACT
Use the AEX instruction to create a new string by taking a portion of an
Source existing string.
Index
Number
Destination
Entering Parameters:
To use the AEX instruction, you must provide the processor the
following information
Parameter: Definition:
Example:
I:012 AEX
[
[
STRING EXTRACT
10 Source ST38:40
If input word 12, bit 10 is set, extract 10 characters Index 42
starting at the 42nd character of ST38:40 and store Number 10
the result in ST52:75. Destination ST52:75
The following conditions cause the processor to set the fault bit (S:17/8):
• invalid string length or string length of zero
• index or number values outside of range
• index value greater than the length of the source string
The destination string will not change in any of the above instances.
17-11
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
AHL Use the AHL instruction to set or reset the RS-232 DTR and RTS handshake control
EN
ASCII HANDSHAKE LINE
Channel
lines for your modem. On a false-to-true transition, the system uses the two masks
DN
AND Mask to determine whether to set or reset the DTR and RTS lines, or leave
OR Mask
Control ER them unchanged.
Channel Status
Note Before you use this instruction make sure that you do not conflict with the automatic
control lines on your modem.
Entering Parameters:
To use the AHL instruction, you must provide the following information:
Parameter: Definition:
Channel the number of the RS232 port that you want to use. Currently, only
channel 0 can be set or reset.
AND Mask the mask to reset the DTR and RTS control lines. Bit 0 corresponds to
the DTR line and bit 1 corresponds to the RTS line. A 1 at the mask
bit causes the line to be reset; a 0 leaves the line unchanged.
OR Mask the mask to set the DTR and RTS control lines. Bit 0 corresponds to
the DTR line and bit 1 corresponds to the RTS line. A 1 at the mask
bit causes the line to be set; a 0 leaves the line unchanged.
Control the address of the result control structure in the control area of
memory for the result.
Channel Status displays the current status (0000 to FFFF) of the handshake lines for
the channel specified above. This field is display only; convert the
hexadecimal status to binary and refer to the table below:
Bit 1 0
17-12
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
The error bit (.ER) is set during the execution of the instruction if the instruction is
aborted due to processor mode change.
17-13
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
Use the AIC instruction to convert an integer value (between –32,768 and 32,767) to
an ASCII string. The source can be a constant or an integer address.
Example:
I:012 AIC
[
[
INTEGER TO STRING
10 Source 867
If input word 12, bit 10 is set, convert the value Destination ST38:42
876 to a string and store the result in ST38:42.
17-14
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ARD Use the ARD instruction to read characters from the buffer and store them in a
EN
ASCII READ
Channel string. To repeat the operation, the rung must go from false to true. The serial port
Destination DN
Control must be in User mode.
String Length ER
Characters Read
Entering Parameters:
Parameter: Definition:
Channel the number of the RS232 port. (The only valid value is 0).
Control the control file element used for the control status bits.
Destination the string element where you want the characters stored.
String Length the number of characters you want to read from the buffer. The
maximum is 82 characters. If you specify a length larger than 82,
only 82 characters will be read. (If you specify 0, the string length
defaults to 82.)
Characters Read the number of characters that the processor moved from the buffer to
the string (0 to 82). This field is display only.
Example:
I:012 ARD
ASCII READ EN
[
[
10 Channel 0
Destination ST52:76 DN
If input word 12, bit 10 is set, read 50 characters Control R6:23
from the buffer and move them to ST52:76. String Length 50 ER
Characters Read
When the rung goes from false to true, the control element enable bit (.EN) is set.
The instruction is put in the ASCII instruction queue, the .EU bit is set and program
scan continues. The instruction is then executed parallel to program scan.
17-15
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Once the requested number of characters are in the buffer, the characters are moved
to the destination string. The number of characters moved is put in the position word
of the control element and the done bit is set.
When the program scans the instruction and finds the .DN bit set, the processor then
sets the .EM bit. The .EM bit acts as a secondary done bit corresponding to the
program scan.
You can use the .UL bit to terminate an ARD instruction before it completes (for
example, you may want to terminate the instruction if you know that the ASCII
device connected to the port is not sending data, or if the connection breaks after the
instruction starts executing). Set the .UL bit in the control structure (the .ER bit is
then set).
Note When you set the .UL bit, the instruction does not terminate immediately; it may
take several seconds.
If an ARD instruction starts executing with the .UL bit already set and there are no
characters in the buffer, the instruction terminates. If an ARD instruction starts
executing with the .UL bit already set and there are characters in the buffer, the
instruction proceeds to normal completion.
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 processor mode change
• when using a modem, the modem is disconnected
17-16
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Figure 17.1
Example ARD Timing Diagram
Rung Condition ON
OFF
ON
Enable Bit (.EN) OFF
Done Bit
Error Bit ON
(.DN or. ER) OFF
ON
Synchronous Done Bit (.EM) OFF
1 2 3 4 5 1 5 2 3 4
1 rung goes true
2 instruction successfully queued
3 instruction execution complete
4 instruction scanned for the first time after execution is complete
5 rung goes false
17-17
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ARL Use the ARL instruction to read characters from the buffer up to and including the
ASCII READ LINE EN
Channel end-of-line (termination) characters and store them in a string. The end-of-line
Destination DN
Control characters are specified on the Channel Configuration screen (the default is a
String Length
ER
Characters Read carriage return). For more information on channel configuration, see your software
user manual. The serial port must be in User mode.
Entering Parameters:
To use the ARL instruction, you must provide the following information:
Parameter: Definition:
Channel the number of the RS232 port. (The only valid value is 0).
Control the address of the control file element used for the control status bits.
Destination the string element where you want the string stored.
String Length the number of characters (maximum 82) you want to read from the buffer. If
the processor finds the endofline characters before reading the number of
characters you specified, only those characters read and the endofline are
moved to the destination.
Characters Read the number of characters that the processor moved from the buffer to the
string (0 to 82). This field is display only.
Example:
I:012 ARL
[ ASCII READ LINE EN
[
10 Channel 0
Destination ST52:72 DN
If input word 12, bit 10 is set, read 18 characters Control R6:23
(or until endofline) from the buffer and move String Length 18
them to ST52:72. ER
Characters Read
When the rung goes from false to true, the control element enable bit (.EN) is set.
The instruction is put in the ASCII instruction queue, the .EU bit is set and program
scan continues. The instruction is then executed parallel to program scan.
17-18
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Once the requested number of characters (or the end-of-line characters) are in the
buffer, all characters (including the end-of-line characters) are moved to the
destination string. The number of characters moved is stored in the position word of
the control element and the done bit is set.
When the program scans the instruction and finds the .DN bit set, the processor then
sets the .EM bit. The .EM bit acts as a secondary done bit corresponding to the
program scan.
You can use the .UL bit to terminate an ARL instruction before it completes (for
example, you may want to terminate the instruction if you know that the ASCII
device connected to the port is not sending data, or if the connection breaks after the
instruction starts executing). Set the .UL bit in the control structure (the .ER bit is
then set).
Note When you set the .UL bit, the instruction does not terminate immediately; it may
take several seconds.
If an ARL instruction starts executing with the .UL bit already set and there are no
characters in the buffer, the instruction terminates. If an ARL instruction starts
executing with the .UL bit already set and there are characters in the buffer, the
instruction proceeds to normal completion.
The error bit (.ER) is set during the execution of the instruction if the channel is in
system mode (or switches to system mode), the processor switches to program/test
mode or if the modem is lost (when using modem control).
17-19
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Figure 17.2
Example ARL Timing Diagram
Rung Condition ON
OFF
Done Bit
Error Bit
ON
(.DN or. ER)
OFF
ON
Empty Bit (.EM) OFF
1 2 3 4 5 1 5 2 3 4
1 rung goes true
2 instruction successfully queued
3 instruction execution complete
4 instruction scanned for the first time after execution is complete
5 rung goes false
17-20
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
ASC
STRING SEARCH
Use the ASC instruction to search an existing string (search string) for an
Source occurrence of the source string.
Index
Search
Result
Entering Parameters:
To use the ASC instruction, you must provide the processor the
following information:
Parameter: Definition:
Example:
I:012 ASC
[ STRING SEARCH
[
10 Source ST38:40
Index 35
Search ST52:80
If input word 12, bit 10 is set, search the string in ST52:80 Result N10:0
starring at the 35th character, for the string found in
ST38:40. In this example, the result is stored in N10:0.
The following conditions cause the processor to set the fault bit (S:17/8):
• invalid string length or string length of zero
• index values outside of range
• index value greater than the length of the source string
17-21
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
Use the ASR instruction to compare two ASCII strings. The system looks for a
match in length and upper/lower case. If the two strings are identical, the rung is
true; if there are any differences, the rung is false.
Example:
ASR O:013
ASCII STRING COMPARE
Source A ST37:42 01
Source B ST38:90
If the string in ST37:42 is identical to the
string in ST38:90, set output bit O:013/01.
An invalid string length causes the processor to set the fault bit (S:17/8), and the
rung is false.
17-22
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
AWA Use the AWA instruction to write characters from the source to a display device.
ASCII WRITE APPEND EN
Channel This append instruction adds 1 or 2 characters (which you configure in the Channel
Source DN
Control Configuration). The default is a carriage return and line feed appended to the end of
String Length
Characters Sent ER the string. You can use this instruction with the serial port in User or System mode.
Entering Parameters:
To use the AWA instruction, you must provide the following information:
Parameter: Definition:
Channel the number of the RS232 port. (The only valid value is 0).
Source the string you want to write.
Control the address of the control file element used for the control status bits.
String Length the maximum number of characters you want to write from the source string
(0 to 82). If you enter 0, the entire string will be written.
Characters Sent the number of characters that the processor sent to the display area
(0 to 82). Only after the entire string is sent is this field updated (no running
total for each character sent is stored). This field is display only.
Example:
I:012 AWA
EN
[
[ ASCII WRITE APPEND
10 Channel 0
Source ST37:42 DN
Control R6:23
String Length 25 ER
If input word 12, bit 10 is set, read 25 characters from
ST37:42 and write it to the display device. Then write Characters Sent
a carriage return and line feed (default).
When the rung goes from false to true, the control element enable bit (.EN) is set.
The instruction is put in the ASCII instruction queue, the .EU bit is set and program
scan continues. The instruction is then executed parallel to program scan.
17-23
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Twenty-five characters from the start of string ST37:42 are sent to the display
device and then user-configured append characters are sent. The done bit is set and a
value of 27 is sent to the position word.
When the program scans the instruction and finds the .DN bit set, the processor then
sets the .EM bit to act as a secondary done bit corresponding to the program scan.
You can use the .UL bit to terminate an AWA instruction before it completes (for
example, you may want to terminate the instruction if you know that the ASCII
device connected to the port cannot accept data, or if the connection breaks after the
instruction starts executing). Set the .UL bit in the control structure (the .ER bit is
then set).
Note When you set the .UL bit, the instruction does not terminate immediately; it may
take several seconds.
If an AWA instruction starts executing with the .UL bit already set, the instruction
aborts immediately.
The error bit (.ER) is set during the execution of the instruction if the instruction is
aborted due to processor mode change or if the modem becomes lost (when using
modem control). If the modem was already lost, the instruction still executes.
17-24
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Figure 17.3
Example AWA Timing Diagram
Rung Condition ON
OFF
ON
Enable Bit (.EN)
OFF
ON
Queue Bit (.EU)
OFF
Done Bit
ON
Error Bit
OFF
(.DN or. ER)
ON
Empty Bit (.EM)
OFF
1 2 3 4 5 1 5 2 3 4
17-25
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
Description:
AWT
ASCII WRITE
Use the AWT instruction to write characters from the source to a display device. To
EN
Channel repeat the instruction, the rung must go from false to true. You can use this
Source
DN
Control instruction with the port in System or User mode.
String Length
Characters Sent ER
Entering Parameters:
To use the AWT instruction, you must provide the following information:
Parameters: Definition:
Channel the number of the RS232 port. (The only valid value is 0).
Source the string you want to write.
Control the address of the control file element used for the control status file.
String Length the maximum number of characters you want to write from the source string
(0 to 82). If you enter 0, the entire string will be written.
Characters Sent the number of characters that the processor sent to the display area
(0 to 82). Only after the entire string is sent is this field updated (no running
total for each character sent is stored). This field is display only.
Example:
I:012 AWT
[
[ ASCII WRITE EN
10 Channel 0
Source ST37:20 DN
Control R6:23
If input word 12, bit 10 is set, write 40 characters String Length 40
ER
from ST37:20 and write it to the display device. Characters Sent
When the rung goes from false to true, the control element enable bit (.EN) is set.
The instruction is put in the ASCII instruction queue, the .EU bit is set and program
scan continues. The instruction is then executed parallel to program scan.
Forty characters from string ST37:20 are sent through channel 0. The done bit is set
and a value of 40 is sent to the position word.
17-26
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
AHL, ARD, ARL, ASC, ASR, AWA, AWT
When the program scans the instruction and finds the .DN bit set, the processor then
sets the .EM bit. The .EM bit acts as a secondary done bit corresponding to the
program scan.
You can use the .UL bit to terminate an AWT instruction before it completes (for
example, you may want to terminate the instruction if you know that the ASCII
device connected to the port cannot accept data, or if the connection breaks after the
instruction starts executing). Set the .UL bit in the control structure (the .ER bit is
then set).
Note When you set the .UL bit, the instruction does not terminate immediately; it may
take several seconds.
If an AWT instruction starts executing with the .UL bit already set, the instruction
aborts immediately.
The error bit (.ER) is set during the execution of the instruction if the processor
switches to program or test mode or if the modem becomes lost (when using modem
control). If the modem was already lost, the instruction still executes.
Figure 17.4
Example AWT Timing Diagram
ON
Rung Condition
OFF
ON
Enable Bit (.EN) OFF
ON
Queue Bit (.EU) OFF
Done Bit
ON
Error Bit
OFF
(.DN or. ER)
ON
Empty Bit (.EM)
OFF
1 2 3 4 5 1 5 2 3 4
1 rung goes true
2 instruction successfully queued
3 instruction execution complete
4 instruction scanned for the first time after execution is complete
5 rung goes false
17-27
ASCII Instructions ABL, ACB, ACI, ACN, AEX, AIC,
Preface
AHL, ARD, ARL, ASC, ASR, AWA, AWT
17-28