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 left. The instructions fill the vacancies (b 0 –b n -1 ) resulting from the shift with 0 and transmit the value of b 16-n (for 16-bit instruction) or b 32-n (for 32-bit instruction) to _6 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 b10 to SM602. The instruction fills the values of b0 – b5 with zeros after the shift. The shift of the values of the bits to the left during a scan shown below. b15-b10 → Being carried (The value of b10 is transmitted to SM602.
b9-b0 → b15-b6 0 → b5-b0 6-332 API Instruction code Operand Function 1111 D SFL P D, n Shifting the values of the bits in registers by n bits to the left 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