Example - Ladder Diagram
DSFR
The DSFR instruction shifts n number of WORD data registers, D ~ Dn, one WORD to the right. The result is saved in the same assigned WORD data register, D.
Ladder Diagram Example
The initial value of the WORD data register, D10, is 4,531.
When the contact, M1.0, is powered ON (1), the instruction shifts 3 WORD registers, starting at D10, to the right.
The value of the WORD data register, D10, changes from 4,531 to -867.
The instruction shifts 3 WORD registers, starting at D10, to the right again.
The value of the WORD data register, D10, changes from -867 to 4,218.
The instruction shifts 3 WORD registers, starting at D10, to the right again.
The value of the WORD data register, D10, changes from 4,218 to 0.
DSFRP
The DSFRP one-shot instruction shifts n number of WORD data registers, D ~ Dn, one WORD to the right. The result is saved in the same assigned WORD data register, D.
Every time this instruction executes, it energizes the output only once.
Ladder Diagram Example
The initial value of the WORD data register, D15, is 4,531.
When the contact, M1.1, is powered ON (1), the instruction shifts 4 WORD registers, starting at D15, to the right.
The value of the WORD data register, D15, changes from 4,531 to 3,213.
The instruction shifts 4 WORD registers, starting at D15, to the right again.
The value of the WORD data register, D15, changes from 4,531 to 2,050.