AWT [ASCII Write]
Rockwell Software
Use the AWT instruction to write characters from a source string to an external device. To repeat the instruction, the rung must go from false-to-true. When using this instruction you can also perform in-line indirection.
Entering Parameters
Channel is the number of the RS-232 port. This must be 0 unless you are using a MicroLogix 1500 LRP Series B, in which case it may be 0 or 1.
Source is the string element you want to write.
Control is the area that stores the control register (required to operate the instruction).
String Length (.LEN) is the number of characters you want to write from the source string (0-82). If you enter a 0, the entire string will be written. This is Word 1 in the control block.
Characters Sent (.POS) are the number of characters that the processor sent to the display area (0-82). This field is continuously updated during the execution of the instruction. This value can be greater than the string length if appended characters or inserted values from in-line indirection are used. If the string length is greater than 82 the string written to the destination will be truncated to 82 characters. This is Word 2 in the control block.
Error is the hexadecimal error code that indicates why the ER bit was set in the control data file. Refer to ASCII Error Codes for an explanation of any displayed error code.
SLC Operation
1 The AWT rung goes from false-to-true, setting the EN (Enable) bit.
2 The instruction is put in the ASCII queue, setting the EU (Queue) bit.
3 The instruction executes and the RN (Run) bit is set.
4 Forty characters are sent from the source string through channel 0.
5 The DN (Done) bit is set and a value of 40 is present in .POS word of the ASCII control block.
6 When the program scan finds the DN bit set, the processor sets the EM (Synchronous Done) bit.