The leader in industrial automation and control solutions

Instruction Parameters

Supported PLC Series

PLC-AESPLC-FBPLC-ES

Supported Data Registers

MXYKLFTCSZRQD@DConstant
D
n

Supported Flags

FlagBitSupport
ErrorF11.0
ZeroF11.1
CarryF11.2

Number of Steps

Steps
3

Operands

OperandDescription
DThe 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.
nThe 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:

  • IMG images/01-dsfl-notice.webp – The value in the data register D is shifted to the left. Notice
  • 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.

Ladder Diagram Examples

DSFL

The DSFL instruction shifts n number of WORD data registers, D ~ Dn, one WORD to the left. The result is saved in the same assigned data register, D.

The DSFL instruction shifts n number of WORD data registers, D ~ Dn, one WORD to the left. The result is saved in the same assigned data register, D.

The initial value of the WORD data register, D30, is 3,232.

The initial value of the WORD data register, D30, is 3,232.

When the contact, M2.5, is powered ON (1), the instruction shifts 3 WORD registers, starting at D30, to the left.

When the contact, M2.5, is powered ON (1), the instruction shifts 3 WORD registers, starting at D30, to the left.

The value of the WORD data register, D30, changes from 3,232 to 0.

The value of the WORD data register, D30, changes from 3,232 to 0.

The instruction shifts 3 WORD registers, starting at D30, to the left again.

The instruction shifts 3 WORD registers, starting at D30, to the left again.

The value of the WORD data register, D30, changes remains 0.

The value of the WORD data register, D30, changes remains 0. The values continue shifting left.

The instruction shifts 3 WORD registers, starting at D30, to the left again.

The instruction shifts 3 WORD registers, starting at D30, to the left again.

The value of the WORD data register, D30, changes remains 0.

The value of the WORD data register, D30, changes remains 0. The values continue shifting left.

Ladder Diagram Example for MapleLogic DSFL/DSFLP instruction.

DSFLP

The DSFLP one-shot instruction shifts n number of WORD data registers, D ~ Dn, one WORD to the left. The result is saved in the same assigned data reg

The DSFLP one-shot instruction shifts n number of WORD data registers, D ~ Dn, one WORD to the left. The result is saved in the same assigned data register, D. Every time this instruction executes, it energizes the output only once.

The initial value of the WORD data register, D45, is 4,532.

The initial value of the WORD data register, D45, is 4,532.

When the contact, M2.8, is powered ON (1), the instruction shifts 2 WORD registers, starting at D45, to the left.

When the contact, M2.8, is powered ON (1), the instruction shifts 2 WORD registers, starting at D45, to the left.

The value of the WORD data register, D45, changes from 4,532 to 0.

The value of the WORD data register, D45, changes from 4,532 to 0.

The instruction shifts 2 WORD registers, starting at D45, to the left again.

The instruction shifts 2 WORD registers, starting at D45, to the left again.

The value of the WORD data register, D45, changes remains 0.

The value of the WORD data register, D45, changes remains 0. The values continue shifting left.

Ladder Diagram Example for MapleLogic DSFL/DSFLP instruction.