Delta Electronics AH — 3.3 Comparison Instructions

AH Motion Controller – Standard Instructions Manual Graphic expression: _3 S 1 : Data source 1 Taking OR$= for example S 2 : Data source 2 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 OR$= 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.

b15 b8 b7 b0 b15 b8 b7 b0 S1 16#42(B) 16#41(A) Comparison sign S2 16#42(B) 16#41(A) S1 +1 +2 16#44(D) 16#45(E) 16#00 16#43(C) S2 +1 +2 16#44(D) 16#45(E) 16#00 16#43(C) S1 " " ABCDE S2 " " ABCDE 3-52 FB/FC Instruction Operand Description FC OR$※ S , S 1 2 Comparing the strings BOOL WORD DWORD LWORD UINT UDINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S , S 1 2  Device X Y M S T C HC/AC D L SM SR E PR K 16# “$” D F S , S 1 2           Pulse instruction 16-bit instruction 32-bit instruction - AH Motion CPU - Comparison symbol Comparison operation result $= ON $<> OFF $> OFF $>= ON $< OFF $<= ON