EasyManua.ls Logo

Delta AH500 - Page 224

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AH500 Programming Manual
6-19
API
Instruction code
Operand
Function
0042~
0047
AND$
S
1
, S
2
Comparing the strings
Device
X Y M S T C HC D L SM SR E PR K 16# “$” DF
S
1
S
2
Pulse instruction
16-bit instruction (5-17 steps)
32-bit instruction
-
AH500
-
Symbol:
Taking AND$= for example
S
1
Data source 1 String
S
2
Data source 2 String
Explanation:
1. The instructions are used to compare the data in S
1
with that in S
2
, and the data compared is
strings. Take the instruction AND$= for example. When the comparison result is that the data
in S
1
is equal to that in S
2
, the condition of the contact is met. When the comparison result is
that the data in S
1
is not equal to that in S
2
, the condition of the contact is not met.
2. Only when the data in S~S+n (n indicates the n
th
device) includes 16#00 can the data be
judged as a complete string.
3. When the strings are completely the same, the corresponding comparison operation results
of the instructions are listed below.
16#41(A)
16#43(C)
16#42
(B)
16#44(D)
16#45(E)
16#00
S1
S1
S1
+1
+2
b15 b8
b7
b0
""ABCDE
16#41(A)
16#43(C)
16#42(B)
16#44(D)
16#45(E)
16#00
S2
S2
S2
+1
+2
b15 b8
b7
b0
""ABCDE
Comparison sign
Comparison symbol
Comparison operation result
$
ON
$<>
OFF
$
OFF
$>=
ON
$
OFF
$<=
ON
4. When the lengths of the strings are the same, but their contents are different, the first
different values (ASCII codes) met in the strings are compared. For example, the string in S
1
is “ABCDF”, and the string in S
1
is ABCDE”. The first different values met in the strings are
“F” (16#46) and “E” (16#45). Owing to the fact that 16#46 is greater than 16#45, the string in
S
1
is greater than that in S
1
. The corresponding comparison operation results of the
instructions are listed below.

Table of Contents

Other manuals for Delta AH500

Related product manuals