AI-POWERED DOCS
What do you want to know?
Step 5: Setting Up Outputs
Your AI model is trained. Now decide what the camera does with each pass/fail result, and where it sends it.
There are two questions to answer:
- How is pass/fail computed? Basic mode (rules) or Advanced mode (Node-RED).
- Where does the result go? Standalone (just the camera UI), to a PLC, or to physical digital outputs.
The two questions are independent. Pick your scenario below for the exact mode + destination combination you need, then read the relevant sections in detail.
What are you trying to do?
Pick your scenario — see exactly which mode and destination you need
The page below covers everything in detail. This picker is a shortcut to the right combination for your line.
Operators read pass/fail from the screen. No PLC, no external wiring beyond power and Ethernet to a laptop or HMI.
What to do
- Configure pass/fail rules in the IO Block (Basic mode).
- Done — results show on Live Preview and saved captures.
The OV20i web interface was redesigned in v2026.5. Check your software version in the top-right corner of the camera UI and pick the matching tab. Your choice carries across every page in this setup flow.
- Older versions
- v2026.5 and newer
In the older interface, trigger settings and the IO Block live together on this Outputs step. You choose the trigger mode and set the pass/fail logic on the same screen.
Trigger
Pick how captures happen from the Trigger Settings dropdown (Manual, Hardware, PLC, Aligner, or Interval).

IO Block (Basic mode)
Add a rule for each ROI (for example, class must equal "pass", or pixel count under N) and combine them into the overall pass/fail. For anything beyond per-ROI rules, click Advanced Mode to open Node-RED.

The concepts in the rest of this page (logic modes, output destinations, PLC integration, trigger modes, and deploy) apply to this interface.
This stage is two steps: Step 5: Trigger and Step 6: IO Block.
Step 5: Trigger
In the recipe editor, open Step 5: Trigger and pick what fires the camera from the Trigger source dropdown. Each mode explains itself, and any parameters for the selected mode appear directly below the dropdown.

| Trigger source | Fires when | Best for |
|---|---|---|
| Manual HMI Trigger | an operator taps a button on the HMI | testing and setup (no parameters) |
| Hardware Trigger | a 24 V signal hits a digital input (photo-eye, PLC output) | the lowest latency on automated lines |
| PLC Trigger | a bit on the EtherNet/IP assembly flips | when the PLC owns the sequencing |
| Interval Trigger | a fixed time period elapses | monitoring and timelapse tasks |
| Aligner Trigger | the Aligner detects a new part (with a debounce window) | parts arriving at unpredictable times |
Step 6: IO Block
The IO Block is where you assign the pass/fail rules and logic for the trained model, then send that result out of the camera, to a PLC or on to the next step in your line. It opens in Basic mode. The header has a Save action, a Swap to Advanced Mode button that replaces the whole block with the Node-RED editor, and two tabs: Rules & Outputs and Save Images.
The shape of a rule depends on your model type, so pick the matching tab below. (This toggle stays in sync with the one on Step 4.)
- Classifier
- Segmenter
Rules. A rule defines what counts as a PASS. Click Add rule to add one. Each ROI-level rule reads left to right and has four parts:
- Which ROIs the rule covers. Open the selector to pick an Inspection Type, which selects all of its ROIs at once (shown as "+ 11 ...", for example), or drill in to choose specific ROIs.
- Metric. Either Predicted class or Confidence.
- Operator. For a class: equals, not equals, contains, or doesn't contain. For confidence: a numeric comparison against a threshold.
- Value. For example,
Predicted classequalsPass.

For a segmenter there's no single per-ROI class to test, so the rules threshold the defect masks the model produced instead. Rules are organized into Rule Groups (each group evaluates a set of ROIs together), and Add rule builds a rule with five parts that read left to right:
- Class. Which segmentation class the rule looks at, for example Hole.
- Metric. A geometric measurement of that class's blobs. The dropdown (also under View metrics reference) covers Pixel Count, Perimeter, Major Axis Length, Minor Axis Length, Center X / Y, Centroid X / Y, and Angle, each with a Global variant that measures in full-image coordinates instead of inside the ROI.
- Aggregation. How the metric is combined across all the blobs found: Any, All, None, Highest, Lowest, or Sum.
- Operator. A numeric comparison: greater than, less than, equal to, and so on.
- Value. The threshold to compare against.
Read end to end, a rule like Hole / Pixel Count / All / > / 100 means "fail if all of the detected Hole blobs are larger than 100 pixels." This is what lets a segmenter fail a part on the size, shape, count, or position of a defect, not just its presence.

Test and reference controls. A few helpers sit alongside the rule list:
- View metrics reference lists every field you can build rules on.
- Capture & test rules grabs a frame and shows how your rules evaluate against the live capture.
- Prev / Next step through captures so you can sanity-check the logic before deploying.
Overall result. Combine your rules into the single pass/fail the camera reports. Choose All rules pass (AND) or Any rule passes (OR). That one global pass/fail is what travels to a PLC, the HMI, and the digital outputs.
Digital Outputs (DO). Drive the camera's two physical output pins straight from the Basic IO block, with no Node-RED required. A status line shows how many of the two pins are configured. For each pin, DO0 (pin 10) and DO1 (pin 11), set three things:
- Source. The Overall result, or a Specific rule.
- Behavior. Latch holds the state until the next result; Pulse fires briefly, which suits a one-shot reject solenoid.
- Polarity. N.O. (Normally Open) or N.C. (Normally Closed).
That is all it takes to wire a pass-green, fail-red stack light or a reject gate.

Save Images. The Save Images tab chooses which captured frames are written to the Library for later review: All inspections, Fail only (recommended for retraining), Pass only (useful for golden-sample audits), or None.

Advanced Mode. When your logic outgrows per-ROI rules, for example time-series checks, custom PLC data, routing to MQTT, MES, or FTP, or email and Teams alerts, click Swap to Advanced Mode to open the full Node-RED editor covered below.
The global pass/fail
Every capture produces a single binary result: pass or fail. Even if you have 50 regions of interest (ROIs) doing complicated analysis, it all boils down to one answer: is this part good or bad?
That single global pass/fail is what gets sent to your PLC, HMI, stack light, reject gate, or any other system. The camera computes it on every capture; what changes between Basic and Advanced mode is how you express the rules that produce it.
Pick a logic mode
Basic mode: when to use
Use Basic mode when your pass/fail rule is a simple combination of per-ROI results. Examples:
- "All ROIs must be class = 'pass' for a global pass"
- "ROI 1 and ROI 2 must both equal 'present', ROI 3 must equal 'aligned'"
- "Defect pixel count under N for the lead class"
If you can describe your rule in one sentence with AND / OR / threshold, Basic mode handles it. No code, no flow editor.
Set it up: In the IO Block, add a rule for each ROI (for example, predicted class equals Pass, or a confidence/pixel-count threshold), then choose how the rules combine into the overall pass/fail (all must pass, or any rule passes). The camera computes that pass/fail on every capture. For the exact click-path in your interface, follow the IO Block walkthrough in the version tab above.
On v2026.5 and newer, the Basic IO block maps DO0 / DO1 directly to a rule or the overall result (the Digital Outputs (DO) section in Step 6), with no Node-RED needed. On older versions, Basic mode only produces the pass/fail signal that PLCs and the camera UI read; to drive the physical pins you need Advanced mode. See Digital outputs (DO0 / DO1) below.
Advanced mode: when to use
Click Advanced Mode in the IO Block to enter Node-RED, a visual programming environment.

Use Advanced mode whenever:
- The pass/fail rule needs more than per-ROI thresholds, e.g., "fail if total defect area is X% of part area, AND there are at least N defects, AND average confidence is above 80%"
- You need time-series logic, "fail if 7 of the last 10 parts failed"
- You need to drive physical digital outputs (DO0 / DO1) for a stack light, reject gate, or relay
- You need to send custom data to a PLC beyond the standard pass/fail + ROI payload (e.g., the PROFINET
User Data - 64 bytesmodule, or extra EtherNet/IP assembly fields) - You need to route data anywhere external, MQTT, MES, FTP, REST APIs, email, Teams, databases
Every capture launches a new flow. The "All Blocks Output" node exposes all the metadata from the capture as a JSON object, class, confidence, pixel counts, areas, ROI names, timestamps, so any downstream node can branch on any field.
Things you can build:
- Custom pass/fail logic combining multiple ROI fields
- Stack-light, reject-gate, and relay control (digital outputs)
- Time-series analysis ("Have 7 of my last 10 parts failed? Alert the supervisor")
- Custom dashboards: Pareto charts, trend visualizations, production metrics
- Data routing to FTP, MES systems, databases
- Barcode integration linking inspection results to part serial numbers
- Conditional image saving (e.g., save only on fail)
- Email / Teams / Slack notifications
- Communication protocols: RS232, RS485, MQTT, HTTP/HTTPS, OPC-UA
Importing and exporting flows
You can import and export Node-RED flows as JSON. This lets you back up your logic, share flows between cameras, or deploy flows generated by the Auto-Integration Builder.
To access import/export, click the hamburger menu (three horizontal lines) in the top-right corner of the Node-RED editor:

To import a flow: Select Import from the menu. Paste the flow JSON into the text area, or click "select a file to import" to upload a JSON file. Choose whether to import into the current flow or a new flow, then click Import.

To export a flow: Select Export from the menu. Choose which nodes to export (selected nodes or current flow), then click Download to save as a file or Copy to clipboard to paste elsewhere.

Build flows instantly with Auto-Integration Builder
Don't learn Node-RED from scratch. The OV Auto-Integration Builder at tools.overview.ai generates production-ready Node-RED flows from plain English descriptions.
How it works:
- Open tools.overview.ai and select Auto-Integration Builder
- Describe what you want in plain English. For example: "Send an email when 3 failures happen in a row" or "Save fail images to an FTP server with the part serial number"
- The AI generates a complete Node-RED flow using 50+ available node types
- Review the flow, deploy it to your camera with one click
Supports:
- Communication protocols: MQTT, Modbus TCP, OPC-UA, HTTP/HTTPS, RS232, RS485
- Data routing: FTP, databases, MES systems, cloud storage
- Logic: Time-series analysis, conditional branching, aggregation
- Notifications: Email, Microsoft Teams, Slack, webhooks
- Hardware I/O: Stack lights, reject gates, conveyors, PLCs
You can also use Modify Mode: paste an existing flow and describe what you want changed. The builder updates the flow while preserving your existing logic.
Even if you've never used Node-RED, the Auto-Integration Builder lets you set up complex integrations in minutes. Describe what you want, review the generated flow, and deploy.
Output destinations
You've decided how pass/fail is computed. Now decide where it goes. There are three destinations, and each has different requirements:
| Destination | Logic mode required | Use when |
|---|---|---|
| Standalone (camera UI / saved images only) | Basic or Advanced | Operators read pass/fail from the screen; no other system needs the result |
| PLC (EtherNet/IP, PROFINET) | Basic or Advanced | A PLC drives the line and needs the inspection result |
| Digital outputs (DO0 / DO1) | Basic (v2026.5+) or Advanced | A stack light, reject gate, relay, or any physical device on the I/O connector |
You can use more than one destination at the same time, e.g., send pass/fail to a PLC over EtherNet/IP (the data block a PLC reads) and drive a stack light through DO0.
Standalone
If the camera is the whole system, no PLC, no external wiring beyond power and Ethernet to a laptop or HMI, you don't need to do anything beyond configuring the IO Block. The pass/fail result shows on the Live Preview screen and in the saved capture history. Both Basic and Advanced mode work; pick whichever matches your logic complexity.
You can monitor the real-time state of digital I/O pins and EtherNet/IP connections on the I/O Live Monitor page:

PLC (EtherNet/IP and PROFINET)
The OV20i has native EtherNet/IP and PROFINET support, so the standard pass/fail + per-ROI result payload travels to your PLC without any Node-RED. You import the EDS or GSDML file we ship (links at the bottom of this page), point the PLC at the camera's IP, and the camera's standard assembly / module exposes the result fields directly.
When do you need Node-RED for PLC integration? When the standard payload isn't enough, e.g., you want to send extra ROI fields, custom defect codes, computed values, or a serial number from a barcode reader. In that case:
- EtherNet/IP: extend the assembly with custom fields written from a Node-RED flow
- PROFINET: add the
User Data - 64 bytesandUser Results - 64 bytescustom modules in your TIA Portal device config and write to them from a Node-RED flow
See Connect to PLC (EtherNet/IP & PROFINET) for the wiring, files, and step-by-step setup.
Digital outputs (DO0 / DO1)
The OV20i has two digital outputs on the M12 connector, DO0 (pin 10, violet) and DO1 (pin 11, orange), each NPN sinking (the output pulls the line to ground), rated 100 mA per line. Use them to drive stack lights, reject gates, relays, indicator LEDs, or anything triggered by a 24V sinking signal.
On versions before v2026.5, there is no native "send pass to DO0" toggle in Basic mode, so you need an Advanced mode Node-RED flow with a Digital Output node wired to the inspection result. On v2026.5 and newer, you can map DO0 / DO1 straight from the Basic IO block (latch/pulse, N.O. / N.C.) without Node-RED.
The simplest "pass-lights-green, fail-lights-red" flow uses two Digital Output nodes wired to the pass/fail branch. For step-by-step wiring + Node-RED setup, see Set Digital Output Logic.
Once the pins are wired and a flow is in place, you can encode richer signals than just pass/fail, different defect classes can map to different pin combinations, or you can pulse a pin for N milliseconds to drive a one-shot reject solenoid.
Trigger modes
Configure how captures happen. The five trigger modes are the same in both interface versions:
| Trigger | Description | Best for |
|---|---|---|
| Manual | Button press on the camera UI | Testing and setup |
| Hardware (digital input) | Electrical signal from a sensor | Automated lines with proximity sensors |
| PLC | Command from your industrial controller | Fully automated with precise timing |
| Aligner | Auto-triggers when part alignment is detected | When parts arrive at unpredictable times |
| Interval | Captures at set time intervals | Continuous monitoring |

Incorrect wiring on the I/O connector can damage the camera's output circuitry or connected equipment. Always verify wiring with a multimeter and run a bench test before connecting to production machinery.
The camera's digital outputs have a maximum current rating. Check the hardware specifications before connecting high-power devices such as solenoids, relays, or motors. Use an intermediate relay or driver board if your load exceeds the rated output current.
Deploy
- Activate the recipe
- Set your trigger mode
- Run test parts and verify the pass/fail output matches expectations
- Check edge cases, especially the hardest parts to classify
- Monitor for the first hour to ensure consistency
Download PLC integration files
If you're integrating with a PLC, download the configuration files and sample code:
EtherNet/IP (Allen-Bradley)
| File | Description |
|---|---|
| OV20i EDS File | Electronic Data Sheet for Studio 5000 (ControlLogix/CompactLogix) |
| Recipe Switch Routine | Ladder logic for changing recipes via PLC |
| Camera Trigger Routine | Ladder logic for triggering inspections and handling results |
PROFINET (Siemens)
| File | Description |
|---|---|
| OV20i GSDML File | Device description for TIA Portal |
Import the EDS or GSDML file into your PLC programming environment before configuring the connection. The L5X routines are ready-to-use ladder logic that you can import directly into Studio 5000.
Output checklist
Before going live, confirm:
- IO rules configured (pass/fail logic matches your requirements)
- Trigger mode set (manual, hardware, PLC, aligner, or interval)
- Recipe activated
- Test parts run through (pass/fail output matches expectations)
- Edge cases tested (hardest parts classified correctly)
Your AI inspection is now live. For ongoing optimization, see Improving Your Model.