Status Codes and Results
Two kinds of answers tell a client what happened:
-
the result of a call - did the write or method call go through? - see Results of a method call;
-
the status the app writes into a node - did the operation succeed? - see Module status:
control/status/codeand Execution status of the finders.
Use the numbers in program logic, never the texts.
Module status: control/status/code
The Cam Driver, AI Object Matching and Calibration report the state of each module on
<module>/control/status/code (int32) and control/status/text. The values 0 and above are
normal, values below 0 are errors.
| Code | Text | Meaning |
|---|---|---|
|
|
the last function succeeded; ready for the next |
|
|
the module is starting |
|
|
a function runs |
|
|
waiting for the client, usually for |
|
|
no specific code |
|
|
the settings could not be loaded |
|
|
an input is not valid |
|
|
the licence is missing |
|
|
the settings were changed through |
App-specific codes, listed in each app’s manual:
| App | Codes |
|---|---|
Cam Driver |
|
Calibration |
|
AI Object Matching |
|
Execution status of the finders
Template Finder, Object Finder, Area Detector and Text Reader write the outcome of each method to
<method>/output/status-code (int16) and status-text. These values are their own, not the module
status above:
| Code | Text |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note that -5 means cropInvalid here, but restartRequired in the module status.
Results of a method call
A write to an execute node answers whether the operation could run. The names differ between the
Data Layers; the meaning is the same.
| LumiScan Keryx | ctrlX Data Layer | OPC UA Connector | Meaning and what to do |
|---|---|---|---|
|
|
|
It ran. For the Cam Driver, AI Object Matching and Calibration, read |
|
|
|
Another operation of the module runs. Retry |
|
|
|
The function is not ready: its |
|
|
|
The app is stopping, a restart is required (status |
|
|
|
An input is not valid. Nothing changed. Correct the input |
|
|
|
An image, a source, a module or the node itself was not found. Check the address and its case |
|
|
|
Something could not be written or made: a file, an existing module, an unavailable licence. The log says why |
|
|
|
The operation failed. Read the status or the log |
On the ctrlX Data Layer, data a method attaches to a failed call does not reach the client, so a refused call carries no reason. The apps therefore write the reason to their log and, where they have one, to a status node.