12-28-2015 07:35 AM - edited 12-28-2015 07:35 AM
Hello,
I want to use the methods provided by the mpusbapi.dll in order to communicate the labview with a pic microcontroller. With the purpose to achieve this, I have tried to use the LabView functions from the .NET palette (Constructor node, Property node, Invoke node..) in order to access to the methods of the dll. Unfortunately, I get the following error:
System.BadImageFormatException: The file 'mpusbapi.dll' can't be loaded. It was expected that the module had an assembly manifest.
On the other hand, if I use the LabVIEW function Call Library Function Node then it works properly, and I can access to the functions of the dll. However, I have checked that this function slows the execution of the LabVIEW program very much and for me, the speed on the execution is very critical. Is this true? The call library function node is much slow compared to the constructor node? I want to clarify that the error checking of the function is disabled, but the call still being slow.
Any help is appreciated. Sorry for my english.
12-28-2015 08:45 AM
12-28-2015 03:27 PM - edited 12-28-2015 03:28 PM
After dll has been loaded, it works very fast, it does not matter whether it is a .NET assembly or simple dll. The linking mechanism of dll into Labview is not a problem.
What can slow the program is
microcontroller response
dll function implementation
your program, overloading communication with extra data, unnecessary operations.
What is your data rate? How fast can microcontroller give out data? How often are you demanding them? Does communication interfere with user interface?
PS: mpusbapi.dll from microchip is a regular dll, not .NET assembly.