Acquire Images; Control Digital Input / Output (Gpio) - XIMEA xiQ series Technical Manual

Usb 3.0 camera
Hide thumbs Also See for xiQ series:
Table of Contents

Advertisement

5.6.5.3.

Acquire Images

This example shows how the acquisition is started on the device with it handle xiH, ten images are acquired in a row and the
acquisition is stopped.
xiStartAcquisition(xiH);
HandleResult(stat,"xiStartAcquisition");
#define
EXPECTED_IMAGES 10
for (int
images=0;images < EXPECTED_IMAGES;images++)
{
// getting image from camera
stat = xiGetImage(xiH, 5000, &image);
HandleResult(stat,"xiGetImage");
printf("Image %d (%dx%d) received from
(int)image.width, (int)image.height);
}
xiStopAcquisition(xiH);
5.6.5.4.

Control Digital Input / Output (GPIO)

Hardware Trigger and Exposure Active output
In this setup each image is triggered by a Digital Input Trigger. After the image is triggered, it can be transferred using
xiGetImage.
This setup ensures a low latency between the trigger signal and image Exposure start. This time should be less than 10µs.
Digital Input
Trigger
figure 5-15, GPIO - schematic
HANDLE xiH;
xiOpenDevice(0, & xiH);
// select trigger source
xiSetParamInt(xiH, XI_PRM_TRG_SOURCE, XI_TRG_EDGE_RISING);
// select input pin 1 mode
xiSetParamInt(xiH, XI_PRM_GPI_SELECTOR, 1);
xiSetParamInt(xiH, XI_PRM_GPI_MODE, XI_GPI_TRIGGER)
// set digital output 1 mode
xiSetParamInt(xiH, XI_PRM_GPO_SELECTOR, 1);
xiSetParamInt(xiH, XI_PRM_GPO_MODE,
xiStartAcquisition(handle1);
// Trigger signal should start image exposure within timeout
#define
TIMEOUT_IMAGE_WAITING_MS 10000
xiGetImage(handle, TIMEOUT_IMAGE_WAITING_MS, &image);
// process image here...
xiQ - Technical Manual Version 1.0
Digital Output
Exposure Active
Camera
Data
Only
PC with
application
camera\n", images,
XI_GPO_EXPOSURE_ACTIVE);
89

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents