Showing results for 
Search instead for 
Did you mean: 

Given client .dll, Which is better LabWindows/CVi or LabVIEW CIN or LibraryFNode

Given that there is a Server app on another PC and the Client Win .dll is available; what is best approach? To use LabWindows/CVI or LabVIEW CIN, Code Interface Node or use LabVIEW Call Library Function Node? External code is in C, no source C available.


Calls have to be made to open the connection, check the connection is valid, subscribe to the data, and eventually close the connection. The data would be gotten from polled calls and the data parsed out.

0 Kudos
Message 1 of 10

You might want to consider ActiveX automation with LabVIEW if the dll is COM.

0 Kudos
Message 2 of 10

Don't use a CIN - it's deprecated and its use is discouraged.  A DLL call is just as good and more standard.


I don't quite understand what you are asking.  Do you already have the DLL you want to call?  If you don't have the source, how do you know what language it's in (and why does it matter, so long as it's documented and follows standard calling conventions)?  If you already have the DLL, it's not hard to configure LabVIEW to call it unless the parameters are particularly complex, and even then you can usually make it work.  What's your eventual goal?  Are you more familiar with LabVIEW or with LabWindows?  Either can call a DLL, and you haven't provided enough information to help you decide which is more appropriate.

0 Kudos
Message 3 of 10

The first group prefers to stay with LabVIEW as much as possible and have a huge chuck done and verified.

A new group came into the picture that has a C++ / C# preference, did the server and client dll as they do it.

The dll was delivered with sample C on how to implement the client.

The main body is done in LabVIEW so it would be best to remain with LV.

0 Kudos
Message 4 of 10

Is there someone responsible for making this decision, and you're looking for arguments in favor of one approach?  Or, are you the person responsible for making the decision?  You're asking on a LabVIEW board; I expect most people would tell you to do it in LabVIEW.  I've worked with a lot of DLLs for which sample code was available only in C, and it's never been a major hurdle to making it work in LabVIEW (although it helps to have enough understanding of C to be able to understand the sample code). 


If you need help specifically with the conversion from C to LabVIEW, post your LabVIEW code and the sample C code (if you're able to do so) along with an explanation of the problems you're encountering.

0 Kudos
Message 5 of 10

Since your main app seems to be in LabVIEW already this sounds like a no brainer. CINs are out and highly discouraged for new developments. I even believe that the 64 bit versions don't really support CIN development anymore.


Rewriting the whole application in LabWindows/CVI sounds like an awful waste of resources.


So this leaves the Call Library Node in LabVIEW. As already mentioned if the parameters of the functions aren't to complicated (to complicated would be structures containing string and/or array pointers) or any function pointers either as parameter of embedded in structures) then you can usually solve it with simply using the Call Library Node. If the DLL uses functions with complicated parameters you may have some use for the CVI compiler here, to write a wrapper DLL that translates between the DLL parameters and more friendly LabVIEW parameters.


Since the DLL seems to be an interface to a network protocol, an alternative might be to implement that protocol in LabVIEW, but this would require a relatively stable protocol. You don't want the situation that the other team makes changes to the protocol and throws it over the fence, snearing at you that you would have no trouble if you used their DLL.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 6 of 10

I found the following manual - LabVIEW, Using External Code in LabVIEW, April 2003 Ed., P/N 370109B-01, which I am beginning to use. Are there any specific good examples VI's to look at?


It sounds like most advice points to look at Call Library Function Node to call external code and to make sure external code complies with standard shared libraries convensions; then work your way through the calls.


I also found the App Note - Using LabVIEW with TCP/IP and UDP, which maybe useful as a side note.

0 Kudos
Message 7 of 10

That is an outdated manual, as it refers to an older version of LabVIEW. The most recent version is included as part of the LabVIEW Help. If you do not have access to LabVIEW, you can still view the LabVIEW Help online. You did not indicate which version of LabVIEW you are using, but the one for 2011 is here: The specific section you want is here:

0 Kudos
Message 8 of 10

LabVIEW - Updated to latest 2011 version.

0 Kudos
Message 9 of 10

Also, there are many examples on how to pass simpler arguments into you dll nodes here: C:\Program Files\National Instruments\LabVIEW 2011\examples\dll

0 Kudos
Message 10 of 10