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: 

C#-OPUI: How to check that Model/SequenceFileLoad is finished?

Solved!
Go to solution

Hello,

i created a OPUI in C# where i call TestStand2012.

Now i have the problem that i need to find out when the SequenceFileLoad of the model-sequence is finished.

I cant find an event for this. (or is there a variable for this?)

 

How can i check in C# that it has finished?

 

Thanks for help

0 Kudos
Message 1 of 4
(3,007 Views)

You can either:

 

1) Handle the UIMessageEvent callback of the application manager and look for the end of execution UI Message, then either check if it is for the sequence file load callback you are looking for.

 

or

 

2) If you control both the sequence and the UI, just do whatever synchronization you want in the sequence and the UI. You could use a TestStand notification, or a C# event. There are many ways to do it.

 

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 4
(2,998 Views)

Currently i am sending as last step in the Model-SequenceFileLoad a UserDefinedMessage.

In C# there is then a loop (in a thread) that is waiting for this Message-Number.

 

For your other solution:

I see the EndOfExecution but how can i know that it is coming from Model-SequenceFileLoad?

 

Thx

0 Kudos
Message 3 of 4
(2,981 Views)
Solution
Accepted by OnlyOne

Using a user defined message seems like a good way to do it.

 

"I see the EndOfExecution but how can i know that it is coming from Model-SequenceFileLoad?"

 

The UIMessage class object has an Execution property. You can use the TestStand API to examine the execution to try to determine if it is the correct one. You could perhaps use msg.Execution.DisplayName,  msg.Execution.Id, and/or msg.Execution.SequenceFilePath to determine if the UIMessage is for the appropriate execution.

 

-Doug

0 Kudos
Message 4 of 4
(2,969 Views)