LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing a DLL in C# (Sharp)

I need to find a way to generate a DLL in C#  which can be called by Labview. Our IT department writes its code in C#. They are to provide us with a company standard DLL so that we can read and write their database from our test stands. I understand that to interface with Labview, the DLL must provide calls in the "C" format. I'm not familiar with C#, but when I "google" the topic "C# DLL" they seem to want to provide linkage in C++ Class form related rather than pure C format.

Has anyone had experience in creating a DLL in C# that can become a Labview VI? I would appreciate any comments on this.

(I have cross posted this to the .NET forum as this seems to span both categories).
0 Kudos
Message 1 of 4
(3,042 Views)
C# is a .NET language. Technically, it doesn't create DLLs in the classical sense. Rather, it creates .NET assembies. However, these can easily be called in LabVIEW using the .NET functions. In fact, I've done this several times and have created a .NET assembly (DLL) that gets called from LabVIEW.

Do you need to actually create a DLL because you need it to run on a computer that doesn't have .NET? If so, you should use C/C++ rather than C# to create the DLL.
0 Kudos
Message 2 of 4
(3,035 Views)
Thanks for your response. No I really don't need a DLL if the NET method will work. What ever is simpler for both IT and my group. I guess I need to read up on the NET interface to LabView. Thanks for pointing me in the correct direction.
0 Kudos
Message 3 of 4
(3,020 Views)

A good starting point would be the article entitled Using .NET with LabVIEW found in the LabVIEW help.

 
Eric V
National Instruments
Applications Engineer
Certified LabVIEW Associate Developer


"I'm a Ramblin' Wreck from Georgia Tech and a helluva (NI Applications) Engineer!"
Message 4 of 4
(2,995 Views)