NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

关于N4010在teststand 中的应用——————急

Could you try passing the .NET reference out of the Open VI and store it in TestStand as an object reference? Then, pass the object reference into the Set VI and attempt to use it. Finally, pass the object reference into the Close VI and attempt to close it.

 

One thing you could do is set a breakpoint after the Open VI and look at the variables to see if the Object Reference is set and shows that it stores a .NET object, or if it just says Nothing.

 

Please let me know how this goes, and attach screenshots.

Manooch H.
National Instruments
0 Kudos
Message 11 of 24
(2,534 Views)

here is the screenshot pictures based on your comments using object reference to pass the .Net Reference.

0 Kudos
Message 12 of 24
(2,517 Views)
Thank you. That sheds a little more light on the situation. Could you also provide screenshots of the specify module dialog for the Open VI? Specifically, I'm interested in seeing the Parameters table.
Manooch H.
National Instruments
0 Kudos
Message 13 of 24
(2,510 Views)

Is it whant you want,

 

0 Kudos
Message 14 of 24
(2,485 Views)

Jac -

 

From the files you provided, it seems that you are using LabVIEW 7.1 or 7.1.1. If this is correct, could you please check the following: 

 

In LabVIEW, go to Tools»Options. From the combo box, select Miscellaneous. Verify whether or not the Automatically close VISA sessions option is checked.

 

Ideally, this option should be unchecked.

 

closeVISAsession.png

 

Please let me know.

Manooch H.
National Instruments
0 Kudos
Message 15 of 24
(2,473 Views)

Hi Manooch,

thank you for your helps,yes My LabVIEW version is 7.1 and the default seting is same as  what your see,but I change it as your comments and it still fail.

0 Kudos
Message 16 of 24
(2,460 Views)

Jac -

 

I'm sorry that this is taking so long to figure out. Unfortunately, since I don't have the particular driver you are using along with the hardware, it's tough for me to test this out on my end. I would like to ask you to try the following Test Sequence and VIs and let me know if you receive any errors. I have attached them in the form of a zip file to this post. All you need to do is extract the folder to your desktop, open the TestDotNetReferences.seq sequence file in TestStand, and Run the MainSequence.

 

Please let me know if this succeeds without errors.

Manooch H.
National Instruments
0 Kudos
Message 17 of 24
(2,452 Views)
Sorry, forgot the attachment.
Manooch H.
National Instruments
0 Kudos
Message 18 of 24
(2,446 Views)
sorry for the late reply,I have tryed your attachment in my compute and it seems ok.
0 Kudos
Message 19 of 24
(2,419 Views)

Jac -

 

Thank you for providing that information. Could you place a breakpoint in the TestStand sequence and take a screenshot of the Object Reference that is storing the .NET Reference in the Variables List? I'm interested to see if it also shows up as an IUnknown similar to the .NET Reference from the N4010.

 

Also, for the N4010, could you try the following:

 

Instead of directly passing the .NET Reference out of the Open VI, let's cast it to an unsigned 32-bit integer and pass that to TestStand in the manner displayed in the screenshot below.

 

Send Reference Out.png

 

Then, store the number in TestStand and pass it back into the Set VI, where it will be converted back to a .NET Reference in the manner displayed in the screenshot below.

 

Send Reference In.png

 

Furthermore, could you try to modify your code to catch if the error is occurring at the first, second, or third node? It is possible that the reference is actually valid but the driver itself is throwing an exception on one of the other nodes.

 

I'm sorry this is taking so long to troubleshoot and resolve. Thanks for your patience and efforts.

Manooch H.
National Instruments
0 Kudos
Message 20 of 24
(2,404 Views)