03-09-2015 03:22 AM
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
03-09-2015 07:50 AM
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.
03-19-2015 01:33 AM
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.
03-19-2015 02:08 PM
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.