AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Why NC Light Barriers Invert Conveyor Start Logic

Sensors, encoders and machine vision on the machine Published 7 min read By AutomateDirectUSA engineering team

Short answer

An NC light barrier holds its input TRUE while the beam is clear and drops it to FALSE when a crate breaks the beam, so every occupied condition in a two-belt handoff is written on the FALSE side. Belt 1 starts when B1 falls, belt 2 when B2 falls, and the cycle ends when B3 returns TRUE after going FALSE. Write it the NO way and belt 1 runs at power-up.

On this page
  1. What the barrier outputs, and which state means crate
  2. Why NO thinking runs belt 1 at power-up
  3. The sequence written on the falling edge
  4. Worked example: the FALSE window the logic must catch
  5. Where the three beams belong
  6. Why NC is the right polarity for this sequence
  7. Held buttons, chatter and mid-cycle stops
  8. Questions asked

An NC light barrier does not report a crate the way a pushbutton reports a press. It holds its input TRUE while the beam is clear and drops to FALSE the moment a crate blocks it, so a two-belt handoff has to be written on the FALSE side: belt 1 starts when B1 falls, belt 2 starts when B2 falls, and the cycle ends when B3 returns to TRUE after having been FALSE. The common failure is a sequence written as if the barriers were NO, with occupied equal to TRUE, and its signature is belt 1 running at power-up with no crate anywhere on the line. The wiring is fine in that case; the conditions sit on the wrong side of the signal.

What the barrier outputs, and which state means crate #

A through-beam photoelectric barrier pairs a transmitter with a receiver mounted across the belt. The receiver's output conducts while it sees the beam — datasheets call this a light-on output, and it is what the NC tag on the sensor schedule describes. Put a crate in the beam and the output stops conducting, so the controller's input reads FALSE. A broken signal wire, a lost supply or a receiver knocked out of alignment produce the same FALSE; the input cannot tell them from a crate, and the sequence below is built around that property.

The two states of the three barriers on a two-belt line:

Barrier Beam clear Beam blocked Meaning written into the sequence
B1, entrance of belt 1 TRUE FALSE FALSE means the crate has arrived: start belt 1
B2, handoff between the belts TRUE FALSE FALSE means the crate reaches the transfer: start belt 2
B3, discharge end of belt 2 TRUE FALSE FALSE then TRUE means the crate has left: stop everything

At idle with an empty line, all three inputs read TRUE and every output is FALSE. Check that reference state before touching any logic: an input reading FALSE under a clear beam is a wiring, supply or alignment fault, not a sequence bug.

Why NO thinking runs belt 1 at power-up #

Write occupied as B1 equal to TRUE — correct for an NO barrier, wrong for this one — and the condition is satisfied the instant the program runs, because a clear NC beam already reads TRUE. Belt 1 starts with nothing on it. The mirror-image mistake bites at the end of the cycle: writing the crate's departure as B3 equal to FALSE drops the outputs while the crate is still breaking that beam, so the line switches off with the crate on belt 2 instead of on the ramp. Both symptoms share one root cause, the conditions sitting on the wrong side of the signal, and no amount of rewiring fixes them.

The sequence written on the falling edge #

Model the line as a step chain with five steps:

  • Idle. All outputs FALSE. Wait for the rising edge of the start pushbutton S1, which is NO and reads TRUE only while held.
  • Load. Energize the load output long enough to place one crate on belt 1.
  • Belt 1. When B1 falls from TRUE to FALSE, turn the belt 1 output on.
  • Belt 2. When B2 falls, turn the belt 2 output on.
  • Exit. After B3 has gone FALSE, wait for it to return to TRUE; then drop all outputs and go back to idle.

Inside a step chain the B1 and B2 tests can be plain level tests of FALSE: only the waiting step evaluates them, and the step order supplies the sequencing. In flat logic without steps, trigger on the falling edge itself so an input that stays FALSE cannot re-fire the step. B3 is the one condition that genuinely needs memory, because TRUE is also the idle state: the crate's departure exists only as the ordered pair FALSE then TRUE. Give it two transitions, never a single level test.

Worked example: the FALSE window the logic must catch #

The figures below are example inputs for one line, not measurements of any particular sensor:

  • Belt speed v on both belts: 0.4 m/s.
  • Crate length L: 0.4 m.
  • Distance from B1 to B2, d: 1.2 m.
  • Controller scan time: 5 ms.

Travel time from B1 to B2: t = d ÷ v = 1.2 m ÷ 0.4 m/s = 3.0 s. The B2 falling edge therefore belongs about 3.0 s after the B1 falling edge; if it comes immediately or never, the mapping or the polarity is wrong before any timing question arises.

How long B1 stays FALSE while the crate crosses its beam: t = L ÷ v = 0.4 m ÷ 0.4 m/s = 1.0 s. At a 5 ms scan the controller samples that input 1.0 s ÷ 0.005 s = 200 times, so a level test inside the waiting step cannot miss the crate. The window also dwarfs the sensor's own response time — take that figure from the datasheet of the exact sensor; for small photoelectric barriers it is typically on the order of a millisecond, a rule of thumb and not a specification — leaving a margin well over a hundred times.

The decision rule that falls out of the arithmetic: crate length divided by belt speed must exceed the sensor response time plus the scan time with room to spare, and a factor of ten is a workable rule of thumb for that margin. At the numbers above the margin is enormous. With short crates on a fast belt, run the same division first; if the margin gets thin, trigger on the falling edge and keep any input filter a small fraction of the window.

Where the three beams belong #

B1 goes at the entrance of belt 1, just past the loading point, so the crate breaks the beam as soon as it lands. B2 goes at the transfer between the belts, the point where conveyor speed changes per product at the handoff rather than for a whole batch, so belt 2 starts as the crate commits to the handoff. B3 goes at the discharge end of belt 2, before the ramp, so its FALSE-then-TRUE pair proves the crate has cleared the belt. Mount each beam through the body of the crate, never above it, and keep the beams far enough apart that one crate breaks one beam at a time; the sensor spacing rules for detecting box length with two sensors work through the same geometry when the box itself is what you need to measure.

Why NC is the right polarity for this sequence #

Choose light-on barriers for presence detection because of how they fail. A broken wire, a lost supply or a barrier knocked out of alignment drives the input FALSE, the crate state, so the fault turns into behavior: at B1 or B2 a belt starts with nothing on it, and at B3 the cycle refuses to end. Both are loud, and both point straight at the dead barrier. An NO barrier fails the other way: the same broken wire reads as a clear beam, the sequence waits for an arrival that never registers, and the fault is indistinguishable from a quiet idle line. Loud beats quiet on a production floor, so the NC choice stands.

One safety note, because the word barrier invites the confusion: this fail-state reasoning is diagnostics, not protection. A process light barrier has no safety rating; keeping people out of the hazard takes a safety light curtain, electro-sensitive protective equipment designed to IEC 61496-1, which requires the device to monitor itself and switch to a safe state on an internal fault as well as on an interrupted beam, wired into the machine's safety function as the risk assessment defines it — never into this sequence.

Held buttons, chatter and mid-cycle stops #

The start pushbutton is NO, the opposite convention of the barriers, and the model should keep the two straight. Trigger the load step on the rising edge of S1 or latch it: with a level test, holding the button loads a fresh crate every scan until it is released.

Triggering on transitions also makes chatter visible, because every bounce of a sensor edge looks like a new arrival. Keep the input filter well under the shortest genuine FALSE window — a 50 ms debounce is 50 ÷ 1000 = 5% of the window in the worked example, which is safe — and treat unexplained repeated edges as an electrical fault first, since proximity switch noise causing false counter counts describes the same failure mode arriving on a counting input.

Last, give the chain a way home. A line stopped or reset mid-cycle leaves the program in a step waiting for a sensor event that already happened or never will, with a crate stranded between beams. A stop or reset input that returns the chain to idle closes that hole; decide at the same time what becomes of a crate still on the belts when the chain restarts.

Questions asked

Does NC describe the light beam or the electrical output?

The output. On a sensor datasheet the same behavior usually appears as light-on, meaning the output conducts while the receiver sees the beam; the beam itself is just light. What matters to the sequence is the state of the controller's input with a clear beam, TRUE for this sensor. Verify it once with the belt empty, then block the beam by hand and watch the input change; a stuck input under that test points to supply or wiring, not polarity.

What happens if the crate stalls between B1 and B2?

Nothing in the sequence breaks. The program left the B1 step when the crate arrived and is waiting for B2 to fall, so the belt 1 output stays on and the belt keeps driving. When the crate finally reaches B2, the falling edge still fires and the cycle completes. If the output is on and the belt is not turning, the fault is in the drive, the wiring or the output mapping, not in the logic.

Should belt 1 stop when the crate reaches B2?

The functional description fixes only the start events, so either behavior works, but choose one and model it deliberately. Stopping belt 1 at the B2 transition is the cleaner choice: nothing else is on that belt, so it avoids empty running and wear. Keeping it running is defensible only if a second crate can be loaded right behind the first, which this sequence does not do.

What if the sequence is reset while a crate is still on the belts?

After a reset the chain is back in idle but the crate is not: no step is waiting for it, and the next start would load a second crate into a line that already holds one. Give the chain a recovery path before commissioning: either a reset that purges both belts, running them longer than the full carry time from the loading point to the ramp, or a documented manual removal of the stranded crate before restart. A bare reset that only drops the outputs is the one option to rule out.

Can I invert the signals in software and keep NO-style logic?

You can, with a negation instruction or an inverted internal tag, but the raw input then disagrees with every schematic, and the next technician reads the wrong state online. If you normalize, name the new signal for what it means, for example a crate-at-B1 memory bit that is TRUE when the beam is blocked, and leave the input tag as wired. The conditions in this sequence are short enough that writing them on FALSE directly is clearer.

Keep reading

  • Explainer

    Why per-product conveyor speed changes at the handoff, not the batch

    Trigger each conveyor's speed change from a photoelectric sensor at its own inlet, where the belt takes the box over, instead of from the feeder's batch change: 2.4 m/min for box type 1, 1.2 m/min for box type 2. Three conveyors of different length then switch at three different moments, as the new batch front reaches each one, and stay fully independent.

    Sensors, encoders and machine vision on the machine

  • Explainer

    Sensor Spacing Rules for Detecting Box Length With Two Sensors

    Two sensors sort boxes by length only when their spacing separates the classes: the longest reject box stays shorter than the spacing and the shortest pass box runs longer, each by at least one beam width plus placement tolerance. When every box is shorter than the spacing, use the timed gap t = (D − L − w)/v at a measured belt speed, and carry each reject decision to the pusher in retained per-box state or encoder counts.

    Sensors, encoders and machine vision on the machine

  • How-to

    How to Build a DIY Belt Conveyor Scale With One Load Cell

    Yes, but only as a calibrated system: suspend one idler on a load cell, keep it within 1 mm of its neighbors, measure belt speed at a non-drive pulley, and multiply load per foot by speed. Calibrate the span against weighed material. Expect percent-level totals, not 5 lb accuracy on short runs.

    Sensors, encoders and machine vision on the machine