Delta DVP-ES3 — 6.12.2 Explanation of Shift Instructions

DVP-ES3 Series Programming Manual Symbol D : Device for the shift n : Number of bits Explanation 1. This instructions shift the values of the bits in D by n bits to the right. The 16-bit instruction fills the vacancies (b 15 –b 15- n +1 ) resulting from the shift with 0 and the 32-bit instruction fills the vacancies (b 31 –b 31- n +1 ) resulting from the _6 shift with 0. The value of b n -1 is transmitted to SM602. 2. The operand n must be between 1–16 for 16-bit instructions and the operand n must be between 1–32 for 32-bit instructions. 3. In general, the SFRP/DSFRP pulse instruction is used more commonly. 4.

Only the DSFR/DSFRP instruction (32-bit instructions) can use the 32-bit counter (high counter) but not the device E. Example When M0 is ON, the instruction shifts the values of b0–b15 in D0 by 6 bits to the right, and transmits the value of b5 to SM602. The instruction clears the values of b10–b15 to zero after the shift. The shift of the values of the bits to the right during a scan is shown below.

 b5-b0 → Being carried (The value of b5 is transmitted to SM602.)  b15-b6 → b9-b0  0 → b15-b10 6-330 API Instruction code Operand Function 1110 D SFR P D, n Shifting the values of the bits in registers by n bits to the right Device X Y M S T C HC D FR SM SR E K 16# “$” F D       n         BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D    n    Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ES3