Ascii Write With Append (Awa); Entering Parameters - Allen-Bradley SLC 500 Series Reference Manual

Hide thumbs Also See for SLC 500 Series:
Table of Contents
10-20
ASCII Instructions
ASCII Write with Append
(AWA)
AWA
AWA
ASCII Write Append
Channel
0
Source
ST10:11
Control
R6:7
String Length
3<
Characters Sent
0
Error
0
Fixed SLC
SLC
SLC
5/01
5/02
5/03
Output Instruction
Publication 1747-RM001G-EN-P - November 2008
Use the AWA instruction to write characters from a source string to an
external device. This instruction adds the one or two appended characters that
you configure on the ASCII Configuration screen. The default is a carriage
return and line feed appended to the end of the string. When using this
instruction you can also perform in-line indirection. See page 10-21 for more
information.

Entering Parameters

EN
Enter the following parameters when programming this instruction.
DN
ER
• Channel is the number of the RS-232 port (Channel 0).
• Source is the string element you want to write.
• Control is the area that stores the control register required to operate
SLC
SLC
5/04
5/05
the instruction.
• String Length (.LEN) is the number of characters you want to write
from the source string (0 to 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 to 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 is truncated to 82 characters. This is
word 2 in 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 for error code
descriptions.
Example
When the rung goes from false-to-true, the control element Enable (EN) bit 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 DN bit
is set on completion of the instruction.
The system sends 25 characters from the start of string ST37:42 to the display
device and then sends user-configured append characters. The Done bit (DN)
is set and a value of 27 is present in .POS word of the ASCII control block.
Table of Contents
loading

Table of Contents