The Step pattern is a Ladder Logic Programming Pattern that is the basic building block of a machine’s Automatic Mode. The logic for each Step is simple:
You can combine any number of steps to form a Sequence. The steps will execute sequentially. When the Step In Progress coil turns on, this should be the signal to actuate a mechanism somewhere else in the program. For instance, if the Step is “Extend Cylinder” then a contact from the Step In Progress coil could be used to turn on the pneumatic valve to extend the cylinder. The Step stays active (i.e. the Step In Progress coil stays on) until the Step Done condition is true. In the example of extending the cylinder, the Step Done condition could be the Cylinder Extended input.
Consider that you might have several steps where you need to extend that cylinder. If you need to extend the cylinder in both Step 3 and Step 8, then your Extend Cylinder logic could have contacts from both Step 3 In Progress and Step 8 In Progress in parallel.
Here is an example of a two step sequence. Step 1 is “Extend Cylinder” and Step 2 is “Retract Cylinder”:
The Sequence Start condition is what initiates the sequence. This should be something like “the machine is in Auto Mode, an Auto Cycle is running, a part is present, and the part hasn’t been processed yet”. When the sequence is complete, then the Seq. Complete coil turns on. This can be used in combination with the Set/Reset pattern to latch a memory bit to indicate that the part has been processed. Presumably this causes another sequence to begin, such as an Unload Part sequence. Alternatively we might just wait for the operator to remove the part.
The Step pattern is frequently used with the Mission pattern. In this case the Sequence Start will be the Mission (in progress) coil and the Seq. Complete coil will signal the end of the mission.
Note that if the Sequence Start condition drops out during the sequence, then the entire sequence will reset (all the Complete coils will turn off, as will the Seq. Complete coil).
Also note that if the sequence starts and the cylinder is already extended, then the Step 1 In Progress coil will never turn on. It will jump directly to Step 2. In this case that might be what you want. If it’s not, you can consider putting the condition “Cylinder not Extended” in the Sequence Start condition. Another alternative is to force the Step In Progress coil to turn on for at least one scan before moving to the next step. This is relatively simple:
By adding a contact for Step In Progress before the Step Done condition in the first rung, we make sure that the Step In Progress coil has to turn on for at least one scan before the step is complete. You can even take this form of the pattern and remove the Step Done condition:
In this variant of the pattern, the Step In Progress coil turns on for exactly one scan. This makes it a “one-shot step”. A one-shot step is useful for doing part tracking and data logging since those things typically only require a single scan (such as set a bit, take a measurement, or record a value to the part history).