Custom GenICam Feature Names
To set up and drive a camera, the Cam Driver uses a few common GenICam features: the exposure
time, the pixel format, the trigger mode and source, the software trigger command and some others.
It looks for each under the names of the GenICam standard (SFNC), and under the other spellings
that cameras commonly use. A camera that uses a name of its own for one of them - for example a
software trigger command called FireTrigger - gets its own names in the application settings file,
lumiscan-cam-driver.json: a feature mapping.
Configuring a Feature Mapping
Add an entry under featureMappings, and name it by the camera’s featureMappingId in cameras:
"cameras": [
{ "cameraId": "camera1", "serial": "200900623", "driverId": "default", "featureMappingId": "acme" }
],
"featureMappings": [
{
"id": "acme",
"features": { "TriggerSoftware": "FireTrigger" },
"values": { "TriggerSource_Software": "SW", "TriggerMode_On": "Enabled" }
}
]
-
id: the name the cameras use infeatureMappingId. Several cameras of the same model can share one mapping. -
features: the common feature as the key, the camera’s own feature name as the value. Only the features that differ need an entry. -
values: for the trigger enumerations, the common value as the key, the camera’s own entry as the value.
A camera without featureMappingId uses the built-in names alone. To find the names a camera uses,
browse its features under hdvisionsystems/lumiscan-cam-driver/<camera name>/features while it is
connected, or look them up in the manufacturer’s software or documentation.
Restart the application after changing the mapping: it is applied when the camera connects.
Common Features and Their Built-In Names
The Cam Driver tries the names in this order and takes the first one the camera has.
Key under features |
Built-in names | Meaning |
|---|---|---|
|
|
The command that fires a software trigger, for capture and |
|
|
Whether the camera waits for a trigger |
|
|
Which trigger the camera waits for: software, or a line |
|
|
Which trigger is configured |
|
|
The exposure time, set from |
|
|
The acquisition frame rate |
|
|
The pixel format set at connect |
|
|
The image size |
|
|
The camera’s serial number |
|
|
The vendor |
|
|
The model |
|
|
The firmware version |
Key under values |
Built-in entries |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The JSON schema of the settings file lists the same keys.
How a Mapping Is Applied
-
A mapped name is tried first. When the camera does not have it, the Cam Driver logs a warning that names the mapping and the feature, and tries its built-in names.
-
A mapped entry under
valuesis taken as it is when the camera cannot list its entries; otherwise it must be one of them, or the warning follows and the built-in entries are tried. -
A
featureMappingIdthat names no mapping stops the Cam Driver at start, with an error that names it. -
An unknown key under
featuresorvaluesmakes the settings file unreadable: the Cam Driver logs an error that names the key and the valid ones, and runs without cameras.
Cameras Without a Software Trigger Command
When a camera has none of the software trigger commands - neither a built-in name nor a mapped one - the Cam Driver logs a warning when the camera connects. The camera still works on a hardware trigger or free running. In software trigger mode it cannot be fired:
-
If the camera is in software trigger mode when it connects,
connect-camerafails and the camera stays disconnected. The error, which says to map the command underfeatureMappings, is in the log and inhdvisionsystems/lumiscan-cam-driver/system/status-text. -
If the camera is switched to software trigger mode later,
control/trigger/executeanswers with status-10012(softwareTriggerFailed).
The nodes control/trigger/execute and input/trigger-before-acquire exist for every camera, so a
program can use the same addresses for all of them.