I am new to this forum and hope you can help me with a little problem I have here.
I am working with a Dalsa Xcelera Board. I configured a hardware frametrigger using CamExpert and saved the configuration as a ccf file. In CamExpert this configuration works fine but when I use this file in CVB I can load the framegrabber but I do not get any images.
I think @Theo might have an idea, what the problem is.
probably you are using the CVB Grabber OCX which deactivates the frametrigger on the Xcelera Board. In the SDK from Dalsa (SaperaLT) this parameter is called CORACQ_PRM_CAM_TRIGGER_ENABLE and has to be activated again before starting the acquisition.
For this you can use the IDeviceControl Interface which allows you to access several parameteres of the grabber.
long ok = 0;
long lInputSize = 2 * sizeof(UINT32);
UINT32 *ui32Input = (UINT32 *)malloc(lInputSize);
long dummy = 0;
ui32Input = CORACQ_PRM_CAM_TRIGGER_ENABLE; // SAPERA Acquisition Parameter
ui32Input = 1; // activate frame trigger
ok = DCBinaryCommand((IMG)m_cvImg.GetImage(), DeviceCtrlCmd(DC_SAPERA_ACQ_PARAMETER, DC_SET), ui32Input, lInputSize, NULL, dummy);
free(ui32Input); // free memory
You have to include “idc_sapera.h” (\Common Vision Blox\Lib\C) and “capiacqd.h” (DALSA Coreco\Sapera\Include) into your project.
hope that helps,
but why does the OCX change the setting in the first place?
The Grabber Control (CVGrabber.ocx) holds a serialized grabber configuration defined at design time. When your application uses a grabber control and starts up, the grabber control therefore already “knows” what trigger mode it wants to use and as soon as you assign the
Image property it will if possible set - among others - the predefined trigger mode on the new camera/driver handle.
This can give rise to the following scenario:
- Your application is configured to e.g. use TriggerMode = 0 (free run)
- Your Xcelera.vin has been configured to use trigger signals e.g. by means of a Sapera configuration file
- Your application loads the driver and assigns it to the grabber control
- The grabber control overwrites the preconfigured triggered acquisition with its desired trigger mode 0…