addaScan an addanode brand home
Guide

Connecting a vision system to your PLC and reject mechanism

Trigger, result handover, tracking, reject confirmation and fault handling, for automation and controls engineers.

By addaScan engineering teamTechnical review: Frank GuoPublished 8 min read

Describe your control system
// Short answer

A sensor triggers the camera when a product arrives, the station decides pass or fail, and the result goes to the line PLC over digital I/O or an industrial network, depending on the camera or controller model. The PLC tracks the failed product to the reject, by time delay on constant-speed lines or by encoder counts where speed varies, fires the reject and, with a confirmation sensor, checks the product left. Fault behaviour is agreed in the design.

Key points

  • The camera decides pass or fail; the PLC tracks the product and fires the reject.
  • Digital I/O is simple and direct; an industrial network carries more data. Which protocols are available depends on the camera or controller model.
  • A fixed time delay suits constant-speed lines; an encoder keeps the reject on the right product when speed changes.
  • A reject is only finished when a sensor confirms the product left the line.
  • Behaviour on faults is designed, written down and tested. It is general control practice, not a certified safety function.

The signal chain at a glance

A vision station does not reject anything by itself. It decides whether a product passes; the line's PLC decides what happens next. Between the two sits a chain of signals: a trigger, an exposure, a decision, a result, tracking, the reject and a confirmation. Each link can fail, and most problems on real lines come from the links around the camera rather than from the inspection itself. The inspection technology overview shows how the parts of a station fit together.

The diagram shows the order of events for one failed product. The gaps between them depend on line speed, processing time and the distance from camera to reject, so they are shown without values.

[Schematic]Timing diagram · illustrative · not to scale

Swipe sideways to see the whole drawing →

Timing diagram from trigger to reject confirmationSeven signal lanes on a common time axis without values. The trigger pulse starts the exposure; the image is processed; the result is sent to the PLC; the PLC tracks the product by time delay or encoder counts; the reject output fires when the product reaches the reject; a confirmation sensor sees the product leave inside a confirmation window.[1] TRIGGER[2] EXPOSURE[3] DECISIONPROCESS[4] RESULT TO PLCFAIL + RESULT VALID[5] PLC TRACKINGDELAY OR ENCODER COUNT[6] REJECT OUTPUT[7] CONFIRMATIONCONFIRM WINDOWTIME → (ILLUSTRATIVE, NOT TO SCALE)
[1] Trigger: a photo-sensor or encoder position signals that a product is in view.
[2] Exposure: the camera captures the image, with the light strobed or on.
[3] Decision: the inspection runs on the recipe for the current product.
[4] Result: pass/fail with a "result valid" signal, over I/O or network.
[5] Tracking: the PLC holds the result until the product reaches the reject.
[6] Reject: the air jet, pusher or diverter fires on the failed product.
[7] Confirmation: a sensor checks the product left the line within the window.

Trigger: telling the camera a product has arrived

Most stations use a photo-sensor mounted just before the camera. When the product breaks the beam, a hardware trigger goes to the camera or vision controller, and the light is strobed or switched on for the exposure. The sensor must see every product once and only once: gaps between products, transparent containers and wobbling products are the usual causes of missed or double triggers.

An encoder on the conveyor gives position instead of time. It is used when speed varies, when products are close together, or when a line-scan camera builds the image line by line as the product moves. The same encoder is often used for reject tracking.

A short exposure keeps a moving product sharp; how short depends on speed and the smallest detail to be seen, and is set during the sample test.

Handing over the result: digital I/O or network

Digital I/O is the simplest route: the station switches outputs wired to PLC inputs, typically pass/fail, a "result valid" pulse that tells the PLC when to read it, ready, and alarm. It is fast, easy to test with a meter and independent of network settings. Output type (NPN or PNP) must match the PLC input card.

An industrial network carries more: the codes read, measurements, the active recipe, counters and a sequence number for each product. It needs the right protocol on both sides.

Protocol support depends on the camera or controller model, not on the software brand as a whole. For the platform we use, HIKROBOT's catalogue states that VisionMaster supports TCP/IP, Modbus, serial port, UDP, EtherNet/IP and other common industrial protocols. Its smart code readers list PLC protocols per model; the IDH7000 row, for example, lists SmartSDK, TCP, FTP, PROFINET, EtherNet/IP, Modbus, UDP and serial, while other reader rows list MELSEC/SLMP and Fins (HIKROBOT Machine Vision Smart Product Catalog, 2025 Q4). PROFINET is therefore listed on specific devices, not everywhere. We check the exact model against your PLC before quoting; where the protocol does not match, a gateway or hard-wired I/O is an option. addaScan builds stations on HIKROBOT VisionMaster; this website does not claim any official HIKROBOT partnership or distributor status.

Tracking the failed product to the reject

The camera and the reject are usually some distance apart, and other products pass in between. The PLC must fire the reject on the right product.

Time delay. The PLC starts a timer when the fail result arrives and fires the reject when it expires. This works on constant-speed lines where products do not slip. It goes wrong when the line slows, stops and restarts, or when products move at different speeds.

Encoder-based tracking. The PLC records the encoder position of each inspected product in a shift register (a queue of positions and results). When the conveyor has moved the product to the reject, the PLC fires. Because tracking follows distance, not time, it stays correct through speed changes and stops.

Two checks keep tracking honest: count triggers against results, so a missing result is noticed; and keep products from accumulating or changing order between camera and reject.

Confirming the reject

Firing the reject is not proof the product left. A confirmation sensor at the chute, in the bin, or just after the reject on the conveyor checks that the failed product left within an agreed window. If the product is still on the line, or a good product was removed, the PLC raises an alarm or stops the line. A bin-full sensor and an air-pressure switch complete the picture.

Designing for faults

What the line does when something goes wrong is a design decision, agreed with your production and quality teams and tested at FAT and SAT. The questions we work through include:

  • No result in time: is the product rejected, or the line stopped?
  • Camera or controller offline: how does the PLC know (heartbeat, ready signal), and does it stop the line, reject everything, or alarm?
  • Air pressure low: the reject may not work; should the line keep running?
  • Confirmation failed or bin full: alarm, stop, or both?
  • Trigger without a product, or a product without a trigger: how is each detected?
  • Inspection bypass: who may switch it off, how is it shown and how is it logged?

This is general control practice. It is not a certified machine-safety function; where a fault could harm people, that is handled by the machine's safety system and its risk assessment.

Selecting the recipe from the PLC

Each product has a recipe: its references, limits and expected codes. At changeover the PLC sends the recipe number or SKU, the station switches and reports back the recipe it is running, and the PLC checks they match before production restarts. Selection on the HMI also works, with access control. A code read from the product can cross-check that the right product is on the line.

Interface checklist

We agree these items in writing before the design is finished. See how we deliver a project for how FAT and SAT are run.

Vision station to PLC interface checklist
ItemWhat to agreeConfirmed during
Trigger sourcePhoto-sensor or encoder position; where it is mounted; one trigger per product.Site survey
EncoderWhether one is fitted or needed, and who reads it: camera, PLC or both.Site survey
Result signalsPass/fail, result valid, ready, alarm; output type matched to the PLC inputs.Design review
NetworkPLC make and model, protocol, and whether the chosen camera or controller lists it.Design review
HeartbeatHow the PLC detects that the station has stopped responding.Design review
TrackingTime delay or encoder-based shift register; distance from camera to reject.Design review
Reject actuatorAir jet, pusher or diverter; air supply and pressure monitoring.Site survey
ConfirmationSensor position, confirmation window, bin-full detection.Design review
Fault responsesAgreed action for no result, station offline, low air, failed confirmation, bin full.FAT and SAT
Recipe selectionHow the PLC or HMI selects the product, and how the station confirms it.FAT
DataWhich results, images and counters are kept, where, and for how long.Design review
ResponsibilitiesWho changes the PLC program, who wires the panel, who signs off each test.Quotation
// FAQ

Questions about PLC and reject integration

How does a vision system communicate with an existing PLC?
Either through digital outputs wired to PLC inputs, such as pass/fail, ready and alarm, or over an industrial network that can also carry data like codes read and recipe numbers. The available protocols depend on the camera or controller model, so the interface is confirmed against your PLC before quoting.
How is a failed product tracked to the reject mechanism?
The PLC stores each result and releases the reject when that product reaches the reject point. On constant-speed lines a time delay can be enough. Where speed varies or the line stops, encoder counts in a shift register follow each product by position rather than by time.
How can a line confirm that a rejected product was removed?
A sensor at the reject chute or bin, or just after the reject point on the conveyor, checks that the failed product left the line within an agreed window. If it did not, the PLC raises an alarm or stops the line, as agreed in the design.
Does VisionMaster support PROFINET?
Not as a general statement. HIKROBOT's 2025 Q4 catalogue lists PROFINET on specific smart camera and code reader products, and lists TCP/IP, Modbus, serial, UDP and EtherNet/IP for VisionMaster. For a PROFINET line we confirm the route per model, for example a device that lists it, a gateway or hard-wired I/O.
Who changes the PLC program?
This is agreed in the scope. Either your controls team or line builder makes the changes to a written signal specification, or it is part of our scope. Either way the signals are tested at FAT and SAT.
Is the reject logic a safety function?
No. Reject tracking and fault handling are general control practice, not a certified machine-safety function. Hazards to people are handled by the machine's safety system and its own risk assessment.

Sources

  1. HIKROBOT Machine Vision Smart Product Catalog, 2025 Q4 (PDF) (vendor catalogue, checked 2026-09-24; VisionMaster protocol list and code reader specification rows)
// Next step

Tell us about your line and PLC

Send the PLC make and model, the reject you have or need, and your line speed. We will propose the interface and the fault behaviour to agree.

Start an assessment