取消
显示结果 
搜索替代 
您的意思是: 

Invalid .net Constructor in Labview 7.1.1

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

0 项奖励
1 条消息(共 7 条)
5,122 次查看

Could you provide the DLL you are using? Then I can try and duplicate your problem.

0 项奖励
2 条消息(共 7 条)
5,115 次查看

Sure, this is the DLL.

 

 

0 项奖励
3 条消息(共 7 条)
5,113 次查看

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.

4 条消息(共 7 条)
5,107 次查看

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

0 项奖励
5 条消息(共 7 条)
5,101 次查看

Dear 

 

Please provide help with loading the assembly in LabVieW. 

 

Thank you!

0 项奖励
6 条消息(共 7 条)
4,720 次查看

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

Alex D
Systems Engineer
Academic Research
National Instruments
0 项奖励
7 条消息(共 7 条)
4,684 次查看