LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Testing dll file in LabVIEW

I have C# code that initializes force feedback joystick and plays force effect file; vibrates the joystick. I converted console application into a dll file. I want to test this dll file in labview to check that my dll file works.

 

I went to connectivity - .net - constructor node - browsed for my dll file - selected object it showed. I don't know what to do after. I found couple joystick vi's, like joystickacquire vi and initialize joystick vi. Do I use something like this to test it?

 

Please help me with this

0 Kudos
Message 1 of 4
(2,741 Views)

Use the Constructor Node to initialize your .NET object and then use the Property Node and Invoke Node to get/set properties and call methods that you created in the DLL.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(2,705 Views)

I did as what you told me to use. But I don't know what do to from there. I connected the three nodes and chose something in invoke node and property node.

0 Kudos
Message 3 of 4
(2,612 Views)

You need to restructure your C# code into separate classes. Each class that you will want to access from LabVIEW needs to marked as public. Then you can instantiate that class in LabVIEW using a constructor, and call methods and set properties of that class using invoke nodes and property nodes.

 

It appears your current code puts everything in the Form1 class. You could make this work if you make the methods you need public, but it would be much better to separate your logic into its own class.

0 Kudos
Message 4 of 4
(2,578 Views)