System designGuide

Machine vision PLC integration on the production line

Machine vision PLC integration on the line: GigE Vision camera, vision controller, EtherNet/IP, PROFINET or Modbus TCP results, digital I/O handshake.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01The decision: speak the line's four standards
  2. 02The reference architecture
  3. 03The camera layer: GigE Vision and GenICam
  4. 04The compute layer: a vision controller, not an office PC
  5. 05Talking to the PLC: match the protocol the line already speaks
  6. 06The handshake: trigger, strobe and results
  7. 07Worked example: one station at sixty parts a minute
  8. 08When the standard answer is wrong
  9. 09Checks before you quote the job
  10. 10Questions

Coming from custom or defense imaging into factory automation, the hard part is rarely the imaging: it is the line. Plants do not adopt a newcomer's architecture; they expose a fixed set of interfaces and expect every station to speak them. The open architecture worth building toward is a set of four standards rather than a product: a GigE Vision camera with GenICam, a vision controller with segregated networks, results exchanged with the PLC over EtherNet/IP, PROFINET or Modbus TCP, and a digital I/O handshake for trigger and strobe. Build your software against those four and it plugs into lines regardless of who built them. This guide gives the architecture, the protocol decision, the handshake design and a worked station example with the arithmetic shown.

The decision: speak the line's four standards

You will not find a line vendor whose controller your suite simply joins, and you do not need one. Every PLC-controlled line, whatever its maker, exposes the same four attachment points, and each one is standardized:

  • Camera interface: GigE Vision with GenICam. Any compliant software drives any compliant camera over standard Ethernet, on cable runs up to 100 m of Cat5e/6. Your acquisition layer survives a customer's camera choice.
  • Results protocol: EtherNet/IP, PROFINET or Modbus TCP. The PLC picks; you implement. These three cover the line controllers you will meet.
  • Digital I/O handshake. A 24 V trigger line in, busy and results-ready lines out. Any PLC can drive them.
  • Strobe timing from your controller. Your light channels fire in lockstep with the camera exposure, so image quality stays your responsibility and your differentiator.

The order of decisions is fixed: ask the controls engineer which PLC the line runs, which protocol it speaks and where the register map lives. Everything above that line is your design space. For the same story from the controls side, read getting started with machine vision for PLC programmers.

The reference architecture

Picture one station with three segregated networks:

  • A camera network: one GigE Vision camera, or several, on a dedicated network card in the vision controller, through its own switch. Enable jumbo frames of about 9 kB on that card and that switch only.
  • A PLC network: a second card on the line's industrial Ethernet subnet, carrying results, recipe writes and diagnostics.
  • A plant network: an optional third card for MES or remote access, firewalled by IT.

The vision controllers built for this are fanless, DIN-rail industrial computers with several network cards, and the digital I/O lands on the same box. Nothing in this layer knows or cares whose software runs on it — that is the openness you sell.

If the cell includes a robot, keep the PLC as the orchestrator: vision writes offsets to the PLC or straight to the robot controller, and the split of responsibilities is laid out in robot vision cell control architecture for palletizing. Cells that fuse PLCs, robots and vision follow this same pattern, as a walkthrough of automating EV production with PLC, robot and vision integration shows end to end.

The camera layer: GigE Vision and GenICam

GigE Vision won the factory floor for reasons that matter to an integrator: 100 m cable runs, multi-camera fan-out through a switch, and a GenICam feature layer that names every control the same way on every camera — Width, ExposureTime, TriggerSource. Your software talks to the standard, not to a vendor SDK. What that interoperability actually guarantees is covered in what GigE Vision guarantees for software compatibility, and the cable and bandwidth trade-offs in GigE Vision camera selection: bandwidth, cables and software.

Where product moves past the lens, choose a global shutter. The MV-CU020-90GC is a 2.5 MP global-shutter GigE camera in a C-mount that fills this role.

Area scan camerasHikrobot MV-CU020-90GC 2.5 MP Area Scan Camera, GigE, GMAX4002, ColorMV-CU020-90GC
Sensor format
1/1.7"
Lens mount
C-mount
Interface
GigE
Resolution
Up to 3 MP
$309.00View partBuild a system with it

Browse the area scan cameras range or filter by interface in the camera finder when the customer dictates resolution, mount or frame rate.

The compute layer: a vision controller, not an office PC

Your software needs an industrial home: fanless, DIN-rail mounted, multiple network cards for the segregated subnets, and ideally PoE camera ports and built-in light channels so one box owns acquisition, illumination and results. Bringing the camera onto that box is covered in connecting a GenICam camera to an industrial controller over Ethernet; when several cameras share it, follow assigning cameras to ports reliably in a multi-camera system.

The entry point is the MV-VC3301H-128G66: an Intel Core i3, 8 GB of RAM, a 128 GB SSD, four built-in light channels, PCIe expansion and no PoE.

Vision controllersHikrobot MV-VC3301H-128G66 I3-8100, 8GB+128G SSD, No PoE, PCIe expansion supported, Incl. VM6200Pro licenseMV-VC3301H-128G66
LAN ports
5+ LAN ports
USB 3 ports
3-4 USB 3 ports
Light outputs
4 built-in channels
Memory
8 GB
$2,419.00View partBuild a system with it

For larger cells, step up to the MV-VC5525-256G70-NN: 32 GB of RAM, eight built-in light channels and PoE camera ports, so a single cable per camera carries power and video.

Vision controllersHikrobot MV-VC5525-256G70-NN VC5000 Vision Controller, 12th-I5, 32GB+256G SSD, Supported PCIEMV-VC5525-256G70-NN
LAN ports
5+ LAN ports
USB 3 ports
3-4 USB 3 ports
PoE
PoE camera ports
Light outputs
8 built-in channels
$4,479.00 · quotedView and quoteBuild a system with it

The VC3000 and VC5000 series bracket the choice:

Specification MV-VC3301H-128G66 MV-VC2140-128G40-1T MV-VC5525-256G70-NN
CPU Intel® Core i3-8100 Intel® Processor N97 Intel® Core i5-12400
Memory 8 GB 8 GB 32 GB
Storage 128G SSD 128 GB SSD + 1 TB HDD 256 GB SSD
GPU Intel® HD Graphics 630 Intel® UHD Graphics Intel® UHD Graphics 730
Operating system Windows 10 64-bit, Not activated Unactivated 64-bit Windows 10 LTSC 21H2 Unactivated Windows 10
Encryption method VM6200Pro license key Not support –
Video output HDMI interface × 1, VGA interface × 1; Supports independent display output at the same time; Max. resolution 1920 × 1080 @ 60 Hz HDMI interface × 1, VGA interface × 1; Supports independent display outputs at the same time; Max. resolution 1920 × 1080 @ 60 Hz HDMI interface × 1, VGA interface × 1; Supports independent display output at the same time; Max. resolution 1920 × 1080 @ 60 Hz
Digital I/O 8 digital isolated inputs supported; 16 opto-isolated outputs supported (NPN/PNP switchable) Opto-isolated input × 8; Opto-isolated output × 8 Opto-isolated input × 8; Opto-isolated output × 12 ( supports NPN/PNP switching), digital-isolated low-side driver output × 8; Non-isolated bi-directional differential I/O × 4
Network interface 6× Gigabit Ethernet ports GigE interface × 4 GigE interface × 7, including interface for PoE × 4
USB Interface USB 2.0 × 4; USB 3.0 × 4; Built-in USB 2.0 × 1 USB 2.0 × 2; USB 3.0 × 2 USB 2.0 × 4, USB 3.0 × 4, built-in USB 2.0 × 1
Serial Port 2× full-function RS-232, RS-485/RS-422 switchable RS-232 × 1, supports switching to RS-485 or RS-422 RS-232 × 2 by default, supports switching to RS-485 and RS-422
Light interface 4-channel 24 V constant-voltage light drive, Max. power per channel: 72 W, Max. power (4 channels): 150 W Light interface with 24 VDC constant voltage × 4; (Brightness is adjustable. Max. current 3 A for single light interface, and total max. power consumption 80 W. Supports light mode switching between strobe and solid via external control) 24 VDC constant voltage × 8; (Max. power consumption of single channel is 72 W, total max. power consumption 190 W)
Price $2,419.00 $1,679.00 $4,479.00 · quoted

All 3 share: Certification CE, KC. Values as printed in each product's data sheet; open a part for its drawing and full specifications.

The MV-VC2140-128G40-1T in the middle of that table carries an N97 processor, 8 GB of RAM, a 128 GB SSD and a 1 TB drive — useful when the customer wants image archives kept on the station.

Talking to the PLC: match the protocol the line already speaks

The controls engineer decides the protocol, and the decision tree is one question deep:

Protocol Where you meet it Transport You expose
EtherNet/IP Lines built on North American control platforms CIP over TCP port 44818 Tags in an EDS file
PROFINET European and export lines Real-time classes, cycles of 1–10 ms I/O addresses via a GSDML file
Modbus TCP Any PLC, plus legacy and mixed lines TCP port 502 Holding registers and coils

Decide like this: a named protocol at the survey means you implement that protocol. An unknown or mixed plant means you ship Modbus TCP first, because nearly every PLC reads holding registers over port 502, then add the other two as the pipeline demands. A full register-map walkthrough is in vision controller Modbus communication: a PLC integration guide.

Two facts make the Ethernet layer easy to get right. PROFINET and Modbus TCP can share one port on the controller — they are independent stacks — so one cable to the PLC switch can serve a PROFINET I/O connection and a Modbus diagnostic channel. Camera video must never share that subnet: GigE Vision traffic at near line rate will disturb PROFINET cycles measured in milliseconds. Ship the GSDML and EDS files with your station image; without them the controls engineer cannot add you to the project at all. Map your alarms into status words as shown in vision system diagnostics to PLC status and alarm mapping.

The handshake: trigger, strobe and results

Trigger and strobe belong on wires; results belong on the network. The four-step handshake:

  1. The PLC writes the part ID and recipe number to your registers and raises the trigger line, or a protocol trigger bit.
  2. Your controller asserts busy, fires the strobe channel, and the camera exposes on its hardware trigger input.
  3. Processing done, the controller writes results — mirrored part ID, offsets, defect counts — and raises results-ready.
  4. The PLC reads, drops the trigger, and the controller clears ready. The state machine returns to idle.

Wiring details that bite newcomers: camera trigger inputs are opto-isolated and accept 24 V PLC levels, so settle whether you need a camera GPIO cable before assuming a pinout; the camera input must be set as the trigger source, or you hit the GenICam line settings behind an undetected trigger; and if you fire from software instead, work through camera trigger ready timeouts before blaming the PLC. When several parts are in flight, match frames to triggers by timestamp as described for asynchronous vision result frame matching.

On the illumination side, a light controllers box gives you timed, overdrivable strobe pulses. A unit like the LS-CTL-0070 drives four channels of 24 V lights at up to 200 W with strobe support and an RS-232 port for setup.

Light controllersDigital control box, 4 ch, 200 W, RS232 (LS-CTL-0070)LS-CTL-0070
Output
Constant voltage 24 V
Channels
4 channels
Control
Digital
Feature
Strobe
$549.00View partBuild a system with it

Worked example: one station at sixty parts a minute

A part 150 mm × 110 mm rides a belt at 0.5 m/s, so the line presents a part every second. The smallest defect to catch is 0.5 mm, and 0.05 mm per pixel puts ten pixels across it — comfortable.

Sensor and scale. A 12 MP camera with a 4000 × 3000 sensor, a 1/1.7-inch format about 7.4 mm × 5.5 mm, so 1.85 µm pixels:

FOV = pixels × scale = 4000 × 0.05 mm = 200 mm wide, 150 mm high m = sensor width / FOV = 7.4 / 200 = 0.037

The part sits inside 200 mm × 150 mm with 40–50 mm of margin for position wander.

How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.

Lens and working distance. With a 25 mm C-mount lens:

WD = f × (1 + m) / m = 25 × 1.037 / 0.037 ≈ 700 mm

Run your own sensor, lens and distance through the field-of-view calculator.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

Exposure. Allow half a pixel of blur, 0.5 × 0.05 mm = 0.025 mm at the part:

t = blur / speed = 0.025 / 500 = 0.00005 s = 50 µs

Fifty microseconds is dark territory for continuous lighting and easy for a strobed LED, which is why the light controller exists: the strobe pulse equals the 50 µs exposure.

Aperture. At f/4 the Airy disc is 2.44 × 0.55 µm × 4 ≈ 5.4 µm, about three pixels — sharp. Depth of field with a two-pixel blur circle, c = 3.7 µm, is an estimate worth having:

DOF ≈ 2 × c × N × (1 + m) / m² = 2 × 0.0037 × 4 × 1.037 / 0.037² ≈ 22 mm

The part height varies ±10 mm, so ±11 mm of that estimate covers it.

Result deadline. A 12 MB mono frame over GigE at the roughly 100 MB/s a real link delivers:

transfer = 12 MB / 100 MB/s = 120 ms

Exposure 50 µs, transfer 120 ms, processing 250 ms, PLC scan 20 ms: about 390 ms against a 1,000 ms part pitch. The station answers within half a pitch, with margin for retries. At 300 parts a minute the same camera cannot ship full frames — 100 MB/s divided by 12 MB tops out near eight frames a second — so cut to 6 MP, send an ROI, or return pass/fail only.

When the standard answer is wrong

  • IT forbids a third-party device on the PLC subnet. Ship results as digital I/O plus Modbus RTU over RS-232 or RS-485: sixteen result bits, a four-bit command nibble and a heartbeat cover most sorting decisions. You lose data richness, not the sale.
  • The line runs faster than ten parts a second. Full-frame GigE transfer sets the ceiling near 8 fps for 12 MP, so process in the controller and send decisions, not images, or move the backbone to 10GigE.
  • The task is presence detection for guarding. That is a safety-rated sensor job, not vision; decline that scope regardless of architecture.

Checks before you quote the job

  • PLC maker, model and firmware noted; protocol named; register map agreed in writing and versioned.
  • Result deadline computed against part pitch for the worst-case frame size and camera count.
  • Network card count at least three for camera, PLC and plant traffic; jumbo frames planned for the camera switch only.
  • PoE budget checked when cameras take power from the controller.
  • Trigger source and strobe channel count match the number of lights you will fire.
  • Global shutter on every station where product moves during exposure.
  • GSDML or EDS file, and a Modbus register list, in the deliverables.
  • A spare camera and light on the shelf, and agreed response times for line-down events.

When the architecture is settled, start at the controller step of the configurator to match a box to your camera count and networks, or send the line details to the applications team and we will size the station with you.

Questions

Which industrial Ethernet protocol should a new vision system support first?

The one the line PLC already speaks — that is the whole decision. Ask for the PLC model and protocol at the plant survey. If the plant runs mixed lines or you must ship hardware before knowing, implement Modbus TCP first: it exposes results as holding registers over TCP port 502 and nearly every PLC reads it. Add EtherNet/IP or PROFINET when your customer pipeline names them, and carry one integration across all three.

Can PROFINET and Modbus TCP share one network port on the vision controller?

Yes. They are independent stacks — Modbus TCP as sessions on TCP port 502, PROFINET as its own EtherType with cycle times from 1 ms — so one cable to the PLC switch can carry both a PROFINET I/O connection and a Modbus diagnostic channel. What must not share that port is camera video: GigE Vision traffic at near line rate disturbs real-time cycles. Keep one network card for cameras and one for the PLC.

How do I compute the trigger-to-result time budget?

Start from the part pitch. At sixty parts a minute the line presents a part every 1,000 ms. Add the pieces: a 50 microsecond exposure is negligible, a 12 MB mono frame crosses GigE at about 100 MB/s usable, so 120 ms, then your processing time, then the PLC scan, about 20 ms on a busy line. If exposure plus transfer plus processing stays under half the pitch you have margin for jams and retries; if not, cut resolution, send an ROI, or return pass/fail only.

Is hardware digital I/O or network triggering better for the camera?

Use both, for different jobs. Trigger and strobe go over digital I/O: a 24 V line from the PLC into the camera's opto-isolated input gives microsecond repeatability and survives network hiccups, and the light controller's strobe channel fires on the same pulse. Results, recipe numbers and diagnostics go over Ethernet, where you have registers instead of a handful of wires. Set the camera input as the GenICam trigger source and test it with a bench supply before commissioning.

Can the vision system's pass signal be used as a safety interlock?

No. A vision pass result is a quality decision, not a safety permission, and standard cameras and controllers are not safety-rated devices. Guard doors, light curtains and e-stops stay wired in the safety PLC or safety relay circuit, untouched by vision. If the task is really stop the machine when a person appears, that is a job for a safety-rated scanner or light curtain; the vision system watches product, never people or guarding.