Rockwell Automation 1785-Lxxx Enhanced and Ethernet PLC-5 Programmable Controllers User Manual
Page 329

Publication 1785-UM012D-EN-P - July 2005
Instruction Set Quick Reference D-29
ASCII String Search
ASC
If input conditions are true, search ST52:80 starting at the
35th character, for the string found in ST38:40. In this
example, the string was found at index 42. If the string is
not found, the ASCII instruction minor fault bit S:17/8 is set
and the result is zero.
ASCII String Compare
ASR
If the string in ST37:42 is identical to the string in ST38:90,
the instruction is true. Note that this is an input instruction.
An invalid string length causes the ASCII instruction error
minor fault bit S:17/8 to be set, and the instruction is false.
ASCII Write Append
AWA
Status Bits
EN - Enable
DN - Done Bit
ER - Error Bit
UL - Unload
EM - Empty
EU - Queue
If input conditions go from false-to-true, read 50 characters
from ST52:76 and write it to channel 0 and append the two
character configuration in the channel configuration
(default CR/LF). The number of characters sent is stored in
R6:32.POS and displayed in the characters sent field of the
instruction display.
See page F-8 for a description of prescan operation for this
instruction.
ASCII Write
AWT
Status Bits
EN - Enable
DN - Done Bit
ER - Error Bit
UL - Unload
EM - Empty
EU - Queue
If input conditions go from false-to-true, write 40 characters
from ST37:40 to channel 0. The number of characters sent
is stored in R6:23.POS and displayed in the characters sent
field of the instruction display.
See page F-8 for a description of prescan operation for this
instruction.
Instruction
Description
ASC
STRING SEARCH
Source
Search
ST38:40
35
42
Index
Result
ST52:80
ASR
ASCII STRING COMPARE
Source A
ST37:42
ST38:90
Source B
AWA
ASCII WRITE APPEND
Channel
Control
0
R6:32
ST52:76
50
Source
String Length
Characters Sent
AWT
ASCII WRITE
Channel
Control
R6:23
ST37:40
40
Source
String Length
Characters Sent
0