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: 

Determine test start

Solved!
Go to solution

How to determine, in custom OI, when test is started? I need to know when operator run entry point to disable some items in run time menu.

I tried with RunStateChanged Event Callback but it seemed to not working. Should I use UI Messages instead? In example StartFileExecution?

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 1 of 5
(2,864 Views)
Solution
Accepted by topic author bienieck

Just do a mouse down event on your Entry point buttons.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 5
(2,824 Views)

Ok , but now how to determine end of test?


Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 3 of 5
(2,790 Views)

The button press is a hack that is simple.  It is not the most elegant way.  There are 2 events that you can create callbacks for: UserMessage and UIMessageEvent.  Both work in the same way that they handle UI Messages.  The difference is that UserMessage handles UIMessages above 10000 (i.e. user message base).  However, if you create events for UIMessageEvent and have a callback that handles the messages you can look at the codes: UIMsg_EndExecution and UIMsg_StartExecution.  Both get sent by the engine whenever an execution starts or stops.  You can create cases for both events and look for the execution ID so that you know which one started and stopped.  It gets more difficult if you are doing multi-threaded models.  Because each socket is a different execution so you need to manage them all.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 4 of 5
(2,784 Views)
Solution
Accepted by topic author bienieck

Finaly I used StartExecution and EndExecution Event Callbacks of Application Manager. This way I can simply, not only determine beginning of execution, but also check if it is execution that I want. I can simply filter front end callbacks and etc.

Michał Bieńkowski
CLA, CTA

Someone devote his time to help solve your problem? Appreciate it and give kudos. Problem solved? Accept as a solution so that others can find it faster in the future.
Make a contribution to the development of TestStand - vote on TestStand Idea Exchange.
0 Kudos
Message 5 of 5
(2,773 Views)