Application Overview
This technical reference covers the design and implementation of an automatic, repeating sequence on a Siemens LOGO! logic module. The controlled machine uses a horizontally moving shuttle driven by a 1 m pneumatic cylinder, two pneumatically actuated clamps (one fixed, one moving), and an external cutter triggered independently of the LOGO!. Four solenoid outputs drive 5-port, 2-way directional control valves, and four magnetic-reed position sensors report the state of the shuttle and the two clamps back to digital inputs.
The objective is a closed-loop cycle that, after a single Start press, runs indefinitely: shuttle right, close fixed clamp, fire cutter, time delay, open moving clamp, shuttle left, close moving clamp, open fixed clamp, shuttle right again, close fixed clamp, fire cutter, then repeat. The operator must be able to interrupt the cycle with a Stop and recover with a Reset that re-establishes the safe home state without re-powering the controller.
The implementation relies on standard LOGO! function blocks available since LOGO! 8 (6ED1052-xxx08-0BA1) and remains compatible with LOGO! 8.3 and 8.4 firmware families, which support the full BFB (function block) and UDF (user-defined function) libraries used here.
Prerequisites
- LOGO! 8 base module with at least 4 digital inputs and 4 digital outputs, or a LOGO! 8 with DM8/DM16 expansion if more I/O is required for the application.
- LOGO! Soft Comfort V8.3 or later for offline programming and simulation.
- Compatible Ethernet cable (LOGO! 8 has an integrated RJ45 port) for download and online test, or a LOGO! TD text display for on-machine monitoring.
- Pneumatic system with 24 VDC solenoid coils, each rated within the LOGO! output's switching capacity (typically 8 A resistive / 3 A inductive per relay output, derated for inductive loads).
- Magnetic-reed or PNP/NPN proximity switches rated 24 VDC, wired as sinking inputs into the LOGO! digital inputs.
- Free-wheel or snubber diodes across every solenoid coil (1N4007 or equivalent) to protect the relay contacts from inductive kickback.
- Emergency stop wired in series with the LOGO! 24 V supply so that removing power also drops all outputs.
System Architecture and I/O Mapping
The mechanical sequence translates to a one-to-one mapping of physical signals onto LOGO! terminals. The list below is the engineering baseline and should be documented in the circuit diagram and the LOGO! program header comment.
| LOGO! Address | Symbol | Function | Sensor / Actuator Type |
|---|---|---|---|
| I1 | START | Cycle start pushbutton (N/O, momentary) | Mechanical switch, sinking to 24 V |
| I2 | STOP | Cycle stop pushbutton (N/C, maintained or momentary) | Mechanical switch, sinking to 24 V |
| I3 | SHUTTLE_LEFT | Shuttle is at left end-of-travel | Magnetic reed on cylinder body |
| I4 | SHUTTLE_RIGHT | Shuttle is at right end-of-travel | Magnetic reed on cylinder body |
| I5 | CLAMP_FIXED_CLOSED | Fixed clamp is in closed (clamped) state | Magnetic reed on clamp cylinder |
| I6 | CLAMP_MOVING_CLOSED | Moving clamp is in closed (clamped) state | Magnetic reed on clamp cylinder |
| I7 | RESET | Operator reset pushbutton (N/O, momentary) | Mechanical switch, sinking to 24 V |
| I8 | E-STOP_OK | Safety loop healthy (optional monitored input) | Safety relay contact |
| Q1 | SHUTTLE_RIGHT_SOL | Drive shuttle from left to right | 5/2 directional valve, 24 VDC coil |
| Q2 | SHUTTLE_LEFT_SOL | Drive shuttle from right to left | 5/2 directional valve, 24 VDC coil |
| Q3 | FIXED_CLAMP | Energise fixed clamp (spring-return to open) | 5/2 directional valve, 24 VDC coil |
| Q4 | MOVING_CLAMP | Energise moving clamp (spring-return to open) | 5/2 directional valve, 24 VDC coil |
| Q5 | CUTTER_TRIGGER | Fire external cutter (single pulse) | Output to cutter relay or PLC |
The contact convention for magnetic sensors in this design is "open until magnet seen, then closed". This means an input that is OFF (0) represents an unknown or non-detected state, and an input that is ON (1) confirms the sensed position. The home state therefore reads as SHUTTLE_LEFT = 1, CLAMP_FIXED_CLOSED = 0, CLAMP_MOVING_CLOSED = 0, with all solenoid outputs off.
Mechanical Sequence Definition
The cycle is a strict linear progression of states. Step 0 is the safe home state. From home, a confirmed Start and a confirmed home position advance to Step 1.
- Step 1 - Drive Q1 to move the shuttle right. Wait until SHUTTLE_RIGHT = 1.
- Step 2 - Energise Q3 to close the fixed clamp. Wait until CLAMP_FIXED_CLOSED = 1.
- Step 3 - Pulse Q5 to fire the external cutter. Pulse width 200 ms is sufficient for most pneumatic cutting heads.
- Step 4 - Hold state for 20 seconds (cutter dwell, gluing, or curing window).
- Step 5 - Energise Q4 to close the moving clamp (this also releases the moving clamp from its spring-open state by holding it closed; for open/close clamps use a second output or a bistable valve).
- Step 6 - Wait 2 seconds. Drive Q2 to move the shuttle left. Wait until SHUTTLE_LEFT = 1.
- Step 7 - De-energise Q3 to open the fixed clamp (spring-return).
- Step 8 - Wait 2 seconds. Drive Q1 to move the shuttle right. Wait until SHUTTLE_RIGHT = 1.
- Step 9 - Energise Q3 to close the fixed clamp again.
- Step 10 - Pulse Q5 to fire the cutter.
- Step 11 - Wait 20 seconds, then jump to Step 5 of the next pass.
If a 5/2 valve with two solenoid coils is used for each clamp, dedicate one output per direction (close and open). If a spring-return single-solenoid valve is used, only the close command is needed and the open action is the spring return when power is removed. The sequence above assumes spring-return on both clamps.
LOGO! Program Architecture
The program is organised into three layered blocks so it can be tested and modified without untangling rungs:
- Block A - Input conditioning: Debounce and invert the STOP pushbutton; derive RUN_ENABLE from a Set/Reset latch driven by START (S) and STOP (R).
- Block B - Step sequencer: A counter-driven state machine that walks through Steps 1 to 11 and uses the LOGO! B019 (Step counter / sequencer) function block, or a chain of SR (Set/Reset) latches if the application predates LOGO! 8.
- Block C - Output interlocks: The sequencer bits are gated with sensor feedback and with a clamp-closed interlock so Q1 and Q2 cannot energise unless the moving clamp is open.
- Block D - Reset path: When the cycle is stopped, the RESET button drives Q1-Q2-Q3 for a fixed 1 second purge to dump residual air and re-establish home, but only after the moving clamp has been released.
Block A - Input Conditioning and Run Latch
The first rung builds a latched RUN signal. The LOGO! On-delay (B004) and SR (Set/Reset) blocks are sufficient.
Function block list:
- B001 - NOT on I2 (STOP N/C). Output = /STOP_OK.
- B002 - SR latch: S = I1 (START), R1 = /STOP_OK. Output = RUN.
- B003 - NOT on RUN, output = NOT_RUN, used to gate the Reset action.
Wire diagram (FBD notation):
I1 ----[ S ]----
|
SR B002 -+--- RUN
|
I2 ---[ / ]--[ R1 ]
With this structure a momentary START sets RUN, and any activation of STOP (or loss of STOP_OK) clears RUN. The /STOP_OK inversion lets you wire a normally-closed STOP pushbutton without an external relay.
Block B - Step Sequencer
LOGO! 8.3 introduces the Sequencer (B019) block which is ideal for this application. It can store up to 32 steps, each step having a configurable condition on its input and a set of outputs to energise. For this machine we define 11 steps. A typical entry looks like:
| Step | Trigger / Condition | Q1 | Q2 | Q3 | Q4 | Q5 | Notes |
|---|---|---|---|---|---|---|---|
| 1 | SHUTTLE_LEFT = 1 AND RUN = 1 | 1 | 0 | 0 | 0 | 0 | Start of pass: drive shuttle right |
| 2 | SHUTTLE_RIGHT = 1 | 0 | 0 | 1 | 0 | 0 | Close fixed clamp |
| 3 | CLAMP_FIXED_CLOSED = 1 | 0 | 0 | 1 | 0 | 1 (pulse) | Fire cutter, pulse via edge |
| 4 | CUTTER_PULSE_DONE = 1 | 0 | 0 | 1 | 0 | 0 | 20 s dwell via on-delay |
| 5 | DWELL_DONE = 1 | 0 | 0 | 0 | 1 | 0 | Open moving clamp (energise to release) |
| 6 | CLAMP_MOVING_CLOSED = 0 | 0 | 1 | 0 | 0 | 0 | Drive shuttle left |
| 7 | SHUTTLE_LEFT = 1 | 0 | 0 | 0 | 0 | 0 | Open fixed clamp (de-energise Q3) |
| 8 | CLAMP_FIXED_CLOSED = 0 | 1 | 0 | 0 | 0 | 0 | Drive shuttle right again |
| 9 | SHUTTLE_RIGHT = 1 | 0 | 0 | 1 | 0 | 0 | Close fixed clamp |
| 10 | CLAMP_FIXED_CLOSED = 1 | 0 | 0 | 1 | 0 | 1 (pulse) | Fire cutter second time |
| 11 | CUTTER_PULSE_DONE = 1 | 0 | 0 | 1 | 0 | 0 | 20 s dwell, then wrap to Step 5 |
The sequencer block automatically advances when the configured condition is met. Setting Step 11 to wrap to Step 5 produces the repeating loop the user requested, with the cutter firing twice per shuttle stroke.
Block C - Interlocks
The user requirement is that Q1 and Q2 (shuttle motion) must not energise unless the moving clamp is open. The interlock is a logical AND with /CLAMP_MOVING_CLOSED, that is, the inverted sense of I6.
SEQUENCER.Q1 (Step 1) --+
|
AND B020 --- Q1_DRIVE_OK
|
/I6 (moving clamp closed)--+
Q2 uses the same gate with the Step 6 bit. The fixed clamp Q3 and moving clamp Q4 are not interlocked against the shuttle, but they are interlocked against each other so Q3 and Q4 can never both be energised simultaneously, which would mechanically conflict on a shared clamp body.
Block D - Reset Behaviour
After STOP, the system may be sitting mid-cycle with the shuttle off home and one or both clamps engaged. The operator presses RESET to force a known safe state. The reset logic in ladder form:
- RESET (I7) is only honoured when NOT_RUN = 1, that is, the cycle is not currently running.
- While RESET is held, energise Q1, Q2, and Q3 for 1 second (B005 on-delay, 1.0 s) to bleed residual air and shake the shuttle free.
- After the 1 second window, drop all outputs. The mechanical spring returns drive the clamps open and the shuttle to one of its end positions.
- Confirm home state: SHUTTLE_LEFT = 1, /CLAMP_FIXED_CLOSED = 1, /CLAMP_MOVING_CLOSED = 1. If true, illuminate a green HOME_OK indicator on the LOGO! TD or on Q6.
The reset function intentionally does not move the shuttle left-to-right or right-to-left on its own; the spring-return valves release the clamps, and the shuttle settles at whichever end its air bleed leaves it. Operators then press START and the sequencer picks up at the matching step.
Timing Parameters and Tuning
| Function Block | Parameter | Value | Notes |
|---|---|---|---|
| B005 Cutter pulse | TH | 0.2 s | Adjust to match cutter actuator response |
| B006 Dwell after cutter | TH | 20 s | Adjust for curing / gluing window |
| B007 Inter-step delay | TH | 2 s | Settling time between motion and clamp action |
| B008 Reset purge | TH | 1 s | Bleed time after RESET |
| B009 Sensor debounce | TH | 0.05 s | Suppresses reed-switch bounce |
| B010 Watchdog | TH | 30 s | Flags fault if step not reached in time |
Verification Procedure
- Open LOGO! Soft Comfort, load the project, and start simulation mode (Ctrl+F3).
- Force I3 = 1 (shuttle left), I5 = 0, I6 = 0 to establish home state.
- Click I1 (START). Verify RUN latches and Step 1 energises Q1.
- Force I4 = 1 (shuttle right) and verify Step 2 advances, Q1 drops, Q3 energises.
- Force I5 = 1 and verify Step 3 fires the cutter pulse on Q5 for 0.2 s.
- Watch the dwell timer count from 20 s to 0 s; verify Step 5 then 6 follows.
- Force I3 = 1 again and verify Step 7 drops Q3.
- Continue forcing sensor inputs until the sequencer returns to Step 5, confirming wrap-around.
- Press I2 (STOP) mid-cycle and verify RUN drops, all outputs clear except Q3 if it was on (de-energise immediately).
- Press I7 (RESET) and verify the 1 second purge pulse appears on Q1, Q2, Q3.
- Download to the LOGO! hardware, repeat steps 3 to 9 on the live machine, and time each step with a stopwatch to confirm parameter values.
Troubleshooting Matrix
| Symptom | Likely Cause | Diagnostic | Remedy |
|---|---|---|---|
| Cycle does not start after START press | STOP pushbutton wired N/O instead of N/C, or not pressed | Check I2 status in online test | Re-wire STOP as N/C or add inversion |
| Shuttle oscillates left-right at step changes | Both Q1 and Q2 momentarily energised during transition | Scope Q1 and Q2 relative to step change | Add 100 ms off-delay between Q1 and Q2 transitions |
| Clamp chatters when energised | Insufficient dwell time before shuttle motion | Inspect pressure gauge and cycle time | Increase B007 from 2 s to 3 s |
| Cutter does not fire | Q5 pulse too short, or Q5 wired to wrong relay | Check Q5 in online mode | Increase B005 pulse width, verify wiring |
| Cycle skips a step randomly | Magnetic sensor bouncing, reed switch mounted too far from magnet | Watch input with online trend | Increase B009 debounce, reposition sensor within 5 mm |
| RESET has no effect | RESET gated by RUN; cycle still in RUN state | Check RUN flag | Press STOP first, then RESET |
| Outputs energise before home confirmed | Home check missing from RUN latch set logic | Inspect SR block S input | AND home check into S input |
| LOGO! loses program on power cycle | Battery not installed or program not saved to flash | Check Tools > Options > Memory | Enable Auto-save to flash, install battery module |
Field Commissioning Notes
When the program is downloaded to the machine for the first time, walk the cycle manually with the LOGO! in STOP mode and force each output individually. Confirm the solenoid bank is wired 1:1 with the LOGO! outputs and that the spring-return direction matches the assumption in the sequence table. If a clamp is observed to close when its solenoid is de-energised, the valve is plumbed backwards and the air ports must be swapped at the manifold.
Verify the reed switch logic on every cylinder. Reed switches are normally open and close in the presence of a magnetic field. If a clamp sensor reads ON when the clamp is open, the magnet is on the wrong side of the piston or the switch is mounted on the rod-end cap. Confirm with a handheld magnet before trusting the input map.
Adjust the 20 second dwell only after observing one full cycle on the machine. Many processes need less dwell once the cutter response is tuned. Use the LOGO! TD text display to view the live step number and timer values during commissioning, which avoids opening LOGO! Soft Comfort on a laptop near moving machinery.
Program Portability and Variant Handling
LOGO! Soft Comfort supports UDF (User Defined Function) blocks, which lets you package Block B (the sequencer) and Block C (the interlocks) as a single reusable element. On a machine family where the shuttle stroke, dwell time, or number of cuts per pass varies, the UDF exposes parameters at the project level so a new variant is built by changing parameter values rather than rebuilding ladder. Document every parameter in the UDF header comment so the next maintainer can find it without reading the network.
FAQ
What is the minimum LOGO! firmware version that supports the B019 sequencer block?
LOGO! 8.3 firmware (6ED1052-xxx08-0BA1 with FS 03 or later) is the first release that includes B019. Earlier LOGO! 8 versions support the same cycle using a chain of SR latches and one-shot monoflops.
How do I make the cycle repeat indefinitely after the last step?
Set the last sequencer step (Step 11 in this design) to wrap back to the desired restart step (Step 5). The B019 block handles wrap-around automatically, so the cycle loops without external wiring.
Can the STOP pushbutton be wired normally open instead of normally closed?
Yes, but you must remove the NOT block (B001) from the input conditioning rung so that an energised STOP clears RUN. With a maintained N/O STOP button the operator must press and release it for the cycle to stop, which is usually undesirable; N/C is preferred for safety.
How do I prevent Q1 and Q2 from energising at the same time?
Add an interlock rung that ANDs the Q1 drive signal with /Q2, and the Q2 drive signal with /Q1. The sequencer prevents simultaneous commands in normal operation, but the interlock protects against programming errors or a faulty sequencer step.
What is the correct response if a sensor fails mid-cycle?
Add a watchdog timer (B010 in this design) that resets RUN if any step is not reached within 30 seconds. The cycle halts, the operator inspects the sensor and presses RESET to recover to home state.