04-12-2012 10:13 AM
I am using a Managed .net assembly (DLL) provided by microchip for their MCP2210 device. It is suppose to be .net 2.0 compliant.
The assembly file is named MCP2210DLL-M.dll. Using a constructor I select the assembly, create an "property node", and create an "invoke node". Upon running the VI I receive an "Invalid Constructor error".
The constructor node takes in two parameters for the Device (MCP2210). The Device is a USB-to-SPI Protocol Converter. I am able to successfully use this assembly file in Visual Studio 2005 without problems. My version of Labview has all the latest updates including a patch to correct for a .net 2.0 problem. I have selected the correct assembly in the constructor node and the correct constructor is displayed. The assembly also resides in the same directory (folder) as the VI. I have attached my VI for which I am having problems with. Any help would be appreciated.
Thanks,
Bryan
04-12-2012 11:07 AM
Could you provide the DLL you are using? Then I can try and duplicate your problem.
04-12-2012 11:34 AM
Sure, this is the DLL.
04-12-2012 01:01 PM
The problem isn't with the assembly. The problem is with LabVIEW. By the patch I'm assuming you're referring to the f2 patch. That patch fixed some of the issues with .NET 2.0, but just enough to get it mostly working. There were still numerous issues with getting .NET 2.0 to work in LabVIEW 7.1.1. This appears to be one of them. The assembly loads just fine in later versions of LabVIEW. For example, I can open the VI just fine with no errors and the correct constructor in LabVIEW 8.2.
Short of upgrading LabVIEW, you can try to create a wrapper assembly that provides a non-parameterized constructor.
04-12-2012 02:15 PM
I kind of figured it was the 7.1.1 version. We (the company work for) are still considering upgrading Labview. For now I'll have to work with VB.net I guess.
Thanks,
Brian
04-29-2014 03:18 AM
04-29-2014 05:07 PM
This forum post is overe two years old. So that your post can be better addressed by the community please create a new post with your question and a link to this forum. Have a good day