Chapter 6 0BApplied Instructions S1 b15 b8 b7 b0 S2 b15 b8 b7 b0 S1 +1 Comparison sign S2 +1 S1 +2 S2 +2 " " ABCDF " " ABCDE 5. When the lengths of the strings are different, the string whose length is longer is greater than the string whose length is shorter. For example, the string in S 1 is “1234567”, and the string in S 2 is “99999””. Owing to the fact that the string in S 1 is composed of 7 characters, and the string in S 2 is composed of 5 characters, the string in S 1 is greater than the string in S 2 . The corresponding comparison operation results of the instructions are listed below.
S1 b15 b8 b7 b0 Comparison sign S2 b15 b8 b7 b0 S1 +1 S2 +1 S1 +3 S1 +2 S2 +2 " " 99999 " " 1234567 Example: When M0 is ON, or when the string starting with the data in D0 is equal to the string staring with D2, Y0.0 is ON. 6-22 16#42(B) 16#41(A) 16#44(D) 16#00 16#43(C) 16#46(F) 16#42(B) 16#41(A) 16#44(D) 16#00 16#43(C) 16#45(E) Comparison symbol Comparison operation result $= OFF $<> ON $> ON $>= ON $< OFF $<= OFF 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#00 16#37(7) 16#39(9) 16#39(9) 16#39(9) 16#39(9) 16#00 16#39(9) Comparison symbol Comparison operation result $= OFF $<> ON $> ON $>= ON $< OFF $<= OFF