IMDHMIControls LibraryShop main store

How-to

Structure dock door conveyor interlocks in Studio 5000

PLC programming Published 6 min read

Short answer

Run the conveyor on three explicit states — Ready, Running and Restart-required — with door-open, truck-present and curtain-clear as permissives. Truck departure mid-cycle stops the conveyor and latches a manual restart; the light curtain's protective stop stays in safety-rated equipment. Fix the door sensor before debouncing, then size the timer to the measured flicker — 600 ms against a 240 ms example.

On this page
  1. Split the safety function from the sequence
  2. Build three states, not one flat rung
  3. Write the rungs
  4. Fix the door sensor before you debounce it
  5. Size the debounce from a measurement
  6. Prove the interlock before the dock runs
  7. Show the reason at the dock
  8. Questions asked

Structure the dock conveyor as three explicit states — Ready, Running and Restart-required — instead of one flat rung of AND conditions. Door-open, truck-present and curtain-clear are permissives the states consume; when the truck backs out mid-cycle, the conveyor stops and latches a manual restart. The light curtain's protective stop stays in safety-rated equipment, and the standard program reads only its status bit. Fix the door sensor's wiring and alignment first: only a measured flicker justifies a debounce, sized to what you measured.

Split the safety function from the sequence #

The risk assessment comes first, and it decides where the light curtain lives. A curtain that keeps a person away from a moving conveyor is a protective device: under the machinery-safety approach of ISO 13849-1, the risk assessment sets the performance the safety-related parts of the control system must achieve, and a standard CompactLogix rung cannot claim that performance — an ordinary edit, a forced bit or a controller fault can leave it ineffective.

So commit to this split: the sequence runs in the standard CompactLogix; the curtain's stop function runs in safety-rated equipment. The pairing documented in the vendor's light-curtain application technique is a GuardLogix controller with POINT Guard I/O, and that class of hardware is what carries the protective stop. The standard program then consumes one curtain-clear status bit as a permissive. The same architecture question drives selecting remote I/O architecture for a safety upgrade, so settle it before writing rungs.

Safety note: never let the standard rung be the only thing standing between a person and the belt; it is not safety-rated, and no amount of ladder structure makes it so.

Build three states, not one flat rung #

A flat rung of ANDs answers only "may it run right now." It cannot say what happens when the truck leaves mid-cycle, it hides which condition stopped the belt, and it mixes the permission to start with the permission to continue. Three states answer all of it:

  1. Ready — DockSeqState = 0. Start is accepted only while every permissive is true; accepting it moves to Running.
  2. Running — DockSeqState = 1. The conveyor runs while the permissives hold. Losing the truck moves to Restart-required; losing door or curtain while the truck stays moves back to Ready.
  3. Restart-required — DockSeqState = 2. The conveyor is stopped and automatic restart is blocked. Only an operator Start, with every permissive true again, returns to Running.

Decide the resume policy and write it down: a door or curtain permissive lost with the truck still docked stops the belt and lets it resume automatically when the permissive returns, because the same truck is still there. Truck presence lost stops the belt and demands a human Start, because you no longer know what is at the dock. Process plants draw the same line between ESD interlocks and DCS permissives in motor control diagrams — the protective layer stops, the permissive layer permits.

A sequencer instruction is not automatically the more standard answer. It earns its place when ordered, timed steps pile up; the structure used for sequencer valve control with a table-driven program shows what that looks like when you need it. For three states, explicit rungs are easier to force, trend and troubleshoot.

Write the rungs #

Declare the tags once, with types and initial values, so the states reference one set of names:

// Illustrative tags — keep your site's naming standard
RawDoorOpen      BOOL   0    // door fully-open limit, raw input
DoorOpen_OK      BOOL   0    // debounced door permissive
TruckPresent     BOOL   0    // truck-docked sensor
CurtainClear     BOOL   1    // status bit from the safety system
PermissivesOK    BOOL   0
Start_PB         BOOL   0    // momentary operator Start
ConveyorRun      BOOL   0    // run command to the conveyor drive
DockSeqState     DINT   0    // 0 Ready, 1 Running, 2 Restart-required
RestartLatch     BOOL   0
DoorCloseFilter  TIMER      // TON tag; preset set from your measurement

Then, in this order in one routine, so a stop lands in the same scan the permissive drops:

  1. Permissives: DoorOpen_OK AND TruckPresent AND CurtainClear drives PermissivesOK with an output-energize coil.
  2. Start from Ready: Start_PB AND PermissivesOK AND (DockSeqState = 0) moves 1 into DockSeqState.
  3. Run: (DockSeqState = 1) AND PermissivesOK drives ConveyorRun.
  4. Truck lost while running: (DockSeqState = 1) AND NOT TruckPresent moves 2 into DockSeqState and latches RestartLatch.
  5. Another permissive lost, truck still there: (DockSeqState = 1) AND TruckPresent AND NOT PermissivesOK moves 0 into DockSeqState.
  6. Restart: Start_PB AND PermissivesOK AND (DockSeqState = 2) moves 1 into DockSeqState and unlatches RestartLatch.

On rungs 4 and 5, latch first-out reason bits — TruckGone, DoorBlocked, CurtainBlocked — and unlatch all three on the restart rung, so every stop carries its cause with it.

Fix the door sensor before you debounce it #

False triggers on a door-position sensor are a wiring or mechanics problem until proven otherwise. Work it in this order:

  1. Door stationary, fully open: watch the input online in Studio 5000. Flicker with the door not moving is wiring, grounding or supply — no timer fixes that.
  2. Move the door through its travel and compare: the input must change exactly at the fully-open position, not before it, not partway.
  3. Shake the sensor bracket by hand. A mount that flexes moves the switch out of alignment every cycle.
  4. Check what the signal really is: a latch or lock output means "unlatched", and it can be true with the door off its seal. The run permissive needs a signal that proves the fully-open position.
  5. Compare the sensor's local indicator with the controller tag. Both flicker: sensor side — alignment, mounting, target or the switch itself. Only the tag flickers: the input path — terminals, cable or the module channel.

Only when all five pass and brief chatter remains is a debounce the right tool.

Size the debounce from a measurement #

Debounce the direction that removes the permissive — the door leaving fully open — and leave the restoring direction instant, so a reopened door is recognized on the next scan:

// TON on a TIMER tag: enable = NOT RawDoorOpen, preset 600 ms
// debounced permissive:
DoorOpen_OK = RawDoorOpen OR NOT DoorCloseFilter.DN

Worked example — replace these numbers with your own measurement:

  • Measured: longest dropout of the door-open input across 20 door cycles = 240 ms.
  • Chosen preset: 600 ms, inside the 500–700 ms band quoted for door-close debounces. Treat that band as a starting point, not a validated constant.
  • Margin: 600 ms − 240 ms = 360 ms of rejection margin over the worst observed chatter.
  • Cost: on a real close, the permissive drops no more than 600 ms after the raw input first changes; any dropout shorter than 600 ms never drops it.

Decisions: measured chatter up to about 400 ms — a 600 ms preset holds with at least 200 ms of margin. Measured chatter beyond that — stop and fix the sensor, because a debounce large enough to swallow it starts hiding real door movement. And keep the preset at 600 ms, not seconds: a door that genuinely starts closing must take the permissive away inside a second.

Prove the interlock before the dock runs #

Commission with the physical input LED, the controller tag, DockSeqState and ConveyorRun on screen together — that quartet tells you whether a fault starts at the device, the input path or the logic:

  1. Door below fully open, press Start: DockSeqState stays 0 and ConveyorRun stays false.
  2. Truck absent, press Start: blocked in Ready.
  3. Break the curtain while running: the safety system stops the conveyor through its own channel, and the status bit returns the sequence to Ready.
  4. Running with everything true, remove truck presence: the conveyor stops in the same scan, DockSeqState goes to 2 and RestartLatch sets.
  5. Restore truck, door and curtain: the conveyor stays stopped until Start is pressed, then runs with RestartLatch reset.
  6. Cycle the door 20 times at normal speed: zero nuisance stops with the 600 ms preset in place.

Show the reason at the dock #

An operator who sees only "stopped" will jog the door and slap Start until something clears. Give the station the three reason bits and the state on an industrial panel PC mounted at the dock, so the screen reads DoorBlocked, TruckGone or CurtainBlocked — the cause, not the symptom. That display is the payoff of the state structure: the states you wrote are the diagnostic messages the operator needs.

Questions asked

Does the door debounce delay the light curtain stop?

No. The debounce sits only in the standard-logic door permissive. The curtain's protective stop acts through the safety system, which removes the run command and the power path directly; the PLC timer cannot slow it or bypass it. The debounce's only cost is up to 600 ms on the door permissive, and only in the standard sequence.

Can the door latch output serve as the fully-open permissive?

No. A latch or lock output proves the door is unlatched, not that it is fully open; it can be true with the door partway up. Use a limit switch or sensor that proves the fully-open position for the run permissive, keep the latch signal in the door control, and alarm on it separately if the sequence depends on it.

How do I capture which permissive dropped first?

On the rung that detects the sequence leaving Running, latch the permissive states into three first-out bits — door, truck and curtain — in the same scan as the stop. Unlatch all three on the next successful Start. Show the bits on the operator station so nobody has to guess which condition stopped the belt.

When is a sequencer instruction the better choice?

When the sequence has many ordered, timed steps — dock, restraint check, empty-belt prove-out, load, discharge and clear-down is six already. For three states, explicit rungs are easier to force, trend and troubleshoot, and a sequencer adds a data table you must maintain without adding any protection.

What if the truck-presence sensor flickers like the door sensor?

Treat it identically: wiring, mounting and alignment first, then measure. Debounce it only after those checks, and keep that timer short — truck presence is the trigger for the latched restart, so a long preset here delays the deliberate stop you added. Fixing the sensor is worth more than any filter on this input.

Keep reading

  • How-to

    Build a siren pulse count sequence in S7-1200 ladder logic

    Use a positive-edge request to load a target of 3, 2, or 1 pulses, then run a four-state ladder sequence — idle, start, stop, count — that drives Q6.2 (START) and Q6.1 (STOP) from separate states so the two SIMOCODE Pro V commands never overlap. With a 2.0 s on-time and a 1.0 s gap, the three patterns finish in 11.0 s, 7.0 s, and 3.0 s.

    PLC programming

  • How-to

    Latch two level inputs for pump start and stop control

    Use one reset-dominant latch: set the pump when the low level probe reads dry and reset it when the high probe reads wet, so the pump holds its state between the probes. A rung that only compares the inputs drops out the moment water covers the low probe; the latch turns the probe spacing into hysteresis.

    PLC programming

  • Troubleshooting

    Start a PID ramp soak profile from ladder logic

    The profile never starts from ladder because the JMP stage handoff leaves the old stage on for three more scans, which swallows the one-scan PD pulse that must set the ramp/soak start bit. Replace the jump with SET and RST stage logic, then verify bit 11, the +33 octal control word and the +35 error flags before touching the PID instruction or table values.

    PLC programming