This widget could not be displayed.

From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

Direct execution of the sequence when UI launches?

Solved!
Go to solution

Hello all,

 

I would like to ask if it is possible, the open sequence and run UUT's buttons to be removed from the user interface and the selected sequence to be started automatically when the UI launches. To be more precise, I would like after opening the user interface and logging in, the sequence path to be read let's say from an ini file and then to be run with the entry point run UUT's automatically without pressing any buttons. How could this be implemented? Thank you very much.

0 Kudos
Message 1 of 7
(4,043 Views)

The default UIs support running things using commandline parameters which would work very similarly to what you are saying. Removing the buttons/menu items for manually starting executions would be a relatively minor change to the UIs, but would require some code changes. It's also possible to use an ini file rather than commandline parameters, but that would require more programming.

 

Hope this helps,

-Doug

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

Doug, thank you once more for your answer.

In the forum I found this example https://decibel.ni.com/content/docs/DOC-7691 on how to hard code a sequence path in the simple OI but I couldn't find the suitable methods to call, in order to run the sequence file in this path automaticaly with Run UUT's when the UI launches and without using a TS control. Does anyone know how I could do this?

 

0 Kudos
Message 3 of 7
(4,009 Views)
Solution
Accepted by topic author pvki

You could try this.  I wrote a UI that contained a LabVIEW style button to START TestStand, hence I did not use the UIControls to connect the buttons to the ApplicationMgr etc....

 

Here is the code I use to start a sequence ( I assume it is already loaded in the SequenceFileViewMgr control, by the use of the OpenSequenceFile method.  I think that was in the link you had already posted).

 

 

Good Luck,

 

PH

Message 4 of 7
(4,000 Views)

Thank you very very much for the reply!

I tried your solution but I had the following problem: As it is now on the code (see attached image), the execution of the entry point is called before the user has logged in and when he finally does, nothing happens, the execution never takes place. As I saw during highlighted execution, this can work only if the user login has happened successufully before the execution command is called (and this can only happen at the highlighted execution which is so slow). Is there any way to control if there is a valid user and only if there is one to start the execution? How can I return this information to the GUI?

0 Kudos
Message 5 of 7
(3,988 Views)

Yes!  Configure the ApplicationMgr -> 'UserChanged' Event Callback.  Within this callback you can check if the user name, is something other than empty.  See my attachment.

 

In your case, I would do the following.  I would configure a Notifier to wait in your main GUI, that would be triggered by a valid login as determined by the UserChanged Event Callback.  So the notifier would wait before the OpenSequence File and execution start code you added.

 

Thanks,

 

PH

 

 

Message 6 of 7
(3,984 Views)

Thank you so much!! It works very well now!

0 Kudos
Message 7 of 7
(3,970 Views)