LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

understanding code interface nodes

I am trying to control a piece of hardware from within LabView for which there is a DLL provided by the manufacturer. There are also some sample VIs that can do some of what I want, but not all, so I am looking at their block diagrams to try to understand how to get access to the functions I need. However, they use the "code interface nodes" which seem completely mystical to me because as far as I can tell, there is nothing provided telling LabView what function to even access!

I've been searching for useful documentation on this but have not been able to find any yet. Can anyone point me out to a good resource on understanding how to look at someone else's VI with a code interface node and knowing what they did to make it call the correct function?

Attached is a picture of an entire block diagram of one of the sub VIs in question.
0 Kudos
Message 1 of 3
(4,707 Views)
A Code Interface Node is a different beast from a DLL. If you have a DLL you just need to use Call Library Function Node. Under certain circumstances you *may* need to create a wrapper for the DLL if it's using complicated parameter types. In this case you can either create a wrapper DLL or a wrapper CIN. CINs are generally more complicated. The LabVIEW Help explains the difference between them.

To learn how to call a DLL from LabVIEW there's a very good example that ships with LabVIEW. Open the Example Finder (Help -> Find Examples) and search for "DLL". Open the example called "Call DLL" that shows you how to call a DLL using various parameter types.
0 Kudos
Message 2 of 3
(4,701 Views)

There's also information on ni.com:

How Do I Call a Dynamic Link Library (DLL) from LabVIEW?

And LabVIEW Help (Open labVIEW>>Help>>Search the LabVIEW Help)
Documents:
Search for Call Library function node you'll find:

Call Library Function Node
Importing Functions from a Shared Library File (Windows Only)
Code Interface Node Functions
Etc

Good luck

Van L
NI Applications Engineer
0 Kudos
Message 3 of 3
(4,660 Views)