AH Motion Controller – Standard Instructions Manual _3 Graphic expression: S 1 : String which is searched S 2 : String which is searched for n : n th character in S 2 from which the search begins D : Search result Explanation: 1. The instruction is used to search the string from the n th character in S 2 for the string which is the same as the string in S 1 , and the search result is stored in D . 2. Suppose the string in S 2 is “ABCDEFGHIJK”, the string in S 1 is “EFGH”, and n is 3. The search begins from the third character in S 2 , and the value in D is 5.
b15 b0 b7 b8 S1 b15 b0 b7 b8 Searching the string from the third character +1 S1 +2 S1 Matching character After the instruction is executed 5 D 3-540 FB/FC Instruction Operand Description FC $SER P S , S , n, D 1 2 Searching the string BOOL WORD DWORD LWORD UINT UDINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S 1 S 2 n D Device X Y M S T C HC/AC D L SM SR E PR K 16# “$” D F S 1 S 2 n D Pulse instruction 16-bit instruction 32-bit instruction AH Motion CPU AH Motion CPU - 16#46(F) 16#45(E) 16#48(H) 16#47(G) 忽略 16#00 16#42(B) 16#41(A) S2 S2 +1 16#44(D) 16#43(C) S2 +2 16#46(F) 16#45(E) 16#48(H) 16#47(G) S2 +3 S2 +4 S2 +5 16#4A(J) 16#49(I) 16#00 16#4B(K)