tags:

views:

204

answers:

2

I am writing an application using labview and need to use external code. I have read that using CINs are old fashioned and 'wrong' to use. Is this correct? Should I use shared dlls instead?

What are the advantages/disadvantages of both methods?

+4  A: 

I don't have personal experience of writing external code to be called by LabVIEW, but from the NI knowledge base: "When given the choice, a DLL is the choice to make."

The advantages they list include:

  • Many processes can share a single copy of the DLL in memory
  • Many applications can share a single copy of the DLL on disk
  • Modifying the functions in a DLL does not require a recompile of the calling application
  • Only certain (obsolete?) development environments are supported for creating CINs.

Potential disadvantages of DLLs are:

  • The first two items on the list above ;-)
  • You need to remember to include the DLL as a support file when building an application from LabVIEW
  • CIN code can be platform independent, while DLL/shared libraries may need rewriting for each platform.

I'm pretty sure that every time I have seen this discussion in several years of following LabVIEW lists and forums the advice has been the same: CINs are obsolete, use DLLs - just be aware of the potential issues they can cause.

nekomatic
+1  A: 

Thanks nekomatic for your answer. If anyone else is interested in this I found an article from the depths of the internet that explains advantages and disadvantages of both methods. Turns out CINS used to have advantages over shared dlls before labview 8.20, but they are obsololete now.

FTA: CINs have basically not one single advantage anymore over the use of the Call Library Node but quite a few disadvantages

alex77