Triggers
Trigger types
There are two types of triggers supported by API:
1. Camera trigger
This will trigger the camera. On each trigger, the camera will send a single frame.
2. Grabber trigger
In this mode, the camera should run in continuous mode. When the grabber is triggered, it will allow for a single frame to be acquired in the allocated buffer.
Triggers examples
Software trigger
Basic example to configure single frame acquisition with a software trigger.
- Open Vision Point, select the grabber, and scan for cameras
- Open the camera parameters remote browser and navigate to "Acquisition Control" -> "Trigger Selector"
- Set "TriggerMode" to "On"
- Set "TriggerSource" to "Software"
- Start the transmission on the camera
- Every time you click "Execute" at the "Trigger Software" will trigger the camera to image acquisition
Timer trigger
This example describes how to set up a timer as a trigger. Before configuring, open Vision Point, select the grabber, and scan for cameras.
Step 1: Configure the timer to create a square wave:
- In the frame grabber PCI parameters browser navigate "I/O Control" -> "Timer Control"
- Set "Timer Selector" to "Timer 0"
- Set "Timer Trigger Source" to "Continuous"
- Set "Timer Delay" and "Timer Duration" to get the desired frequency. See examples below:
Parameter | 10KHz (10k FPS) | 10Hz (10 FPS) |
---|---|---|
Timer Delay | 50.0 (50us) | 50000.0 (50ms) |
Timer Duration | 50.0 (50us) | 50000.0 (50ms) |
Step 2: Configure the grabber to send triggers to the camera
- In the grabber local parameters browser navigate "Camera Trigger Control"
- Set "Camera Trigger Mode" to "On"
- Set "Camera Trigger Activation" to "Any Edge"
- Set "Camera Trigger Source" to "Timer 0 Active"
Step 3: Configure the camera to receive the triggers from the grabber
- In the camera remote parameters browser navigate to "Acquisition Control" -> "Trigger Selector"
- Set "Trigger Mode" to "On"
- Set "Trigger Source" to "LinkTrigger0"
Step 4: Configuration is complete, start the acquisition to view the results.
External trigger via GPIO
Steps to configure the camera to be triggered from external source of the grabber GPIO:
- Connect trigger source to dedicated pins on the GPIO of the grabber, e.g. pin 18 [GND] and 19 [TTL0] for the Komodo II\III.
- In Digital I/O section of the grabber set "LineSelector" = "TTL0" and configure related parameters (if required).
- Check incoming trigger signals by refreshing status of parameter "LineStatusAll" (see image below). Changes in the trigger state can be seen by refreshing the "LineStatusAll" parameter value (if no changes are observed, it may be because the trigger is too fast. Reduce the trigger frequency to check the trigger changes, and return it to the desired state for regular operation).
- Configure trigger mode for the camera. Usually, this can be achieved by setting "TriggerMode" to "On", but this is a camera specific setting which may require additional configurations and have a different naming.
- Redirect the GPIO triggers through the grabber to the camera trigger by setting "CameraTriggerMode" to "On", "CameraTriggerActivation" to "AnyEdge" and "CameraTriggerSource" to the GPIO input (see image below).
Two frame grabbers triggering sync
Short description on how to enable syncronized triggering of two KAYA frame grabbers. This scenario requires GPIO pin-to-pin connection.
Connect two grabbers accroding to the instructions from "Frame Grabber and Simulator Hardware Reference & Installation Guide" section GPIO Connectors and section GPIO Pinout.
In case of Komodo II/III it will be pin 18 to pin 18 (GND) and pin 19 to pin 19 (TTL0).
- For all cameras on all grabbers
- Set "Trigge rMode" on camera to "1"
- Set "Trigger Source" on camera to "LinkTrigger0"
- For the master grabber:
- Set "Line Selector" to "TTL0"
- Set "Line Mode" to "Output"
- Set "Line Source" to "Timer Active 0"
- Timer configuration
- Set "Timer Selector" to "Timer 0"
- Configure FPS using formula 1,000,000 / "Expected FPS"
- Set "Timer Delay" = FrameTime/2
- Set "Timer Duration" = FrameTime/2
- Set "Timer TriggerSource"
- Configure each connected camera
- Choose "Camera Selector"
- Set "Camera Trigger Mode" to "1"
- Set "Camera Trigger Activation" to "Any Edge"
- Set "Camera Trigger Source" to "TTL0"
- For the slave grabber
- Set "Line Selector" to "TTL0"
- Set "Line Mode" to "Input"
- Set "Line Source" to "0"
- Configure each connected camera
- Choose "Camera Selector"
- Set "Camera Trigger Mode" to "1"
- Set "Camera Trigger Activation" to "Any Edge"
- Set "Camera Trigger Source" to "TTL0"
Frame rate trigger
The following example illustrates how to configure "Timer 2" to define the frame rate of stream trigger for incoming data frames from the camera.
Step 1: Configure "Timer 2" trigger source to be active in a continuous mode:
- Set "Timer Selector" to "Timer 2"
- Set "Timer Delay" and "Timer Duration" to get the desired frequency
- Set "Timer Trigger Source" to "Continuous" mode
Step 2: Configure the grabber stream trigger control:
- Set "Camera Selector" to select the destination camera
- Set "Trigger Activation" to "Any Edge"
- Set "Trigger Source" as "Time Active 2"
- Set "Trigger Mode" to "On"
Step 3: Configure the camera trigger:
- Set "Trigger Mode" in the Camera tab to "On".
- Additional configurations might be needed to set up a trigger in the camera depending on the model
Send N triggers
How to send N triggers from the grabber to the camera?
Example with trigger rate 200 (your camera need to support this rate) and 5000 triggers. Timer 0 will be activated by software trigger for debug purposes (it can be changed to TTL source)
- First set a timer that will be high for the duration of the triggers generation (all 5000 triggers)
- Set "Timer Selector" to 0
- Set "Timer Delay" to 10
- Set "Timer Duration" to 25000000.0 (25 seconds of operation, max is 34 seconds)
- Set "Timer Activation" = "Rising Edge"
- Set "Timer Trigger Source" to "Software"
- Set a second timer that will generate the triggers to the camera and select its source as a second timer. The trigger activation should be "Level High"
- Set "Timer Selector" to 1
- Set "Timer Delay" to 2500 (frame rate of 200 fps)
- Set "Timer Duration" to 2500 (frame rate of 200 fps)
- Set "Timer Activation" = "Level High"
- Set "Timer Trigger Source" to "Timer 0"
- Configure the camera trigger
- Set "Camera Selector" to camera index
- Set "Camera Trigger Activation" to "Any Edge"
- Set "Camera Trigger Source" as "KY_TIMER_ACTIVE_1"
- Set "Camera Trigger Mode" to "On"
- To activate 1 run (5000 triggers), use the Timer0 trigger software execute for debug. Then you can change the trigger source to TTL or any other IO.
- Execute "Timer Trigger Software"
- Make sure to check the "RXFrameCounter" to get the exact frames captured by the grabber and NOT the frame count in the bottom of the GUI picture window.
Triggers known issues
Lost frames at high FPS
When sending triggers it’s necessary to calculate the expected frame rate and set the delay accordingly.
- Trigger Interval: 12 ms
- Formula: 1 sec / 12 ms = 83.33 fps (approx.)
If the trigger rate is too fast, the last image may be lost.
Use our online FPS Calculator to ensure that your camera's frame rate and bandwidth settings are properly configured, also you can download Iron Excel Calc.
No frame at short triggers
It is a known issue that Iron cameras do not process triggers with durations shorter than 1.5 microseconds.