LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a labview object to a .Net component

Solved!
Go to solution

Hello

 

And first of all thanks for looking at this.

 

I'm a bit new to .Net and LabView and am having difficulty passing some information to a .NET component I have. (See attached vi)

 

In it you will see one input is called "ListOfDP" and I have no idea what to pass to this input.

 

I have included the a zip file with my test.vi and the  dll that the application is trying to pick up so hopefully all the information is there.

 

Can someone show me what this vi is asking for?

 

Big thanks in advance

 

Chuck

Download All
0 Kudos
Message 1 of 6
(3,463 Views)

Hi Nickleback,

 

Can you tell me if this is a DLL you created yourself? When I try to load the assembly I see the attached message, which seems to indicate that the problem is with the DLL and not with your LabVIEW code, can you tell me whether you're recieving the same error message when you're selecting the .NET constructor?

 

If you are then the issue will be with the DLL, I don't have a lot of experience with .NET but there are a couple of steps I can recommend:

 

Verify that your .NET framework version is version 4.0, as this is the version LabVIEW uses.

Check that all public classes and functions are available.

If you created the DLL, ensure that it was set to be com visible.

 

You can also consult the LabVIEW help on this matter:

http://zone.ni.com/reference/en-XX/help/371361M-01/lvconcepts/using__net_with_labview/

http://zone.ni.com/reference/en-XX/help/371361M-01/lvcomm/dotnet_pal/

 

Regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 2 of 6
(3,423 Views)

Thank you Jake for looking.

 

I can build the assemblies (I should say I didn't write them but I have the sources and can build them) so try these which i have rebuilt as you describe:

I remember I had to change my LabView installation to run with .NET framework 2.00 for the same reason you mention but for another component which is un-related to this issue.

 

Sorry for the confusion

 

Chuck

0 Kudos
Message 3 of 6
(3,413 Views)

Hi Nickleback,

 

I ran the code you attached, but I experienced the same error. I was discussing your case with a colleauge and he informed me that you have a service request open with another AE. It's probably best if I let him deal with this case since it's not efficient to have two AEs working on the same service request. The thread will be useful, though, in case any of the community members wish to weigh in on the matter.

 

Regards,

Jake A

Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 4 of 6
(3,408 Views)

Sounds good thanks.

 

I will also let the NI AE know about the .Net 2 issus you found

 

Best Reguards

 

Chuck

0 Kudos
Message 5 of 6
(3,397 Views)
Solution
Accepted by topic author Nickleback

Hello

 

I hate it when a post is left hanging so:

 

The guys at NI have save the day and come up with a solution (see attachment)

 

If anybody is having trouble getting the .Net components to load you need to register them first by installing .NET Framework 4.0 (if its not installed already) and running USBClassReg.bat (also in the attachment)

The solution is in Test-edited.vi with the origional issue in Test.vi

 

Thanks everyone

 

Chuck

0 Kudos
Message 6 of 6
(3,367 Views)