LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

implementing a DLL in LabVIEW

My client has a DLL that exposes the functionality of PCI/PXI cards (1553 bus). I have two questions:
1) I have seen some drivers use ActiveX automation using an ActiveX Refnum and selecting ActiveX class (library and object)and using invoke nodes to access properties and methods. I have seen other drivers directly using the Call Library Function nodes. We expect to code drivers in LabVIEW 6, 7, and 8 and I am thinking the Call Library Function nodes is the way to go. Any experienced advice would be appreciated.
2) the client has asked how interrupts and pointers, and memory allocation are handled. I believe that LabVIEW handles this behind the scenes, but to explain this knowledgeably to the client I am not prepared, and interrupts may be a real issue - any links to white papers or tutorials specific to this low level stuff ...
thanx
lmd2
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 1 of 3
(3,619 Views)

Hi Lawrence,

For your first question, I would agree with you that the call library function node is the way to go. If your driver is accessible through a dll, you can use the "call library function node" to pass data to and receive data from that dll. For information about using dlls and other third party software with LabVIEW, see the on-line help for building a shared library. Also, there are some great examples that will help you get started: one found in NI Developer Zone called Calling a C-built DLL in LabVIEW to Generate and Sort an Array of Numbers and a few in the NI Example Finder called Call DLL.vi and Import Shared Library Tutorial GUI.vi. If you just type DLLs in the search tab, you will get several results that should help you out. As for ActiveX, it is a great way to access external programs in LabVIEW. However, you will need to have an ActiveX interface component provided by the manufacturers of the PCI card. This is generally used for Windows applications so I am not sure if you would be able to do this.

As for information about pointers, handles and memory allocation, there is a great article found in the LabVIEW Help called Memory Manager. I hope this helps!

Carla

Message Edited by Support on 06-09-2009 03:25 PM
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,583 Views)
Thanx,
I recently worked with a driver for a motion controller that exposed the functions through ActiveX invoke nodes, very easy - I didn't realize that it wasn't a generally available option. The Call Library Function Node will have to do, here is a good tutorial:
http://zone.ni.com/devzone/cda/tut/p/id/3009

Your link to the memory manager is just what I needed,
thanx again,
lmd2
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 3 of 3
(3,574 Views)