Delta DVP-ES3 — 6.12.2 Explanation of Shift Instructions

Chapter 6 Applied Instructions 6.12.2 Explanation of Shift Instructions Symbol S : First device where the value is shifted from D : First device where the value is shifted to 6_ n 1 : Length of the data to be shifted n 2 : Number of bits in a group Explanation 1. This instruction divides the states of the n 1 bit devices starting from D into groups ( n 2 bits in a group), and shifts these groups to the right. This instruction then shifts the states of the n 2 bit devices starting from S to the devices starting from D to fill the vacancy. 2. In general, the SFTRP pulse instruction is used. 3. The operand n 1 must be between 1–1024. The operand n 2 must be between 1– n 1 . Example 1 1.

When M500 switches from OFF to ON, the instruction divides the states of the sixteen bit devices starting from M0 to M15 into groups (four bits in a group), and shifts these groups to the right. 2. The shift of the states of the bit devices to the right during a scan is shown below. 6-305 API Instruction code Operand Function 1100 SFTR P S, D, n1, n2 Shifting the states of devices to the right Device X Y M S T C HC D FR SM SR E K 16# “$” F S      D     n1       n2       BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S  D  n1    n2    Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 -