Frequently Asked Question

How to send X triggers from Frame Grabber to camera
Last Updated a year ago

There is no straight forward solution but it is possible with certain restrictions**:

Example with trigger rate 200 (your camera configurations need to support this rate) and 5000 triggers. The timer 0 will be activated by software trigger for debug purposes (later it can be changed to TTL source)

1. First set a timer that will be high for the duration of the triggers generation (all 5000 triggers)

KYFG_SetGrabberValueEnum(grabberHandle, "TimerSelector", 0);
KYFG_SetGrabberValueFloat(grabberHandle, "TimerDelay", 10);
KYFG_SetGrabberValueFloat(grabberHandle, "TimerDuration", 25000000.0); // 25 seconds of operation, maximum 34 seconds
KYFG_SetGrabberValueEnum_ByValueName(grabberHandle, "TimerActivation", "RisingEdge");
KYFG_SetGrabberValueEnum(grabberHandle, "TimerTriggerSource", 43); // software trigger

2. 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"

KYFG_SetGrabberValueEnum(grabberHandle, "TimerSelector", 1);
KYFG_SetGrabberValueFloat(grabberHandle, "TimerDelay", 2500);
KYFG_SetGrabberValueFloat(grabberHandle, "TimerDuration", 2500); // frame rate of 200 fps
KYFG_SetGrabberValueEnum_ByValueName(grabberHandle, "TimerActivation", "LevelHigh");
KYFG_SetGrabberValueEnum(grabberHandle, "TimerTriggerSource", 48); // timer 0 trigger

3. Configure the camera trigger

KYFG_SetGrabberValueInt(grabberHandle, "CameraSelector", 0); // camera index
KYFG_SetGrabberValueEnum_ByValueName(grabberHandle, CameraTriggerActivation", "AnyEdge");
KYFG_SetGrabberValueEnum_ByValueName(grabberHandle, "CameraTriggerSource" as "KY_TIMER_ACTIVE_1");
KYFG_SetGrabberValueEnum_ByValueName(grabberHandle, "CameraTriggerMode", "On");


4. 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.

KYFG_GrabberExecuteCommand(grabberHandle, "TimerTriggerSoftware");

5. Make sure to check the "RXFrameCounter" to get the exact frames captured by the Frame Grabber and NOT the frame count in the bottom of the GUI picture window.

** Minimum fps that camera should support is ~146 because the timer duration is limited to ~34.35 seconds so it needs time to generate 5000 triggers.

Please Wait!

Please wait... it will take a second!