Delta DVP-ES3 — 6.21.2 Explanation of String Processing Instructions

Chapter 6 Applied Instructions Symbol S 1 : String to be searched and matching characters replaced S 2 : New string 6_ S 4 : The string S 2 replaces the characters in S 1 starting from the S 3 : Number of characters in S 1 to be replaced character indicated by the value in S 4 . D : Device where the result is stored Explanation 1. This instruction replaces the characters in S 1 with the characters in S 2 , starting from the character in S 1 that matches the character in S 4 . The number of characters that are replaced is indicated by the value in S 3 , and the instruction stores the result in D . 2.

For example, the instruction replaces the four characters starting from the sixth character in the string “12345 6789 0” with “MN”, and the result is “12345 MN 0”. 6-669 API Instruction code Operand Function 2116 $RPLC P S1, S2, S3, S4, D Replacing the characters in a string Device X Y M S T C HC D FR SM SR E K 16# “$” F S1      S2      S3         S4         D    BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S1     S2     S3    S4    D    Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 -