Application File
lumiscan-script-runner.json in the settings folder holds all settings of the Script Runner. It is read at start; see When changes take effect. The shipped file states every setting. Its JSON schema is schemas/lumiscan-script-runner.schema.json next to it.
Example
{
"$schema": "schemas/lumiscan-script-runner.schema.json",
"apiVersion": 1,
"scriptFolder": "scripts",
"engine": {
"threadNum": 1,
"useSpinLock": false,
"startUpThreadPool": false,
"jitCompiled": false,
"ignoreDisplay": true
},
"modules": [
{
"name": "blobs",
"procedure": "count_blobs",
"group": "vision",
"trigger": "handshake",
"inputs": {
"ImageFile": { "from": "node" },
"MinGray": { "from": "node" },
"MinArea": { "from": "node" }
},
"outputs": {
"Binary": { "to": "node" },
"Count": { "to": "node" },
"Areas": { "to": "node" },
"MeanGray": { "to": "node" }
},
"mono12Shift": 0,
"acceptedInterfaceHash": "sha256:d7b6f8ff6d772a1392512bf7d11d1d00050e7fc9fc4045da50d566ea6676e64d"
}
]
}
Top level
| Key | Type | Default | Meaning |
|---|---|---|---|
|
integer |
|
The Data Layer API version the app serves. Only |
|
string |
|
The script folder, relative to the settings folder or absolute. Must not be empty. |
|
object |
see |
How HALCON and HDevEngine are set up. |
|
array |
|
The modules, see |
engine
These settings put HALCON into a CPU-friendly state before the first operator runs. They apply to the whole app.
| Key | Type | Default | Meaning |
|---|---|---|---|
|
integer |
|
How many threads HALCON may use to parallelise one operator (HALCON’s |
|
boolean |
|
HALCON’s spinlocks. They slow down severely with more threads than cores; leave them off. |
|
boolean |
|
HALCON’s thread pool. It always spins and keeps cores busy; leave it off. |
|
boolean |
|
Runs procedures JIT-compiled (HDevEngine’s |
|
boolean |
|
The display operators ( |
The Script Runner never gives a HALCON thread real-time scheduling, and it sets HALCON so that an output a procedure never set fails the run instead of coming back empty.
modules
Each entry is one module, see Modules, Groups and the Store.
| Key | Type | Default | Meaning |
|---|---|---|---|
|
string |
required |
The module’s name and its folder on the Data Layer ( |
|
string |
required |
The procedure the module runs: the file name in the script folder without |
|
string |
the module’s name |
The group the module runs in. Same rules as |
|
string |
|
|
|
object |
every value and image input on a node |
The input bindings, keyed by parameter name, see Bindings. |
|
object |
every value and image output on a node, every handle output to the store; in a |
The output bindings, keyed by parameter name, see Bindings. |
|
integer |
|
Bits a |
|
string |
none |
The interface hash the module’s nodes were built for ( |
Bindings
inputs and outputs map a parameter name to a binding. A parameter without an entry gets its default.
| Binding | Meaning |
|---|---|
|
A node under |
|
Read from the group’s store under |
|
A fixed value. No node. Only for number and string parameters, not for images or handles. |
| Binding | Meaning |
|---|---|
|
A node under |
|
Written to the group’s store under |
|
Node and store. |
|
Dropped. |
The module is refused (-10002, the status text names the parameter) when a binding names a parameter the procedure does not have, binds it in the wrong direction, puts a handle, a vector, a mixed tuple, a region or a contour input on a node, gives an image or a handle a fixed value, gives a fixed value that does not fit the parameter, or gives a start module a node.
Checks at start
The app does not start, and logs why, when:
-
the file is not valid JSON, or
apiVersionis not1; -
a section has the wrong kind,
scriptFolderis empty,engine.threadNumis not a whole number from 0 to 1024, or anengineswitch is nottrueorfalse; -
a module entry is refused: it has no valid
nameorgroup, noprocedure, an unknowntrigger, a binding with an unknownfromorto, avaluebinding withoutvalue, or amono12Shiftoutside 0 to 4 (the log names the module); -
two modules have the same name.
A module whose procedure is missing, cannot be loaded or cannot be mapped is refused on its own with -10002; the other modules run.