NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

close teststand while running

Hello,

In my UI, when I shut down TestStand, I have the following window which appear. It is because I have a SequenceFileUnload sequence in the sequence file which is opened. I wanted that this window doesn't display

When I close the TestStand editor with the same sequence file opened, the SequenceFileUnload sequence execute and TS close, whitout showing this window. I Would like to do the same in my UI

 

Any idea ?

 

CloseTS.jpg

0 Kudos
Message 1 of 6
(5,420 Views)

This window appears if you initiate the shutdown of the TS engine while an execution is still running.

NI recommends to keep SequenceFileUnload callbacks to be "fast" during execution in order to prevent that dialog to appear. How long does that callback take in your use-case?

TS SequenceEditor has some additional stuff running compared to most of the custom UIs, so timing behavior is different. I assume that the SeqEdit is slower in querying for the engine to shutdown which will result the SequenceFileUnload to be finished before the SeqEdit really shuts down the engine. The custom UI seems to be a little faster, hence you see the dialog.

 

Conclusion:

a) Make SequenceFileUnload faster (reducing number of step, reduce functionality, improve runtime performance of modules called there, ...)

b) Add a little timeout between initiating shutdown and the last shutdown call

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 6
(5,411 Views)

With the second() function, I measure 0.2s in the editor and 0.05s with my UI. Not very long it seems to me

 

I put all my steps in SquenceFileUnload in skip mode and effectively, when I closed TS, no window appear. So this window appear when SequenceFileLoad execution is between 0 and 0.05s

 

Is there any means to change this value, or to force the choice 'Automatically Close Execution when Done' ?

0 Kudos
Message 3 of 6
(5,408 Views)

Well, the best approach seems to be to customize the UI to leave more time for executions to finish before shutting down the TS engine for good.

Depending on the shut down reason, you can capture that in your UI, make TS to unload all files and then shut down.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(5,406 Views)

Yes indeed, I thought of this solution

When I leave my UI,

- close all sequences files

- wait for the end of SequenceFileUnload sequence execution (if any)

- shutdown the TestStand engine

 

I posted this question in the forum in case there was a simpler solution

 

 

Laurent

0 Kudos
Message 5 of 6
(5,404 Views)

Laurent,

 

imho it isnt a question about "simple solution" but "safe solution". And i think that waiting for the Unload to finish sounds safe.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 6
(5,399 Views)