NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Loading a CVI Panel from TestStand

I am running TestStand 2.01F1 and CVI 6.0 on Windows 2000. I have a Panel with several controls on it. Within TestStand, I made several action test steps with cvi adapter. One step loads the panel using the userinterface method LoadPanelEX. Another step displays the panel. then another step sends control to the Panel waiting for a specific Event from the panel. Once I run the sequence, it runs fine the first time and works fine. But once I run it again, it hangs on the DisplayPanel routine with the called function from the test step.
I am using the GetUserEvent function and processDrawEvents.
0 Kudos
Message 1 of 7
(3,849 Views)
Hi,
I assume this is all being run from a .DLL.
Have you tried unloading the modules before the second run? If this works, then you need to alter when the .DLL is unloaded from memory in the run options of the steps in the sequence.

Also are you discarding the panel from memory from the same thread you created it in?

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 2 of 7
(3,849 Views)
First, I want to thank you for responding. You assume correctly about the DLL.
Yes, to insure the modules are being unloaded, I use the unload from the File menu. This does not help.

I am discarding the panel from the same thread. If I understand correctly, I use the same thread within TestStand. I do not think it is a different thread when a different test step is called, which calls the same DLL.

James
0 Kudos
Message 3 of 7
(3,849 Views)
Hi James,
can you attach the sequence file, and the source for the .DLL and the .dll (perhaps in a .zip) here, then we can have a look and see if there's anything strange going on. If it's a massive project, can you reproduce the behaviour on a smaller scale?

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 4 of 7
(3,849 Views)
Hi James,
I'm not running W2000, can you try the attached file(s) to see if they work for you - it's stripped down to it's elements as much as possible.

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 5 of 7
(3,849 Views)
I looked at what you provided. We have the same type of algorthim with execption of two things. I am using CVI adapter and you are not. But, I do not think that this matters.
The other difference is you are using RunUserInterface and QuitUserInterface. I did not think that these would be needed because of TestStand. But, maybe it does. I will try to use to see what the effects are.

Thanks....
0 Kudos
Message 6 of 7
(3,849 Views)
Hi James,
The CVI adapter shouldn't get in the way, and the reason I used the Run / Quit technique was it's a simple way to wait for a specific condition from the panel to get it to return to TestStand. The downside to the Run/Quit, and then handling the discard separately, is the panel stays visible and in memory whilst the discard is waiting to happen.
The DiscardPanel is the main on that needs to be included, otherwise you're referencing to the same panel twice as TS won't have necessarily cleaned up after CVI.
Hope that helps, and your new implementation works.

S.
// it takes almost no time to rate an answer Smiley Wink
0 Kudos
Message 7 of 7
(3,849 Views)