LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to call a DLL(C#) in labview?

I have a WPF in C#, in which there is 4 DLLs. I want to use the DLLs in labview by 'call library function node', but I don't know how to set the parameters inside. And do I need to adjust my labview? the attachment is one of the DLL.
0 Kudos
Message 1 of 4
(3,106 Views)

Hi,

 

Your DLL is missing in your post.

 

You can use call Library Function to call any DLL, If you have knowledge about DLL link functions, parameters and data type you can easily create variables.

check some examples of call DLL in LabVIEW and try to develope same.

 

Check on help menubar of LabVIEW select find examples and typr DLL....

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
Message 2 of 4
(3,100 Views)

double click on the call function node. First tab point to dll and which function, then under parameters you can specify the IO. Matching the C types is not as easy as it seems. Search this website for more details on the advanced types and also the example under communicating with external apps ->using external code->integrating dlls--> call dlls.vi

 

 

Hope it helps

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 3 of 4
(3,095 Views)

Since you use C# it is likely that your DLLs are not normal standard DLL libraries but rather .Net assemblies. They do not export functions, which the Call Library Node can access, but instead export .Net interfaces that you need to access using the LabVIEW .Net functions.

 

But there might be some issues with LabVIEW and WPF UI interaction. Both environments do their rather involved own thing with the Windows GUI handling that could bite each other sometimes. So if your WPF library does lots of UI you could run into this.

Rolf Kalbermatter
My Blog
Message 4 of 4
(3,086 Views)