TL;DR — OPC UA for Machine Vision (OPC 40100-1)

Full spec: reference.opcfoundation.org/MachineVision/v100/docs

What Is It?

OPC UA Machine Vision defines a standardized OPC UA interface for integrating machine vision systems — cameras, smart sensors, multi-computer inspection setups — into production control and IT systems. It covers control, configuration management, recipe management, and result management of any vision system on the shop floor.

Think of it as the "universal plug" between a vision sensor and its PLC, MES, SCADA, ERP, or analytics system — replacing vendor-specific I/O, fieldbuses, and proprietary protocols.


The Problem It Solves

Without a standard interface, every vision system vendor invents their own way to:

  1. Control the system — start inspections, halt, reset, handle errors
  2. Manage configurations — calibrate and align supposedly identical vision stations
  3. Manage recipes — load, prepare, and switch inspection/measurement programs
  4. Retrieve results — get pass/fail, measurements, positions, images back to the line controller
  5. Monitor system state — production, standby, downtime (SEMI E10 categories)

This spec standardizes all of that into a single, vendor-independent OPC UA information model.


Core Concepts

TermDefinition
Vision SystemAny system (smart camera, sensor, multi-computer setup) capable of recording and processing digital images/video for industrial purposes.
ConfigurationSystem-specific parameters (calibration, alignment) ensuring different vision systems produce equal results for the same recipe.
RecipeProperties, procedures, and parameters describing a machine vision job. Content is opaque — treated as a binary blob.
JobA single execution of a recipe — e.g. inspect one part, measure a diameter, scan a surface.
ResultThe output of a job — measurements, pass/fail, coordinates, images, etc. Content is application-specific.
ProductA named reference used by external systems (MES, PLC) to select the right recipe without knowing internal recipe IDs.

Architecture Overview

flowchart TB
    PLC["PLC / MES / Client"]

    subgraph VS ["VisionSystemType"]
        SM["VisionStateMachine<br/>(Mandatory)"]
        CM["ConfigurationManagement<br/>(Optional)"]
        RM["RecipeManagement<br/>(Optional)"]
        RSM["ResultManagement<br/>(Optional)"]
        SSM["SafetyStateManagement<br/>(Optional)"]
    end

    PLC -->|"Reset / Halt<br/>SelectModeAutomatic"| SM
    PLC -->|"AddConfiguration<br/>ActivateConfiguration"| CM
    PLC -->|"AddRecipe / PrepareRecipe<br/>PrepareProduct"| RM
    RSM -->|"Results<br/>(ResultReadyEvent)"| PLC
    PLC -->|"GetResultById<br/>GetResultListFiltered"| RSM
    PLC -->|"ReportSafetyState"| SSM

    style PLC fill:#1d3557,color:#fff
    style SM fill:#2d6a4f,color:#fff
    style CM fill:#264653,color:#fff
    style RM fill:#264653,color:#fff
    style RSM fill:#264653,color:#fff
    style SSM fill:#264653,color:#fff

VisionSystemType — The Root Object

VisionSystem (VisionSystemType)
├── VisionStateMachine      (VisionStateMachineType)         [Mandatory]
├── ConfigurationManagement (ConfigurationManagementType)    [Optional]
├── RecipeManagement        (RecipeManagementType)           [Optional]
├── ResultManagement        (ResultManagementType)           [Optional]
├── SafetyStateManagement   (SafetyStateManagementType)      [Optional]
├── DiagnosticLevel         (UInt16)                         [Optional]
└── SystemState             (SystemStateDescriptionDataType) [Optional]

State Machines (The Heart of the Spec)

The spec uses hierarchical state machines. The top-level VisionStateMachine has an Operational state containing a mandatory AutomaticMode sub-state machine.

Top-Level: VisionStateMachineType

stateDiagram-v2
    [*] --> Preoperational: Power On
    Preoperational --> Halted: Halt()
    Preoperational --> Operational: SelectModeAutomatic()
    Preoperational --> Error: auto (error detected)
    Halted --> Preoperational: Reset()
    Error --> Preoperational: Reset()
    Error --> Halted: Halt()
    Error --> Operational: auto (error resolved)
    Operational --> Preoperational: Reset()
    Operational --> Halted: Halt()
    Operational --> Error: auto (error detected)
StatePurpose
PreoperationalInitial state after power-up or Reset. System must be brought to Operational.
HaltedIntended as final state — safe for power-down. Reached via Halt().
ErrorError preventing normal operation. Needs Reset() or auto-resolution.
OperationalNormal operation — always a composite state with a mode sub-machine (e.g. AutomaticMode).

Sub-Level: VisionAutomaticModeStateMachineType

stateDiagram-v2
    [*] --> Initialized
    Initialized --> Ready: PrepareRecipe() / PrepareProduct()
    Ready --> Initialized: UnprepareRecipe()
    Ready --> SingleExecution: StartSingleJob()
    Ready --> ContinuousExecution: StartContinuous()
    SingleExecution --> Ready: auto (job done) / Stop() / Abort()
    ContinuousExecution --> Ready: Stop() / Abort()
StatePurpose
InitializedManagement operations available (config, recipe). System not yet ready to run jobs.
ReadyRecipe prepared. System can accept StartSingleJob() or StartContinuous().
SingleExecutionAcquires data, runs one inspection job, returns to Ready.
ContinuousExecutionContinuously acquires and processes data until Stop() or Abort().

Each state can optionally have a VisionStepModelStateMachine for fine-grained synchronization with external systems (e.g. robot moves camera between positions, triggering step-by-step acquisition).


Configuration Management

Manages system calibration and alignment so that identical vision systems produce identical results.

MethodDescription
AddConfigurationUpload a new configuration (as file)
GetConfigurationListList available configurations
GetConfigurationByIdRetrieve a specific configuration
ActivateConfigurationActivate a configuration (only one active at a time)
RemoveConfigurationDelete a configuration

Key point: only one configuration is active at any time, and it affects all recipes on the system.


Recipe Management

Manages inspection/measurement programs. Recipes are opaque binary objects — their internal structure is vendor-specific.

MethodDescription
AddRecipeUpload a new recipe
PrepareRecipeMake a recipe ready for execution (triggers Initialized → Ready)
UnprepareRecipeDeactivate a prepared recipe
GetRecipeListFilteredQuery available recipes
RemoveRecipeDelete a recipe
PrepareProductPrepare by product name (auto-selects linked recipe)
UnprepareProductReverse of PrepareProduct
UnlinkProductRemove recipe↔product association

Recipe ↔ Product Linking

A Product is a named reference to a recipe. External systems (MES, PLC) can call PrepareProduct("WidgetX") instead of knowing the internal recipe ID. This decouples the production control system from vision-system-specific identifiers.


Result Management

Results are generated by job execution and delivered asynchronously via events and/or polling.

MethodDescription
GetResultByIdRetrieve a specific result by ID
GetResultComponentsByIdRetrieve individual components of a result
GetResultListFilteredQuery results with filters
ReleaseResultHandleFree a result handle

ResultDataType — What a Result Contains

FieldTypeM/O
resultIdResultIdDataTypeM
resultStateResultStateDataTypeM
isPartialBooleanM
isSimulatedBooleanO
jobIdJobIdDataTypeM
internalRecipeIdRecipeIdInternalDataTypeM
internalConfigurationIdConfigurationIdDataTypeM
creationTimeUtcTimeM
processingTimesProcessingTimesDataTypeO
measId / partIdMeasIdDataType / PartIdDataTypeO
productIdProductIdDataTypeO
resultContentBaseDataType[]O

The resultContent field is vendor/application-specific — it can contain measurements, images, pass/fail data, robot coordinates, etc. The spec deliberately leaves this open.


Events

EventWhen Fired
ResultReadyEventA new result is available
JobStartedEventA job begins execution
RecipePreparedEventA recipe is prepared and system enters Ready
ReadyEventSystem enters Ready state
AcquisitionDoneEventImage acquisition is complete
StateChangedEventAny state transition occurs
ErrorEventAn error is detected
ErrorResolvedEventA previous error is resolved

System State (SEMI E10)

The optional SystemState variable maps the vision system's internal state to SEMI E10 categories for equipment utilization tracking:

CodeStateMeaning
PRDProductionActively producing / inspecting
SBYStandbyReady but idle
ENGEngineeringSetup, calibration, programming
SDTScheduled DowntimePlanned maintenance
UDTUnscheduled DowntimeUnexpected failure
NSTNonscheduled TimeOutside operating schedule

Concrete Example: Inline Part Inspection

sequenceDiagram
    participant PLC as PLC (Client)
    participant VS as Vision System (Server)

    PLC->>VS: Reset()
    Note over VS: Preoperational
    PLC->>VS: SelectModeAutomatic()
    Note over VS: Operational → Initialized
    PLC->>VS: PrepareProduct("WidgetX")
    Note over VS: Initialized → Ready
    loop For each part
        PLC->>VS: StartSingleJob(measId, partId)
        Note over VS: Ready → SingleExecution
        VS-->>PLC: JobStartedEvent
        Note over VS: Acquire image, process...
        VS-->>PLC: ResultReadyEvent(resultId)
        Note over VS: SingleExecution → Ready
        PLC->>VS: GetResultById(resultId)
        VS-->>PLC: ResultDataType (pass/fail, measurements)
    end
    PLC->>VS: Halt()
    Note over VS: Halted (safe power-down)

Flow:

  1. PLC resets the system and selects automatic mode
  2. PLC prepares a product (which auto-selects the linked recipe)
  3. For each part arriving on the line, PLC calls StartSingleJob() with a measurement/part ID
  4. Vision system acquires images, processes them, fires ResultReadyEvent
  5. PLC retrieves the result (pass/fail, measurements, coordinates)
  6. When done, PLC halts the system for safe shutdown

Key Takeaways

  1. State machine is central — hierarchical FSM controls the entire lifecycle: power-up → operational → job execution → shutdown
  2. Four management pillars — Configuration, Recipe, Result, and Safety management (all optional except the state machine)
  3. Recipes are opaque — the spec doesn't define recipe internals; they're binary objects transferred as files
  4. Results are flexible — structured metadata (IDs, timestamps, states) plus a vendor-specific resultContent payload
  5. Product abstraction — MES/PLC can reference inspections by product name without knowing internal recipe IDs
  6. Two execution modes — SingleExecution (one-shot jobs) and ContinuousExecution (continuous streaming inspection)
  7. Step model for synchronization — optional VisionStepModelStateMachine enables fine-grained handshaking with robots/external systems
  8. SEMI E10 integration — optional SystemState maps to standardized equipment utilization categories
  9. Event-driven results — ResultReadyEvent notifies the client asynchronously; results can also be polled
  10. Vendor-extensible — vendors can add custom operation modes, extend result content, and subtype data types

Relationship to Other Specs

flowchart TB
    CORE["OPC 10000<br/>OPC UA Core<br/>(FiniteStateMachine, FileTransfer)"]
    DI["OPC 10000-100<br/>Devices (DI)<br/>(DeviceType)"]
    MV["OPC 40100-1<br/>Machine Vision<br/>(this spec)"]
    MACH["OPC 40001-1<br/>Machinery BBB<br/>(MachineryItem)"]
    SEMIE10["SEMI E10<br/>(Equipment RAM & Utilization)"]
    AUTOID["OPC 40010<br/>AutoID"]

    CORE -->|"FiniteStateMachineType<br/>TemporaryFileTransferType"| MV
    DI -->|"optional device model"| MV
    MACH -->|"optional integration<br/>as MachineryItem"| MV
    SEMIE10 -->|"SystemState categories<br/>(PRD, SBY, ENG, ...)"| MV
    MV -.->|"DataMatrix readers<br/>can expose both"| AUTOID

    style MV fill:#2d6a4f,color:#fff