Chapter 6 Applied Instructions 
6-16 
API 
Instruction code
Operand 
Function 
0036~ 
0041 
 
LD$※ 
 
S
1
, S
2
 
Comparing the strings 
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#  “$”  DF 
Pulse instruction
16-bit instruction (5-17 steps)  32-bit instruction 
Symbol: 
 
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 LD$= 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. 
number 
Instruction 
Comparison operation result 
0036 
LD$=  S
1
=S
2
 
S
1
≠S
2
 
0037 
LD$<> 
S
1
≠S
2
 
S
1
=S
2
 
0038 
LD$>  S
1
>S
2
  S
1
≦S
2
 
0039 
LD$>=  S
1
≧S
2
  S
1
<S
2
 
0040 
LD$<  S
1
<S
2
  S
1
≧S
2
 
0041 
LD$<=  S
1
≦S
2
  S
1
>S
2
 
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. 
16#31(1)
16#33(3)
16#32(2)
16#34(4)
16#35(5)
16#00
S
S+1
S+2
b15 b8
b7
b0
""12345
 
3.  When two strings are 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