03-18-2010 12:10 PM
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.
03-19-2010 01:10 AM
here is the screenshot pictures based on your comments using object reference to pass the .Net Reference.
03-19-2010 07:36 AM
03-21-2010 11:30 PM
Is it whant you want,
03-22-2010 01:37 PM
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.
Please let me know.
03-23-2010 01:17 AM
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.
03-23-2010 09:36 AM
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.
03-23-2010 09:47 AM
03-25-2010 07:56 PM
03-26-2010 02:59 PM
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.
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.
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.