Delta DVP-ES3 — 6.21.2 Explanation of String Processing Instructions

DVP-ES3 Series Programming Manual Symbol S : String D : Length of the string Explanation 1. This instruction calculates the length of the string in S , exclusive of the ending character (16#00), and stores the length of the string in D . _6 2. The value stored in D must be between 0–32767. If it exceeds this range, the value in D is processed as 32767. b15 b0 b 7 b8 S S+1 b15 b0 D S+2 n Length of the string S+ n If the data in S - S +4 is ABCDEFGHI, the calculation result is as follows.

b15 b0 b7 b8 S S+1 b15 b0 D ABCDEFGHI 9 S+2 S+3 S+4 6-648 API Instruction code Operand Function 2106 $LEN P S, D Calculating the length of a string Device X Y M S T C HC D FR SM SR E K 16# “$” F S    D      BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S     D    Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 - Second char acter Fi rst character Fourth character Thir d char acter Sixth character Fifth character 1 6#00 (En d ing c ha ract er) n thcharacter 16#42(B) 16#41(A) 16#44(D) 16#43(C) 16#46(F) 16#45(E) 16#48(H) 16#47(G) 16#00 (Ending character) 16#49(I)