LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am having difficulty setting up a .NET interface in 7.1.

I am interfacing to an industrial FieldBus network via .NET interface from LabVIEW.

First, I found the 1172 error because I did not put the 3rd party assembly in the same directory as the VI is saved. Why is this required?

After learning about the footnote that says you have to do that for assemblies, I discovered that the
0 Kudos
Message 1 of 4
(3,137 Views)
The requirements specified here are some of the current limitations of calling .NET assemblies from LabVIEW.

Are you getting errors beyond that?

Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 4
(3,137 Views)
Thanks for the response. Yes I have gotten past that step. FYI, I am using an ADS Communication library from Beckhoff Automation in .NET Framework 1.1; LabVIEW 7.1.

Link to ADS Assembly. Please contact Beckhoff for a license to their library.

Here are the steps that I am testing with separate VI's:

0. Verify hardware constructor: Create Client and call a method to open a remote IO connection (Connect).
==> OK, no error

1. Verify method Client.Read works after connection.
==> Fails with error 1172;
Error.Source indicates that a reference does not refer to a valid object. The only reference in the Read me
thod refers to a stream class, AdsStream.

In Step 1, I construct the AdsStream class (with a length parameter in the constructor) and pass the refnum to the Read method. The read method returns the 1172 error. No errors are returned by the AdsStream constructor.

I have verified that I have the correct .NET assembly in my working directory. I have selected the proper constructor for each object.

I have a deadline of Friday to resolve this issue and appreciate your assistance. You can also contact me by E
-Mail


If responding by email, please use a subject of "SR# 624113" so my email filters will correctly sort it.
0 Kudos
Message 3 of 4
(3,137 Views)
If you follow the instructions from this KnowledgeBase, you should be able to access the .NET assembly. From what you�re mentioning, you ARE able to successfully establish a connection to the .NET assembly, but you are getting errors when calling certain methods.

The error 1172 is a generic .NET error that is generated whenever there�s a fail in the communication with the .NET assembly. If the error is generated from the �Invoke Node�, it probably means that the method is either not legal to execute at that point in the sequence or that the connection timed out.

Either way, you seem to be over the LabVIEW hurdle, so I would recommend yo
u to get the documentation for the order/sequence of executed methods and properties from Beckhoff.


I hope you will be able to get it to work in time.

Best regards,
Philip C.
Applications Engineer
National Instruments
www.ni.com/ask
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(3,137 Views)