LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Allocating host memory for DMA transfers

I have a project where I need to create an application to do register level communication and DMA transfers with a variety of custom PCI devices that all have similar characteristics. I have used the NI VISA Driver Wizard to create a driver for one of the custom PCI cards. The VISA register I/O is working but the DMA transfers are not. The device requires host memory that is aligned to a 64-byte boundary, so I have used the LabView memory manager function "DSNewAlignedHClr" to allocate the host memory. I found the forum article ( https://forums.ni.com/t5/LabVIEW/Allocating-Host-PC-Memory-to-do-a-DMA-Transfer/td-p/3353574 ) which discusses a similar problem. This post is from a number of years ago, so I would like to know if there are any new ways to be able to get a physical memory address for the aligned memory that I have allocated. I am trying to avoid having to write a kernel driver for each type of PCI device, so I would prefer to use the VISA driver if possible. Are there any functions within the LabVIEW API that I can use to get a physical memory address? Is there a way to use the new Data Value Reference functions in LabVIEW to access physical memory? Any suggestions you have would be greatly appreciated.

0 Kudos
Message 1 of 2
(691 Views)

I'm not aware of any new developments in this regard. NI-VISA is in a mature life cycle. It means that since many years it is what it is and what works does work and what doesn't will likely never work again. NI puts some effort in to maintain its working on newer operating systems such as Windows 11 and recent Linux versions (but has basically abandoned MacOS by now). Anything more is almost certainly not forthcoming.

 

Use of NI-VISA for custom hardware has been getting more and more a fringe experience for various reason, some of them entirely beyond the control of NI. The way to go forward for such hardware really is to bite the sour apple and hire someone who knows about kernel driver development. And yes this still is a very different experience to your standard DLL programming experience in C and even more so to LabVIEW programming. And if you want to support more than one OS, it gets even more complicated.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(655 Views)