If you can confirm your FPGA card is capable of utilizing DMAs and know how to control them for your device, you can use the NI-VISA .NET API
and the below high-level procedure as a structure for communicating between your FPGA device and your PXI controller using the NI-VISA driver. Information on the functions referenced in the procedure below can be found in the NI-VISA .NET Help, which is located at C:\Users\Public\Documents\National Instruments\NI-VISA\Documentation
by default on your machine following downloading the NI-VISA driver.
- Use VISA's MemoryAllocate mechanism to create a DMA-compatible buffer.
- Use VISA's MapAddress command to map the allocated DMA buffer into the process. Be sure to map the allocated buffer, not the PCI memory directly.
- Use device-specific mechanisms to start a DMA transfer. This will include sending the address from MemoryAllocate to the device.
- Use device-specific mechanisms to determine when the transfer is complete.
- Access the data directly in memory through MemoryMap.VirtualAddress, or read offsets using MemoryMap.Peek/Poke commands.
At this point the data is in host memory, and can be accessed as a normal data buffer through MemoryMap.VirtualAddress. Special care is needed to ensure that the data is not consumed while still being modified by the hardware through DMA.