I am trying to follow your suggestion, nathand, but I have run into a snag. The polling function in this .NET DLL takes two pointer arguments: an int32* and a double. I have seen in various places how to pass a pointer into a C/C++ function using the Call Library Function VI, but I do not see any way to do this in .NET.
Is there any way to reference an int32 in LabView to pass into my .NET method and to dereference it after the method has finished?
Did you try dropping a method node for this function on your block diagram? If you do, you'll see that LabVIEW handles it for you by providing both an input and an output for that parameter.
Holy cow! I was over-thinking it, assuming I had to create a pointer to an int32 that I could pass into the method node, and then some way to dereference that pointer to get the int value. Thank you very much, nathand--it is working now!
I think I am working with a similar device (using Bertec SDK also), but am encountering an error when I try to run my program. I am using LabVIEW 11.0.1 (32-bit) on a Windows 8 64-bit system. When I run the .vi, I get the error "System.DllNotFoundException" and that LabVIEW was "unable to load dll". My .vi and LabVIEW are in the same folder. Does anyone know what might be causing the problem and how to get around it?
Thanks for the help!
It is possible that the DLL was created in a different .NET version than what LabVIEW is expecting. The KnowledgeBase article included below details how to point LabVIEW towards the .NET 4.0 Framework. I also included a KnowledgeBase article that describes the requirements for running an executable that uses .NET assemblies, which you may find helpful in your future work. I hope this helps!
Changing .NET Framework Version: http://digital.ni.com/public.nsf/allkb/32B0BA28A72AA87D8625782600737DE9
Requirements for using .NET assemblies in LabVIEW Executable: http://digital.ni.com/public.nsf/allkb/9E1CFF2B47EC4FD386257116005FAB3E?OpenDocument
Thanks for the reply JasonAE. I tried the fix mentioned in the links you provided, but it wasn't able to fix the issue. The .vi was created in LabVIEW version 2012 SP1 and saved for a previous version (2011), which I am using. Could that be causing the problem?
Ahh! I seem to have fixed it. The problem was that I was missing a dll in the same folder as the vi so even though I had the rest of all except this one, the program was getting hung up. Thanks for the help!
Would anyone mind posting their program? I am having a lot of trouble with my program. I do not think that I am able to get Labview to read the force plates, even though I've downloaded the SDK.
Since this is an older thread, you might consider making one of your own! You could always link this thread to your new post for reference. It makes it easier to fish through these forums if each thread contains one problem and its solution.
Either way, your best approach would probably be to post your code so that the community can take a look at it and give you some advice!