Asr - Ascii String Compare - Allen-Bradley MicroLogix 1100 Instruction Set Reference Manual

Hide thumbs Also See for MicroLogix 1100:
Table of Contents

Advertisement

efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive
334
ASCII Instructions
ASR - ASCII String
Compare
ASR
ASR
ASCII String Compare
Source A
ST10:8
Source B
ST10:9
Publication 1763-RM001C-EN-P - October 2009
Example
I:1
10
If input slot 1, bit 10 is set, search the string
in ST52:80 starting at the 36th character, for
the string found in ST38:40. In this example,
the position result is stored in N10:0.
Error Conditions
The following conditions cause the controller to set the ASCII Error bit
(S:5/15).
• Source string length is less than 1 or greater than 82.
• Index value is less than 1 or greater than 82.
• Index value is greater than Source string length.
The destination is not changed in any of the above conditions. When the
ASCII String Manipulation Error bit (S:5/15) is set, the Invalid String Length
Error (1F39H) is written to the Major Error Fault Code word (S:6).
Instruction Type: input
Execution Time for the ASR Instruction
Controller
MicroLogix 1100
Use the ASR instruction to compare two ASCII strings. The controller
looks for a match in length and upper/lower case characters. If two
strings are identical, the rung is true; if there are any differences, the rung
is false.
Entering Parameters
Enter the following parameters when programming this instruction:
• Source A is the location of the first string used for comparison.
• Source B is the location of the second string used for comparison.
ASC
ASC
String Search
Source
ST38:40
Index
String Search
ST52:80
Result
N10:0
When Instruction Is:
True
27.27 μs + 0.65 μs/matching
character
35
False
0.9 μs

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

1763-l16bbb1763-l16awa1763-l16bwa1763-l16dwd

Table of Contents