Publication 1766-RM001A-EN-P - October 2008
ASCII Instructions
371
–
Characters Sent (.POS) may be smaller than String Length (.LEN)
if the length of the string sent is less than what was specified in
the String Length (.LEN) field.
–
Characters Sent (.POS) can be greater than the String Length
(.LEN) if the appended characters or inserted values from in-line
indirection are used. If the String Length (.LEN) is greater than 82,
the string written to the destination is truncated to 82 characters
plus the number of append characters (this number could be 82,
83, or 84 depending on how many append characters are used).
•
Error
displays the hexadecimal error code that indicates why the
ER bit was set in the control data file. See page 390 for error code
descriptions.
Addressing Modes and File Types can be used as shown below:
Example
In this 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 (RN) is set when the
instruction is executing
.
The DN bit is set on completion of the
instruction.
The controller 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 data file.
AWA Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 92.
Parameter
Data Files
(1)
Function Files
CS
- Comms
IO
S -
I/
O
DL
S
-
D
a
ta
L
o
g
Address
Mode
Address Level
O
I
S
B
T,
C
, R
N
F
ST
L
MG,
PD
RI
/RIX
PL
S
RTC
HS
C
PTO
X
, PWMX
STI
EII
BH
I
MMI
LC
D
Imme
diate
Di
re
c
t
Indir
e
c
t
Bi
t
Wo
rd
Lo
ng
W
o
rd
Elemen
t
Channel
•
•
Source
•
•
•
Control •
•
•
(1) The Control data file is the only valid file type for the Control Element.
AWA
ASCII WRITE APPEND
Channel
Source
I:1
10
[
[
Control
0
ST37:42
R6:23
String Length
Characters Sent
25
0
EN
DN
ER
Error
00
If input slot 1, bit 10 is set, read 25 characters from
ST37:42 and write it to the display device. Then
write a carriage return and line feed (default).
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive