LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating DLL with LabWindowsCVI or MSVC?

Solved!
Go to solution

Hi,

first of all, I am new to LabWIndows/CVI but have some experience with LabVIEW.

 

Up to now, I usually create dlls with MS Visual Studio and call the exported functions with the Call Library Node-VI.

These dlls provide some specific functions that are used in realtime and non-realtime applications (Windows, PXI, cRIO)

Now, I have seen that it is also possible to create dlls with LabWindows/CVI.

Is there any advantage using LabWindows/CVI? Like special libraries that can be used, better integration with the rest of a LabVIEW application etc?

At the moment, I am not sure for what purpose LabWindows/CVI should be used when creating LabVIEW applications.

Could someone please give some short information if LabWindows/CVI provides better ways to create dlls for LabVIEW?

 

Thanks,

 

Christian

 

 

0 Kudos
Message 1 of 7
(3,601 Views)

You can create DLL's with CVI - but only "non-active" DLL's that don't contain ActiveX objects.

 

I've created dozens of DLL's in CVI (and in MSVS for that matter), it's maybe quite not as straightforward as with MSVS but it does work.  I've used these with MSVS applications as well as CVI applications.

 

It may well be that LabView has a DLL authoring capability, but I don't know of one, I don't use LabView, just CVI.

 

If you do create a DLL in CVI, you will have a dependency on the CVI runtime (another set of DLL's) that will have to be installed with the CVI-authored DLL.  The number and specifics about the CVI runtime depends on what libraries you use in the DLL.

0 Kudos
Message 2 of 7
(3,597 Views)

So this sounds as if there is no advantage using CVI if I just want to write dlls that do some calculations?

 

Regards,

 

Christian

 

0 Kudos
Message 3 of 7
(3,589 Views)
Solution
Accepted by ChristianEC

I wouldn't say that there's no advantage - if you're developing a CVI application, then you've got everything as a CVI project as opposed to also being dependent on an IDE other than CVI (e.g.. MSVS).  I typically group the CVI application together with one or more DLL projects in the same CVI workspace.

 

If you're developing an MSVS application, then there's no advantage to doing the DLL in CVI that I can think of, unless you want to use NI libraries you can't bind to directly from your MSVS application - and I'm not sure that there are any that are like this - I think you have access to most if not all NI libraries through Measurement Studio when you're using MSVS as the development environment for your application.

 

Maybe someone from NI can speak to the question of there being an advantage to using CVI-authored DLL's with a LabView application.

Message 4 of 7
(3,586 Views)

Ok, I think I understand.

My main objective is to create dlls to be called from a LabVIEW application. I thought that CVI provides an easier way to creates these dlls than MSVC does (which does not mean that it is complicated with MSVC). But since I am familiar with dlls in MSVC and as far as I know, there is no limitation using NI libraries in MSVC, there is no need for me to switch to CVI.

Only in case I don't want to use LabVIEW but create a CVI application, MSVC would not be to tool of choice.

 

Thank you very much.

 

0 Kudos
Message 5 of 7
(3,575 Views)

Hello!

 

I could not explain it better. 

In your case you should select the program in which you feel more comfortable.

 

Best regards

 

Lorenz Casper

(AE NIG)

0 Kudos
Message 6 of 7
(3,568 Views)

Christian,

 

You might want to consider using Function Panels. This is quite a powerful concept allowing you to code functions in a tree and adding documentation. It also has the advantage, in your case, in that you can easily create a DLL from a function panel.

 

I would suggest you spend some time looking at "Function Panel Editor" in CVI help, and don't be fooled into thinking that this is just for instruments. Once you have a Function Panel in "Edit mode" you can go to Options->Create DLL Project. Another nice feature of this is that LabVIEW can then import this DLL as an instrument driver and it will appear in the instrument driver pallet with all the documentation entered in CVI. Having said that this appears to be a feature that is not supported in LabVIEW 2010, I don't know if it is there in LabVIEW 2011.

 

Kevin

CVI Certified.

0 Kudos
Message 7 of 7
(3,559 Views)