Shift Left (DWORD)
Instruction Parameters
Supported PLC Series
| XPnA/1R | XPnB | XPnE | XPnF | CP3A/B/P/U CP4A~D/U | CPnE | CPnF | BP | PLC-S |
|---|---|---|---|---|---|---|---|---|
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Supported Data Registers
| M | X | Y | K | L | F | T | C | S | Z | R | Q | D | @D | Constant | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| D | ✓ | - | ✓ | ✓ | ✓ | - | ✓ | ✓ | - | ✓ | ✓ | ✓ | ✓ | ✓ | - |
| n | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | - | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Supported Flags
| Flag | Bit | Support |
|---|---|---|
| Error | F11.0 | ✓ |
| Zero | F11.1 | - |
| Carry | F11.2 | ✓ |
Number of Steps
| Steps |
|---|
| 3 |
Operands
| Operand | Description |
|---|---|
| D | The first operand. Entries are only DWORD data registers. This is the value to shift to the left. The result of the shift will be saved here. The signed value range is -2,147,483,648 ~ 2,147,483,647 (232). The unsigned value range is 0 ~ 4,294,967,295 (232-1). The Hexadecimal value range is H00000000 ~ HFFFFFFFF. |
| n | The second operand. Entries are WORD data registers or constants. This is the number of words to shift. The value range is 1 ~ the last data register of D. |
Notice
Error Flag (F11.0) Notice
The error flag, F11.0, will be ON for one scan when the address of the data register assigned by @D exceeds the range of the data register, D. The range of the data register, D, is dependent on the CPU type.
F11.0 turns ON when the value of the data for a shift exceeds the data register assigned to D.
F11.0 turns ON when the value of n is greater than the amount of data registers D.
Carry Flag (F11.2) Notice
The carry flag, F11.2, will be ON for one scan when the operation result overflows.
Instruction Behavior
The DSFL and DSFLP instructions behave as follows:

- The value in the data register D is shifted to the left.
- The value is shifted in the direction of the most significant bit.
- The value of n CANNOT exceed the size of the data register, D.
- Starting from the most significant bit, data is shifted 1 WORD in the direction of the most significant data register.
- The data register, D + (n -1), is equal to 0.
- This occurs when the instruction is energized.
- Data from D is lost after the instruction executes.
T and C Registers
With the T and C data registers, only the value of TC and CC can be shifted.
Execution Condition
It is recommended that the DSFL instructions be used with a pulse contact as an execution condition, or use the DSFLP instruction.