How to make use of the frame grabbers DMA memory under IMPACT?


The first thing that user has to be sure of is that the DMA memory of the frame grabber
is large enough to hold the sequence. Therefore you have to set the DMA memory of
the grabber to a sufficient value. This can be done with the "setDMA.exe" tool, which comes with the boards driver.

Under Impact S you can now select "use device memory if possible" under "Acquisition options"->"Sequence".
The disadvantage of this approach is, that you need twice the amount of RAM because after the
acquisition Impact needs to copy the images into a compatible buffer array.

When using the SDK you can try the following:

Sequence in DMA memory of the frame grabberr:
// open device
    DEV_Open(&device, "matrixvision.ddc");
// check how many images fit into the DMA memory of the board
 IPL_LONG dmaframes = 0;
 DEV_InquireCaps(device, (DEV_CAPSTYPE)DEV_NUMBER_FRAMES, &dmaframes);
 // check actual image size
 IPL_LONG capwidth=0, capheight=0;
 DEV_InquireCaps(device, DEV_CAPWINDOW_WIDTH, &capwidth);
 DEV_InquireCaps(device, DEV_CAPWINDOW_HEIGHT, &capheight);
 // allocate IPL Buffer
 IPL_BufAlloc(&buffer, capwidth, capheight, 1, 1, dmaframes, IPL_DTUCHAR, IPL_IMAGEBUF, NULL);
 // tell the device to use DMA memory
 IPL_LONG usedma = 1;
 DEV_ControlCaps(device, DEV_FORCE_ACQUIRE_DEVMEM, &usedma);
// record sequence
DEV_Grab(device, &buffer);
 // close device
 // free allocated buffers

Like under Impact S you will need twice the amount of RAM (the DMA memory and the IPL_Buffer array

Go back