From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to check if SeqfileUnload is completed?

Hello,

i am calling the Teststand API under C# for a custom OPUI.

After closing a sequence file the Unload is executed.

How can i check with c# if the Unload is "still running" or "already completed"?

I need to create something like a loop to wait for the unload is finished.

Is there a flag to do this?

 

 

Thanks

0 Kudos
Message 1 of 7
(2,389 Views)

In the sourcecode i execute ApplicationMgr.CloseSequenceFile to close the file. This triggers the unload sequence.

 

Additional question: I see that the ShutDownCancelled Event is also executed by TestStand after the file is closed. Why this?

 

BR

 

0 Kudos
Message 2 of 7
(2,374 Views)

Have you checked if the unload callback fires the EndExecution uiMsg?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 7
(2,366 Views)

No, not yet.

When should this EndExecution occur? After the UnloadSequence is finished?

 

I am also not sure where to check for this event as after running the ApplicationMgr.CloseSequenceFile i get the ShutDownCancelled Event.

0 Kudos
Message 4 of 7
(2,361 Views)

@OnlyOne wrote:

[...]

When should this EndExecution occur? After the UnloadSequence is finished?

[...]

That's the point of EndExecution. Note it fires for each execution... so you have to filter.

From the TestStand help:

Shutting Down the Engine

The first pass ends when you receive the UIMsg_ShutDownComplete or UIMsg_ShutDownCancelled UIMessage. If you receive the UIMsg_ShutDownComplete event, continue with pass two. If you receive the UIMsg_ShutDownCancelled event instead, resume the normal operation of the application.

That means that the engine is still working fully supporting all uiMessages.

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

I only want to close the loaded sequence and wait for Unload is finished.

I dont want to shutdown/exit the c#-application.

0 Kudos
Message 6 of 7
(2,355 Views)

Sorry, i was confused by your mentioning about the ShutDownCancelled event. Are you sure that your UI doesn't initiate a shutdown when unloading the sequence file?

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