USB 3.x GigE |
USB 3.x GigE |
Syntax
INT is_Trigger (HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)
Description
is_Trigger() activates the burst trigger mode in GigE and USB 3 uEye cameras. In burst trigger mode, the camera captures a series of images in rapid succession on receipt of a single trigger signal. The trigger signal can be transmitted via external hardware trigger via the digital input of the camera. is_CaptureVideo() is used for image acquisition because multiple images have to be transferred (see Example 3).
The burst images are captured and transferred at maximum speed. The maximum speed depends on the parameters pixel clock (see is_PixelClock()) and exposure time (see is_Exposure()). For GigE uEye cameras, is_Transfer() allows adjusting the latency of image data transfer.
The burst trigger mode can only be used in hardware trigger. For image acquisition, is_CaptureVideo() is used. A trigger is activated either via the camera's trigger pin or via a call to is_ForceTrigger(). The UI-359xLE model and the uEye LE USB 3.1 Gen 1 camera family currently do not support the burst trigger mode. |
Note on trigger delay in burst trigger mode
If you set a trigger delay with the is_SetTriggerDelay() function, the delay will only apply to the first image after each trigger signal.
Setting a trigger prescaler
In addition, you can set a trigger prescaler with this function. Via the trigger prescaler (frequency divider) you can set for some uEye models that the trigger signal is divided by the set value. This is necessary when the trigger signal delivers more pulses as needed for the captures. With the set value, e.g. 40, you define that the camera captures an image only every 40th trigger signal (see uEye Cockpit: Properties - Trigger).
The trigger prescaler is currently supported by the following models in hardware trigger mode: •USB 3 uEye CP Rev. 2 •USB 3 uEye CP •USB 3 uEye LE •USB 3 uEye ML •GigE uEye CP Rev. 2 •GigE uEye CP •GigE uEye FA •GigE uEye SE Rev. 4 |
The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the cbSizeOfParam input parameter.
Input parameters
hCam |
Camera handle |
pParam |
Pointer to a function parameter, whose function depends on nCommand. |
cbSizeOfParam |
Size (in bytes) of the memory area to which pParam refers. |
Contents of the RANGE_OF_VALUES_U32 structure
UINT |
u32Minimum |
Minimum value |
UINT |
u32Maximum |
Maximum value |
UINT |
u32Increment |
Increment |
UINT |
u32Default |
Default value |
Return values
IS_INVALID_CAMERA_HANDLE |
Invalid camera handle |
IS_INVALID_PARAMETER |
One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. |
IS_NO_SUCCESS |
General error message |
IS_NOT_SUPPORTED |
The camera model used here does not support this function or setting. |
IS_SUCCESS |
Function executed successfully |
Related functions
UINT nTriggerBurstSizeSupported = 0;
INT nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_BURST_SIZE_SUPPORTED,
(void*)&nTriggerBurstSizeSupported, sizeof(nTriggerBurstSizeSupported));
if (nRet == IS_SUCCESS) {
// Burst size supported
if (nTriggerBurstSizeSupported == 1) {
RANGE_OF_VALUES_U32 rangeBurstSize;
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_BURST_SIZE_RANGE,
(void*)&rangeBurstSize, sizeof(rangeBurstSize));
if (nRet == IS_SUCCESS) {
UINT nMin, nMax;
nMin = rangeBurstSize.u32Minimum;
nMax = rangeBurstSize.u32Maximum;
}
}
}
UINT nTriggerBurstSize = 0;
INT nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_BURST_SIZE, (void*)&nTriggerBurstSize,
sizeof(nTriggerBurstSize));
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_SET_BURST_SIZE, (void*)&nTriggerBurstSize,
sizeof(nTriggerBurstSize));
// Trigger burst with image queue
// Init camera
int BurstSize = 8;
/* Set trigger mode */
nRet = is_SetExternalTrigger(m_hCam, IS_SET_TRIGGER_HI_LO);
/* Set image burst size */
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_SET_BURST_SIZE, &BurstSize, sizeof(BurstSize));
/* Start capture */
nRet = is_CaptureVideo(m_hCam, IS_DONT_WAIT);
/* Retrieve images */
for (int i = 0; i < BurstSize; ++i)
{
int memID;
char *memBuffer;
nRet = is_WaitForNextImage(m_hCam, Timeout, &memBuffer, &memID);
if (nRet == IS_SUCCESS)
{
…
}
}
UINT nLinePrescalerSupported = 0;
INT nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_LINE_PRESCALER_SUPPORTED,
(void*)&nLinePrescalerSupported, sizeof(nLinePrescalerSupported));
if (nRet == IS_SUCCESS)
{
// Prescaler supported
if (nLinePrescalerSupported== 1)
{
RANGE_OF_VALUES_U32 rangePrescaler;
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_LINE_PRESCALER_RANGE,
(void*)&rangePrescaler, sizeof(rangePrescaler));
if (nRet == IS_SUCCESS)
{
UINT nMin, nMax;
nMin = rangePrescaler.u32Minimum;
nMax = rangePrescaler.u32Maximum;
}
}
}
UINT nPrescaler = 0;
INT nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_LINE_PRESCALER,
(void*)&nPrescaler, sizeof(nPrescaler));
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_SET_LINE_PRESCALER, (void*)&nPrescaler, sizeof(nPrescaler));
UINT nFramePrescalerSupported = 0;
INT nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_FRAME_PRESCALER_SUPPORTED,
(void*)&nFramePrescalerSupported, sizeof(nFramePrescalerSupported));
if (nRet == IS_SUCCESS)
{
// Prescaler supported
if (nFramePrescalerSupported == 1)
{
RANGE_OF_VALUES_U32 rangePrescaler;
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_FRAME_PRESCALER_RANGE,
(void*)&rangePrescaler, sizeof(rangePrescaler));
if (nRet == IS_SUCCESS)
{
UINT nMin, nMax;
nMin = rangePrescaler.u32Minimum;
nMax = rangePrescaler.u32Maximum;
}
}
}
UINT nPrescaler = 0;
INT nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_GET_FRAME_PRESCALER,
(void*)&nPrescaler, sizeof(nPrescaler));
nRet = is_Trigger(m_hCam, IS_TRIGGER_CMD_SET_FRAME_PRESCALER, (void*)&nPrescaler, sizeof(nPrescaler));