OPC UA Client Integration Guide
This document describes how to connect to and operate the LumiScan VGR OPC UA server. Because OPC UA is self-describing, clients can browse the available nodes and methods directly. This guide covers the configuration settings and call patterns clients must follow to integrate reliably.
Client Configuration & Execution Behavior
Due to physical hardware operations (camera triggers, robot communication) and heavy computational tasks (neural network inference), clients must respect the following execution constraints:
-
Execution Time & Call Timeouts: Many methods take significantly longer than standard PLC operations.
-
Typical execution time: 3 to 10 seconds.
-
Recommended client call timeout: At least 15 seconds.
-
Failure to configure this timeout will result in client-side errors such as
BadTimeoutor transport disconnects.
-
-
Concurrency: The server processes one method at a time. Parallel or concurrent method calls are not supported and will be rejected with
BadResourceUnavailable.
Connection Profile
| Property | Value |
|---|---|
Endpoint |
|
Security Policy / Mode |
None (anonymous, unauthenticated) |
Authentication |
None (Anonymous login) |
Max. simultaneous clients |
2 (additional connection attempts will be refused) |
Recommended Session Timeout |
10s (adjust up or down based on your polling interval) |
Note: The server currently requires no authentication. Ensure it is accessible only within your plant network perimeter.
Address Space Layout
All nodes are hosted under Objects/LumiScanVGR (namespace index 1).
Manufacturer
Child object: LumiScanVGR/Manufacturer
| Variable | Type | Access | Description |
|---|---|---|---|
|
|
Read |
Manufacturer name. |
|
|
Read |
Manufacturer address. |
Version
Child object: LumiScanVGR/Version
| Variable | Type | Access | Description |
|---|---|---|---|
|
|
Read |
Version string of the running software build. |
|
|
Read |
Commit hash of the running build. |
|
|
Read |
Build timestamp of the running build. |
Capability Catalogs
These arrays are populated at server startup from the project configuration. If hardware IDs are added or changed, the server must be restarted to reflect them.
| Variable | Type | Access | Description |
|---|---|---|---|
|
|
Read |
All configured camera IDs. |
|
|
Read |
All configured pipeline IDs. |
|
|
Read |
All configured robot IDs. |
Live Configuration
These nodes are updated on every read and reflect the current active selections.
| Variable | Type | Access | Description |
|---|---|---|---|
|
|
Read |
Currently active camera. |
|
|
Read |
Currently active pipeline/recipe. |
|
|
Read |
Currently active robot definition. |
Method Reference
All methods return their status as the first output argument ReturnCode (type String). See Return Codes for all possible values.
| Method | Input Arguments | Output Arguments | Description |
|---|---|---|---|
|
|
|
Convenience method. Runs the full capture-and-grip sequence using the IDs supplied by the client. Passing an empty string reuses the last known ID for that parameter — explicitly providing all IDs is strongly recommended. |
|
|
|
Convenience method. Runs the full capture-and-grip sequence using a pre-configured server-side recipe identified by |
|
|
|
Switches the server between |
|
— |
|
Returns the current operation mode as a numeric value and a human-readable name. |
|
|
|
Selects the camera for subsequent operations. |
|
|
|
Selects the vision pipeline/recipe for subsequent captures. |
|
|
|
Selects the robot definition used to express grip poses. |
|
— |
|
Initializes all hardware and software resources. Must be called at least once after the application starts. |
|
|
|
Performs a deep reset of the specified camera. Pass an empty string to reset all cameras. |
|
— |
|
Placeholder — not yet implemented. Has no effect on the running process. |
|
— |
|
Acquires a fresh image from the active camera. |
|
— |
|
Returns the current temperature of the active camera in °C. Returns |
|
— |
|
Runs object detection on the last captured image. Returns the number of detected 2D and 3D objects (capped at 255). |
|
— |
|
Returns the highest-ranked grip pose from the most recent detection. Use for inspection or simulation without consuming the result. |
|
— |
|
Returns the next grip pose in ranked order and advances the internal iterator. Call repeatedly to step through all candidates. |
|
|
|
Generic getter for querying object counters and similar values. See |
Pose Array Layout
GripPointPose always contains exactly seven Float values:
| Index | Field | Description |
|---|---|---|
0 |
|
Translation X in robot coordinate system (meters) |
1 |
|
Translation Y in robot coordinate system (meters) |
2 |
|
Translation Z in robot coordinate system (meters) |
3 |
|
Rotation X (Euler / axis-angle, robot-driver dependent) |
4 |
|
Rotation Y |
5 |
|
Rotation Z |
6 |
|
Optional fourth component (quaternion W or unused). Remains |
Interpret the pose according to your robot plug-in documentation.
Parameter IDs
Used via GetReport to query detection results.
ParamId |
ParamId Description | Input Field ArgString |
Result field | Description |
|---|---|---|---|---|
|
|
— |
|
Total number of detected 2D objects. |
|
|
— |
|
Total number of detected 3D objects. |
|
|
<Object Id> |
|
Number of 2D objects matching the given class. |
|
|
<Object Id> |
|
Number of 3D objects matching the given class. |
|
|
— |
|
Thickness of gripped object |
SetParameter is not supported via OPC UA.
Operation Mode
The server enforces an operation mode that must be set before most methods are usable.
| Mode | Value (Byte) |
Description |
|---|---|---|
|
|
Standby. Most methods rejected. |
|
|
Normal production mode. All methods accepted. |
|
|
Local/GUI control active. Most methods rejected. |
|
|
Shutdown in progress. |
Only SetOperationMode and GetOperationMode are accepted in any mode. All other methods return OPERATION_MODE_INVALID when the mode is not AUTOMATIC. The server starts in AUTOMATIC by default.
Recommended Call Sequence
Shortcut for standard production: Replace steps 2–6 with a single call:* ExecuteSimpleRecipe(CameraId, PipelineId, RobotId) — client provides IDs directly. + * ExecuteRecipe(RecipeId) — use a pre-configured server-side recipe(settings.json). Use the step-by-step sequence below when you need finer control, e.g. to inspect intermediate counts or repeat only the capture step.
-
Get/Set Operation Mode — Verify the server is in
AUTOMATIC. If it reportsIDLEorMANUAL, callSetOperationModebefore anything else. -
SetupSystem — Initialize hardware and load all resources. Wait for
SUCCESSbefore continuing. -
SetActiveCamera / SetActivePipeline / SetActiveRobot — Define the working configuration. Required at least once per production order; skip if the previous selection is still valid.
-
CaptureImage — Acquire the current scene.
-
ComputeObjects — Run detection.
NumObjects2DandNumObjects3Dare available onSUCCESS. Repeat from step 4 if a fresh scene is required. -
GetBestResult — Read the highest-ranked grip pose without consuming it (useful for logging or simulation).
-
GripBestResult — Retrieve the next executable grip pose for the robot. Call repeatedly to step through all candidates.
-
(Optional) GripBestResult — Required for measuring object’s thickness by calling this function after robot grip the current object away.
-
(Optional) GetReport(ParamId:4) — It will return object thickness in
ValueFloatfield
Read ActiveCamera, ActivePipeline, and ActiveRobot at any time to confirm which configuration is currently active.
Return Codes
Every method returns a ReturnCode string as its first output. The table below lists all possible values and their meaning.
| ReturnCode | Description |
|---|---|
|
Operation completed without errors. |
|
Unclassified failure. Check the server-side application log for details. |
|
Camera was not initialized. Call |
|
Camera hardware is not reachable. Use |
|
Image acquisition failed (exposure, trigger, or transport problem). |
|
The selected pipeline is not ready. Verify |
|
Robot configuration is missing or invalid. |
|
Required data (image, point cloud, etc.) is not available yet. |
|
The supplied camera/pipeline/robot/recipe ID is not known. Verify against the |
|
The robot-to-world transform could not be determined. |
|
No grip candidates are available. Run |
|
Hardware trigger produced no frame. Retry |
|
Exposure setting prevented a valid image from being acquired. |
|
Camera driver/firmware requires a restart. Call |
|
Method was rejected because the server is not in |
Troubleshooting
Problems with OPC UA calls are described step by step in Troubleshooting:
-
Calls time out, or
BadResourceUnavailable: OPC UA calls fail withBadTimeoutorBadResourceUnavailable -
OPERATION_MODE_INVALID: OPC UA methods returnOPERATION_MODE_INVALID -
ID_DOES_NOT_EXIST, or thePossible*arrays are stale: A function returnsID_DOES_NOT_EXIST -
Object counts are 0 after
ComputeObjects: No objects are detected (object count is0) -
GripBestResultreturnsRESULTS_EMPTY:RESULTS_EMPTYis returned -
CameraTemperatureis-273.1528:CameraTemperatureis-273.1528 -
Shutdownhas no effect:Shutdownhas no effect