Design a sequential function chart
Rockwell Automation Publication 1756-PM006I-EN-P - February 2018 41
• When the SFC leaves the step, all data keeps its current values.
This example uses an action to turn on a conveyor at the start of a step. A different
action turns off the conveyor at the end of the step.
This action turns on the conveyor. When conveyor_state turns on, the conveyor turns on.
Before the SFC leaves the step, the P0 action turns off the conveyor. On the last scan of the step,
conveyor_state turns off. This turns off the conveyor.
An optional method to programmatically turn off (clear) devices at the end of a
step is to execute all actions on the last scan of the step. This lets you execute your
normal logic as well as turn off (clear) devices at the end of a step.
1. In the Last Scan of Active Steps property, select the Programmatic reset
option.
2. Clear the required data using any of these methods.
• To your normal logic, add logic that clears the required data. Use the LS
bit of the step or the Q bit of the action to condition the execution of
the logic.
• Use a P0 Pulse (Falling Edge) action to clear the required data. Make
sure that the P0 action or actions are last in the order of actions for the
step.
During the last scan of the step, the Programmatic reset option executes all
assignments and instructions according to logic conditions.
• The controller does not postscan the assignments or instructions.
• When the SFC leaves the step, all data keeps its current value.
This example uses a single action to turn on and off a conveyor (see
Use the
programmatic reset option on page 41) and the LS Bit. The LS bit of the step
conditions the execution of the logic. See SFC_STEP structure on page 20.
Use the programmatic reset
option