IDS Peak comfortSDK, genericSDK, IPL, and AFL developer manuals are external documents. Please contact us if you need them.
Most IDS Vision cameras support using I/O signals as trigger for image acquisition. This mode is often called hardware trigger.
When the camera receives a trigger signal on the line, a single image is captured and transferred. During initialization time, trigger signals are ignored.
While exposure and read out are still active, the camera can typically not start a second acquisition unless it is able to handle overlapping triggers. The latter means, that the next exposure can start while the previous read out is still active.
In hardware trigger mode, the AcquisitionFrameRate turns to read-only access and returns the maximum trigger frequency. If triggers are sent faster and the camera is not ready to apply the trigger, the trigger is missed.
The timing diagrams refer to global shutter sensors. With rolling shutters, the timing slightly differs. You find detailed timing diagrams for rolling shutters here: Signals and events from rolling shutter sensors
Note on I/O pinning and circuits
For I/O pin assignment and circuit information for your camera model, refer to the technical manual of the respective camera family.
Configuration
First make sure, you have chosen the AcquisitionMode "Continuous".
AcquisitionMode=Continuous;
Then activate the "ExposureStart" trigger.
TriggerSelector=ExposureStart; TriggerMode=On;
As TriggerSource for the "ExposureStart" trigger, select the I/O line that holds the trigger signal.
Alternatives and variations: Using the falling edge of the I/O signal
Instead of using the rising edge, you can also connect the "ExposureStart" trigger to the falling edge of your I/O signal. Make sure, the TriggerSelector is set correctly first. Then change the TriggerActivation according to the selected edge type.
Some applications require, that the I/O signal triggers the image with a certain delay to synchronize different components in the process. Make sure, the TriggerSelector is set correctly first. Then change the TriggerDelay according to your application.
Alternatives and variations: Skipping trigger signals
Especially with high frequent trigger signal sources, some applications require to skip trigger signals. If the TriggerDivider is set to 2, only every second trigger signal is causing the capture of an image. If TriggerDivider is set to 10, only every 10th signal triggers an image, and so on.
Make sure, the TriggerSelector is set correctly first. Then change the TriggerDivider according to your application.
// Load UserSet "Default", if the configuration of the camera is unclear peak_statusstatus=peak_Camera_ResetToDefaultSettings(hCam); if(PEAK_ERROR(status)){/* Error handling ... */} // Activate the ExposureStart trigger and configure its source to an IO line // Line0 is typically the default trigger input and is preconfigured in the // default hardware trigger configuration // Set trigger mode status=peak_Trigger_Mode_Set(hCam,PEAK_TRIGGER_MODE_HARDWARE_TRIGGER); if(PEAK_ERROR(status)){/* Error handling ... */} // Enable trigger mode status=peak_Trigger_Enable(hCam,PEAK_TRUE); if(PEAK_ERROR(status)){/* Error handling ... */} // Next step: start acquisition // VARIATION: GPIO as trigger channel // Load UserSet "Default", if the configuration of the camera is unclear peak_statusstatus=peak_Camera_ResetToDefaultSettings(hCam); if(PEAK_ERROR(status)){/* Error handling ... */} // Create a trigger mode with GPIO_1 on frame start (equals exposure start) peak_trigger_modemode={PEAK_TRIGGER_TARGET_FRAME_START,PEAK_IO_CHANNEL_GPIO_1}; // Set trigger mode status=peak_Trigger_Mode_Set(hCam,mode); if(PEAK_ERROR(status)){/* Error handling ... */} // Enable trigger mode status=peak_Trigger_Enable(hCam,PEAK_TRUE); if(PEAK_ERROR(status)){/* Error handling ... */} // Next step: start acquisition // VARIATION: Falling edge, TriggerDelay and TriggerDivider // Load UserSet "Default", if the configuration of the camera is unclear peak_statusstatus=peak_Camera_ResetToDefaultSettings(hCam); if(PEAK_ERROR(status)){/* Error handling ... */} // Activate the ExposureStart trigger and configure its source to an IO line // Set trigger mode status=peak_Trigger_Mode_Set(hCam,PEAK_TRIGGER_MODE_HARDWARE_TRIGGER); if(PEAK_ERROR(status)){/* Error handling ... */} // Enable trigger mode status=peak_Trigger_Enable(hCam,PEAK_TRUE); if(PEAK_ERROR(status)){/* Error handling ... */} // Use the falling edge of Line0 to activate the trigger status=peak_Trigger_Edge_Set(hCam,PEAK_TRIGGER_EDGE_FALLING); if(PEAK_ERROR(status)){/* Error handling ... */} // Delay the start of the exposure by 100 us status=peak_Trigger_Delay_Set(hCam,100.0); if(PEAK_ERROR(status)){/* Error handling ... */} // Skip every second trigger signal status=peak_Trigger_Divider_Set(hCam,2); if(PEAK_ERROR(status)){/* Error handling ... */} // Next step: start acquisition
try { // Get RemoteDevice NodeMap autonodeMapRemoteDevice=device->RemoteDevice()->NodeMaps().at(0); // Load UserSet "Default", if the configuration of the camera is unclear nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("UserSetSelector")->SetCurrentEntry("Default"); nodeMapRemoteDevice->FindNode<peak::core::nodes::CommandNode>("UserSetLoad")->Execute(); // Activate the ExposureStart trigger and configure its source to an IO line nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerSelector")->SetCurrentEntry("ExposureStart"); nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerMode")->SetCurrentEntry("On"); nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerSource")->SetCurrentEntry("Line0"); // Next step: start acquisition } catch(conststd::exception&e) { std::stringstrError=e.what(); // ... } // VARIATION: Falling edge, TriggerDelay and TriggerDivider try { // Get RemoteDevice NodeMap autonodeMapRemoteDevice=device->RemoteDevice()->NodeMaps().at(0); // Load UserSet "Default", if the configuration of the camera is unclear nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("UserSetSelector")->SetCurrentEntry("Default"); nodeMapRemoteDevice->FindNode<peak::core::nodes::CommandNode>("UserSetLoad")->Execute(); // Activate the ExposureStart trigger and configure its source to an IO line nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerSelector")->SetCurrentEntry("ExposureStart"); nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerMode")->SetCurrentEntry("On"); nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerSource")->SetCurrentEntry("Line0"); // Use the falling edge of Line0 to activate the trigger nodeMapRemoteDevice->FindNode<peak::core::nodes::EnumerationNode>("TriggerActivation")->SetCurrentEntry("FallingEdge"); // Delay the start of the exposure by 100 us nodeMapRemoteDevice->FindNode<peak::core::nodes::FloatNode>("TriggerDelay")->SetValue(100.0); // Skip every second trigger signal nodeMapRemoteDevice->FindNode<peak::core::nodes::IntegerNode>("TriggerDivider")->SetValue(2); // Next step: start acquisition } catch(conststd::exception&e) { std::stringstrError=e.what(); // ... }