Skip to content

basler-trigger ​

Sends a software trigger to each selected camera when a message arrives.

The node has one input and no output. The frames that the cameras produce come out of the basler-collector nodes that have those cameras selected.

Properties ​

PropertyDescription
NameLabel of the node in the flow. basler-trigger when empty
Basler ServicesState of the services on the host, with the Start Basler and Stop Basler buttons
Available CamerasThe cameras that the discovery service finds. The Select checkbox marks the cameras that this node triggers

The two panels are the ones of basler-collector and act on the same services and containers: see its Properties. A camera can be selected once its publisher container is running. In this dialog the button of a camera depends only on its status: Stop for Controlled (ours), Fix IP for No access and Start for Free.

Input ​

Any message triggers the selected cameras. The content of the message is not read.

For each selected camera the node sends a trigger request to the publisher of that camera. The publisher queues the requests and executes them between two frames: its acquisition loop waits up to 200 ms for a frame. For each request it executes the TriggerSoftware command of the camera. When the camera is not already in software trigger mode (TriggerMode set to On and TriggerSource set to Software), the publisher first stops grabbing, sets TriggerSelector to FrameStart (or ExposureStart, or keeps its value when the camera has neither), TriggerMode to On and TriggerSource to Software, and grabs again; after the trigger it puts the previous values back.

Because the previous values are restored, a camera whose TriggerMode is Off is back to free running right after the trigger. To receive frames only when they are triggered, set TriggerMode to On with basler-config first; a camera already set to On and Software is triggered without any change.

The request is not acknowledged: the node does not know whether the camera took the image. A request for a camera whose publisher container is not running is lost, and a publisher that is not acquiring (during the 10 seconds after it starts, or while it reconnects to its camera) ignores the requests.

Status ​

StatusMeaning
Blue dot, selected NN cameras are selected
Grey dot, no camerasNo camera is selected

The status is set when the node starts and does not change with the messages.

Errors ​

MessageLevelCause
No cameras selected for triggerWarningA message arrived and no camera is selected
NATS connection failed: <reason>WarningThe NATS server could not be reached when the node started
Failed to trigger cameras: <reason>ErrorA message arrived and there is no connection to the NATS server

The errors are logged without the message, so they appear in the debug sidebar and in the Node-RED log but do not trigger a Catch node. What the publisher cannot do with a request is written to the log of its container (docker logs basler-<MAC>, with the MAC address in upper case and hyphens).

The basler-trigger nodes and their dialog share one connection to NATS, opened the first time one of them needs it. If that first attempt fails it is not repeated: start the NATS server and restart Node-RED.