Delta Electronics — 6.12.2 Explanation of Shift Instructions

Chapter 6 Applied Instructions Symbol S : First device D : Device where the data is stored n : Device where the data is deleted Explanation 6_ 1. For this instruction, the length of the data is the value in the device specified by S , and the data itself is in the devices specified by S +1– S +(the value in S ). This instruction stores the data in the device specified by S + n in D and deletes it, shifts the data in the devices specified by S + n + 1 – S +(The value in S ) to the right, clears the data in the device specified by S +(the value in S ) to 0, and decrements the value in the device specified by S by one.

When the value in the device specified by S is equal to 0, the instruction stops deleting the data, and sets the zero flag SM600 is ON. 2. In general, the SFDELP pulse instruction is used. 3. The operand n must be between 1–32767. Example Suppose the value in D0 is 9, and n is 4. When X0.0 is ON, the instruction stores the data in D4 in D20. After the instruction deletes the data in D4, it shifts the data in D5–D9 to the right, and decrements the value in D0 by one.

6-317 API Instruction code Operand Function 1107 SFDEL P S, D, n Deleting data from a data list Device X Y M S T C HC D FR SM SR E K 16# “$” F S     D       n           BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S    D    n    Pulse instruction 16-bit instruction 32-bit instruction AS AS -