Machine sequencing is the backbone of industrial automation. Whether you are controlling simple pneumatic actuators or complex multi-axis robotics, jumping straight into programming without a structured plan often leads to equipment collisions, logic race conditions, and difficult-to-debug code.
By detailing out your sequence before writing logic, you ensure your code remains universal, easy to read, and manageable for field technicians across various PLC platforms.
The 5-Step Sequence Planning Process
Write Narrative: State the machine operation clearly in plain language from start to finish.
Define Steps: Break the narrative down into distinct, individual process states (e.g., Step 1: Home, Step 2: Close Gripper, Step 3: Cylinder Up, Step 4: Extend, Step 5: Cylinder Down, Step 6: Open Gripper, Step 7: Retract).
Identify I/O: List all physical inputs, outputs, aliases, and memory bits required for the operation.
Map Output Table: Detail the exact output solenoids or actuators that must be active during each specific step.
Map Input Table: Detail the specific input feedback conditions and switch signals required to confirm step completion before advancing to the next state.
Core Sequencing Concepts
Move x10 Method (Recommended): Tracks steps in increments of 10 (10, 20, 30...). This future-proofs the program by leaving room to insert intermediate steps (e.g., Step 25) without renumbering the entire routine.
Counter / Add Methods: Uses a CTU accumulator or ADD instruction incremented by 1 to advance step integer values.
Binary / Multiply Methods: Uses bit values (2, 4, 8, 16...) or MUL by 2 to shift execution states.
Seal-In / Latch Methods: Uses traditional contact logic or OTL/OUT bits per step state.
Bit Shift Left (BSL): Uses an array bit shift instruction to advance sequence bits through a register.
Hand / Auto Control Framework
Always separate output driving logic into a dedicated subroutine.
Use an Auto Mode / Manual Mode interlock rung for each output to allow manual jog/override via pushbuttons without corrupting automatic sequence tracking.
| Valve Type | Behavior in Center/De-energized Position | Typical Application |
|---|---|---|
| 3-Position, Center Exhaust | Vents both cylinder ports to the atmosphere. Actuator can be freely moved by hand. | Setup blocks, manual alignment zones, safety dump circuits. |
| 3-Position, Closed Center | Traps air pressure in both lines. Locks the actuator rigidly in place. | Vertical lifts (prevents gravity drops), mid-stroke positioning. |
| 2-Position, Single Solenoid | Spring-returns to a default state when power is lost. | Material gripping, sorting gates, fail-safe positioning. |
3. Actuator Feedback (PNP Sensors)
To track cylinder extension and retraction without physical limit switches, magnetic proximity sensors are clamped to the aluminum body of the cylinder. Inside the cylinder, a permanent magnetic ring is seated around the moving piston head. When the piston moves beneath the sensor, the magnetic field closes an internal solid-state switch, sending a 24VDC signal back to your PLC input card or indicator lights.
Knowledge Check Quiz
-
Why is the "Move x10" sequencing method generally preferred over single-increment counter methods?
Click to reveal answer
The Move x10 method leaves numerical gaps (e.g., Step 10, Step 20) so that future modifications can insert intermediate steps (like Step 25) without having to renumber every subsequent step in the entire program.
-
What problem occurs when multiple output energize (OTE) instructions drive the same physical output across different sequence rungs?
Click to reveal answer
This causes a "duplicate destructive bit" error where the last evaluated rung in the PLC scan overrides all previous rungs, causing unexpected behavior or total failure of the output to energize.
-
What instruction can be used during initial sequence framework development to keep a rung false without deleting logic?
Click to reveal answer
The Always False Input (AFI) instruction evaluates as false on every scan, allowing you to build and test code structure safely.
-
What is the purpose of placing a One-Shot (ONS) instruction on the auto-mode initiation contact?
Click to reveal answer
The ONS ensures the auto latch fires only on the rising edge when the mode switch is turned to auto, preventing the sequence from automatically restarting another cycle upon completion if the conditions are still met.
-
When troubleshooting a machine sequence stuck on a specific step, what should be checked first if the cylinder switch feedback is missing?
Click to reveal answer
First, check the physical position of the cylinder. If the cylinder hasn't physically moved to position, troubleshoot the output solenoid or mechanical jam rather than chasing the input switch or sensor signal.