Installation manual

Publication 1747-RM001G-EN-P - November 2008
ASCII Instructions 10-19
Example
The following conditions cause the processor to set the ASCII Error bit
(S:5/15).
Invalid string length or string length of zero
Index value outside of range
Index value greater than the length of the source string
The destination is not changed in any of the above conditions.
ASCII String Compare (ASR)
Use the ASR instruction to compare two ASCII strings. The system 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 string one for comparison.
Source B is string two for comparison.
Example
An invalid string length causes the processor to set ASCII Error bit S:5/15,
and the rung goes false.
ASR
ASCII String Compare
Source A ST10:8
Source B ST10:9
ASR
Input Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••