System designHow-to

OPC UA companion spec import order: fix missing nodeset errors

Fix 'Model is missing' errors in OPC UA: import base UA, DI, Machinery and Machine Vision companion spec nodesets in the order RequiredModel entries demand.

LumaSpec Vision9 min read Share on LinkedIn

On this page 10 sections
  1. 01What the "Model is missing" check reads
  2. 02Read the requirements out of your own file
  3. 03Get one copy of each file
  4. 04Import order, step by step
  5. 05Worked example: two failures, two fixes
  6. 06Verify the model landed
  7. 07Common mistakes
  8. 08Where the server runs
  9. 09Next step
  10. 10Questions

You modeled a machine vision information model against the Machine Vision Part 2 companion specification, pointed your server at the XML, and got a hard stop: "Model is missing", followed by a base UA version and a Machinery version you were sure you had imported. The message is not a verdict on your file. It is a dependency report. Your model declares the OPC UA models it builds on, with a version and publication date for each, and the loader checks that chain before it accepts anything new. This guide shows you how to read the chain out of your own XML, fetch the right files, and import them in an order that passes. At the end you will be able to verify the types landed where your PLC client expects them.

What the "Model is missing" check reads

Every NodeSet2 file is self-describing: it names its own namespace URI, Version and PublicationDate, and it lists one RequiredModel entry per dependency with the same three fields for the model it builds on. Before accepting a new file, the server's import routine checks every one of those entries against the models already loaded: same namespace URI present, and version and publication date at least what the entry declares. Fail, and you get one line per unmet dependency:

Model is missing: http://opcfoundation.org/UA/ - Version: 1.05.02 - PublicationDate: 2022-11-01T00:00:00Z or newer

That line supports two diagnoses. Either the dependency was never imported at all, or it is loaded but older than required. The wider context: a companion specification describes the information model for one vertical market, and the OPC UA for Machine Vision companion specification, published as OPC 40100, defines the model for vision systems from simple sensors to multi-camera cells. Part 2 adds the system level — the structure of a vision system, its components and the relationships between them. Because the vision model builds on other models, its files carry requirements, and so does the model you compile.

Read the requirements out of your own file

Open the XML you compiled — my_information_model.xml in this example — and find the Models entry for your namespace. Under it sit the RequiredModel entries your modeling tool wrote from the specification files it had loaded. For a Machine Vision Part 2 release-candidate build, expect the two shown here. Attribute names come from the NodeSet2 schema:

<!-- attribute names as the NodeSet2 schema defines them -->
<RequiredModel ModelNamespace="http://opcfoundation.org/UA/"
               Version="1.05.02" PublicationDate="2022-11-01T00:00:00Z"/>
<RequiredModel ModelNamespace="http://opcfoundation.org/UA/Machinery/"
               Version="1.03.0" PublicationDate="2023-08-01T00:00:00Z"/>

Two facts follow. First, these values are requirements your file declares, not properties of your runtime; nothing checks them against reality until import time, which is exactly when they fail. Second, they reflect the specification versions you modeled against. Model against a newer base than your server ships, and the mismatch is baked in before the server ever starts.

Get one copy of each file

The OPC Foundation publishes every nodeset in its public UA-Nodeset repository, one folder per model. This import needs three files plus whatever base the server bundles: Opc.Ua.Di.NodeSet2.xml, Opc.Ua.Machinery.NodeSet2.xml and Opc.Ua.MachineVision.AMCM.xml. The base UA namespace, http://opcfoundation.org/UA/, normally lives inside the server library itself — in the stack behind this case, version 1.05.01 with publication date 2022-02-24T00:00:00Z.

Path discipline is the same skill as with camera description files: when a tool loads the wrong XML from a stale location, the fix looks like the GenTL XML file path checklist — one deliberate path, never whatever the example used.

Import order, step by step

  1. List your dependencies. Read every RequiredModel entry in your file and note namespace URI, version and publication date. For this Machine Vision Part 2 model that is the two entries shown above.
  2. Satisfy each one. Prefer loading the required version or a newer one from the repository. Where the bundled base cannot be swapped, decide whether to pin your model's requirement down to the bundled version — the worked example below does exactly that.
  3. Import in dependency order, your model last. The startup sequence for this case:
# illustrative paths and variable names; import_xml is the server library's loader call
di_path = "~/UA-Nodeset/DI/Opc.Ua.Di.NodeSet2.xml"
machinery_path = "~/UA-Nodeset/Machinery/Opc.Ua.Machinery.NodeSet2.xml"
machine_vision_path = "~/UA-Nodeset/Opc.Ua.MachineVision.AMCM.xml"
my_model_path = "~/UA-Nodeset/my_information_model.xml"

await server.import_xml(di_path)           # dependency layer first
await server.import_xml(machinery_path)    # required by Machine Vision and by your model
await server.import_xml(machine_vision_path)
await server.import_xml(my_model_path)     # your model, always last
  1. Import before the first client connects. Run the whole sequence during startup so the address space is complete when the first client browses.
  2. Re-run the client that failed. When the required-XML-models error is gone, the chain passed; move on to the checks below.

Worked example: two failures, two fixes

Here is the whole case with its numbers. The model requires base UA 1.05.02, publication date 2022-11-01T00:00:00Z. The stack bundles 1.05.01, publication date 2022-02-24T00:00:00Z. Compare: same 1.05 minor line, but the patch digit 01 sits below 02, and 2022-02-24 is 250 days before 2022-11-01. The floor test fails on both fields, so the loader refuses the chain even though every server trivially carries the base namespace.

The Machinery half fails differently. The requirement is 1.03.0, publication date 2023-08-01T00:00:00Z, or newer. The file the import line pointed at — a bundled example copy — carried an older Machinery model, so the same floor test failed even though the import itself ran without complaint.

Two fixes, applied in this order of preference:

  • Machinery: satisfy the requirement. Download the current Opc.Ua.Machinery.NodeSet2.xml. Version 1.03.0 meets a 1.03.0-or-newer floor exactly, and the import path changes to the downloaded copy.
  • Base UA: pin the requirement. The bundled 1.05.01 is part of the library, so the practical fix is to edit your own model's RequiredModel entry to Version 1.05.01 and PublicationDate 2022-02-24T00:00:00Z. Adjusting a model you compiled is legitimate dependency management; commit the change so the next model rebuild restores it deliberately rather than silently.

After both changes, all four imports pass and the error list comes back empty.

Verify the model landed

Re-run the failing client first: the required-models error should be gone. Then inspect the address space directly. The namespace array tells you what the server now knows. Before the imports it holds 2 entries; after the four imports it holds 6 — index 0 the base UA namespace, index 1 the server's own, then one slot each for DI, Machinery, Machine Vision and your model, from index 2 to index 5. Confirm that http://opcfoundation.org/UA/Machinery/ and your model's URI both appear before you instantiate anything.

Then confirm the types. Machine Vision Part 2 introduces VisionSystemAssetType, a dedicated entry point into a vision system's inner structure. Instantiate one during commissioning, browse its components, and read a value or two from a plain client before the PLC integration starts. Smart cameras and vision sensors attach under that structure at runtime — the same way the model maps onto the smart cameras and controllers in a real cell.

If imports pass but a client browse trips over an unresolved AccessLevel on a node, that is a separate nodeset import defect — the AccessLevel resolution walkthrough covers it.

Common mistakes

  • Your model imports first. Placed before a dependency it needs, it fails on that first unmet requirement. Keep it last and the question never arises.
  • You trust the bundled copies. Example-folder DI and Machinery files predate current companion models; download fresh ones from the repository.
  • You hand-type the versions. Trailing zeros and the full UTC timestamp are part of the value. Copy, do not retype.
  • You read "or newer" as optional. The requirement is a floor on both version and publication date: a newer file passes, an older one fails.
  • You meet the pattern elsewhere and miss it. A GenTL producer version mismatch fails the same consumer-versus-file check in the camera layer, a vision application startup error is usually a missing dependency from this family, and other companion models — missing nodes in the OPC UA Robotics model, for instance — clear with the identical load-dependencies-first method.

Where the server runs

On real hardware the OPC UA server process lives next to the vision application, usually on a vision controller rather than a desktop PC in the cabinet. Budget ports first: one Ethernet port per camera plus at least one for the PLC and client traffic — for a 4-camera cell that is 5 LAN ports minimum — with the light channels on the same box so trigger-to-image timing stays inside one process.

The MV-VC3301H-128G66 fits a compact cell: 5+ LAN ports, 4 built-in light channels, 8 GB of memory and an Intel Core i3, with a VM6200Pro license included.

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 cells with power-over-Ethernet cameras or heavier inference loads, the MV-VC5525-256G70-NN adds PoE camera ports, 8 built-in light channels, 32 GB of memory and PCIe expansion.

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 camera finder filters by interface, resolution and shutter type, and the system configurator walks the station from camera to controller.

Next step

The decision in one line: read the RequiredModel entries, satisfy each with the newest file that meets the floor, import dependencies before dependents with your model last, then browse the namespace array before wiring the PLC. Run that sequence and a Machine Vision Part 2 model imports first time.

If you are specifying the controller side of a multi-camera cell, ask for a volume quote or bring the integration question to the contact page — expert support comes with every order. More systems-level guides sit on the systems topic page.

Questions

Do I have to import the DI nodeset before Machinery?

Only if a file you load names DI in one of its RequiredModel entries — read each file's requirements before importing and the guesswork disappears. Importing DI first is common and harmless: it adds a namespace later models may build on, and the loader only complains about requirements that are missing or too old, never about an extra model already present.

Can I edit the RequiredModel version instead of downloading a newer nodeset?

Yes, for a model you compiled yourself: set Version and PublicationDate in the RequiredModel entry to the pair your server actually loads — in the worked example, base UA 1.05.01 with 2022-02-24T00:00:00Z. Prefer satisfying the requirement with the newer file whenever the runtime allows; pin only when the older stack version is a deliberate choice, and commit the change with the model source.

Which versions does the Machine Vision Part 2 model require?

The release candidate behind this case pins base UA at 1.05.02 (PublicationDate 2022-11-01T00:00:00Z) and Machinery at 1.03.0 (2023-08-01T00:00:00Z), each or newer. Treat those as this build's values rather than a permanent standard: your modeling tool writes the entries from the specification files it loaded, so always read them back from your own XML before your import run.

Where do the Machinery and Machine Vision nodeset files come from?

From the OPC Foundation's public UA-Nodeset repository, which keeps every companion model and base version under its own folder — the same source as the DI file in the import examples. Download a fresh copy for each import run rather than reusing the files a library's examples folder ships, because those copies lag the versions current companion models require.

How do I find the base version my server bundles?

The import error prints only the required side of each pair. For the bundled side, check the nodeset files the library itself ships or its release notes — in this case the stack's bundled base was 1.05.01, publication date 2022-02-24T00:00:00Z. Match both fields exactly whenever you pin a RequiredModel entry to the bundled reality.