Jump to content

TestStand Simple OI does not close properly.


Winther

Recommended Posts

Hi there.

We have build a test system that is running TestStand 4.2 and the code modules are created with LabVIEW 9.0. The SW is running on a PC with Windows XP.

We are currently using TestStand Simple Operator Interface (LabVIEW version) to run the tests, and it is with the Operator Interface that we are having a problem.

If we use the TestExec.exe file that came with the TestStand installation everything works fine. But we need to make some modifications to OI and if we open the project file and recompile the OI, then the OI will not close properly. It seems to shutdown the testengine and stop execution of the VI, but the window does not disappear until we move the mouse or there is activity on the keyboard.

When I open the project file LabVIEW informs me that the project was last saved in version 7.1.1 and we are now running 9.0.

Can anyone tell me what is holding the window on the screen until there is activity on the mouse or keyboard?

Link to comment

We saw this problem at one point on a project which uses TestStand API; this may be an important difference as the Simple OI uses callbacks instead of API calls and the Exit button callback really should be doing everything properly. The issue is gone now and it was the least of our TestStand worries at the time, so I can't tell you for sure what's made it go away. It may not be the culprit, but the shutdown procedure in your OI is a good place to start. This is the shutdown procedure we settled on after lots of debugging and extensive support from NI for our API system:

1) Close all the references you have open which related to sequences (Execution, MainSequence, SequenceFile, ModelFile) in the opposite order they were opened.

2) Call a "final" ShutDown on the IEngine automation; close its reference.

3) Call a Shutdown on the IApplicationManager. If this doesn't return true, you need to wait for the ExitApplication event from TestStand. Close the IApplication reference.

4) Close whatever references (events, whatever) you have left.

Since we’re not using the same approach, you need to make sure you’re doing the equivalent for the callback approach. It’s possible you might be looking at an issue with windowing rather than shutdown – you could try removing the Set TestStand Application Window VI call. I can’t explain why that’s possible, it’s more of a gut feeling.

Good luck.

Link to comment

Hi asbo,

Thank you for your reply.

I am going throug the shutdown procedure of the vi and trying to find something that will solve this issue. You suggest calling a "final" Shutdown of the IEngine - how do I do this?

I can only find a shutdown procedure for the IApplicationMgr - is that what you mean?

I have not solved it yet but I have made a discovery. If I change the Preferred Execution System in the vi properties from "User Interface" to "Standard" the vi shuts down and disappears as it should. But only for the standard Simple OI. When I add the functionallity we need the problem reappears...

I add procedures for setting up searchdirectories, loading a sequence file and activate the start-button after login completes.

After this I changed the Preferred Execution System to "Data acquisition" (should be the highest priority) and it worked, but only on my computer. The problem is still there on the production computer.

I have also posted this issue on the NI forum and NI replied that they are investigating. I will relay the solution here if they come up with anything.

Regards

Stephan.

Link to comment

I am going throug the shutdown procedure of the vi and trying to find something that will solve this issue. You suggest calling a "final" Shutdown of the IEngine - how do I do this?

I can only find a shutdown procedure for the IApplicationMgr - is that what you mean?

The IEngine has a ShutDown method which has a "final" parameter:

post-13461-125570096969_thumb.png

I have not solved it yet but I have made a discovery. If I change the Preferred Execution System in the vi properties from "User Interface" to "Standard" the vi shuts down and disappears as it should. But only for the standard Simple OI. When I add the functionallity we need the problem reappears...

I vaguely recall messing with execution stuff at some point but I don't recall anything in specific working. That doesn't mean it's a dead end, per se, but I don't remember anything promising. Does it still present if the block diagram is visible? Have you tried highlight execution and seeing if that changes the behavior?

I guess it's important to consider what version of TestStand you're using - we used 4.1.

Just out of curiosity, have you tried putting any code at the end of that VI to fake keyboard/mouse input to see how it responds. Solve the problem by hiding it ;)

Link to comment

The IEngine has a ShutDown method which has a "final" parameter:

post-13461-125570096969_thumb.png

I vaguely recall messing with execution stuff at some point but I don't recall anything in specific working. That doesn't mean it's a dead end, per se, but I don't remember anything promising. Does it still present if the block diagram is visible? Have you tried highlight execution and seeing if that changes the behavior?

I guess it's important to consider what version of TestStand you're using - we used 4.1.

Just out of curiosity, have you tried putting any code at the end of that VI to fake keyboard/mouse input to see how it responds. Solve the problem by hiding it wink.gif

Hi asbo.

Thanks for the picture - I was looking for Shutdown using a proterty node... didn't go so well...

I have thougt about faking a keyboard/mouse input, but application does not get stuck until after the "Qiut LabVIEW" application control has been fired. I cant execute any code after this.

Highlighting the execution does not help me either. The problem only exists when the application is running as a build exe file.

Thanks again for your input asbo!

I will be sure to post a message if I find a solution.

Link to comment
  • 2 weeks later...

We have build a test system that is running TestStand 4.2 and the code modules are created with LabVIEW 9.0. The SW is running on a PC with Windows XP.

We are currently using TestStand Simple Operator Interface (LabVIEW version) to run the tests, and it is with the Operator Interface that we are having a problem.

We are experiencing the exact same issue with TS4.2 and LV2009. I'll let you know if I figure out what is going on.

Link to comment

We are experiencing the exact same issue with TS4.2 and LV2009. I'll let you know if I figure out what is going on.

Hi TobyD.

I appriciate that very much. I have put the problem aside for a while because I was getting quite frustrated. I will get back to it in the near future though.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.