NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to limit TS 4.2.1 Simple OI Entry Point Button 1 to creating only one instance on initial startup

On initial startup of the Simple Operator Interface (OI) within TestStand 4.2.1 (TS 4.2.1) if the user clicks the "Entry Point Button 1" multiple times then multiple instances of the Serial Number Dialog box are created. I would like to only allow one request to Test UUT,  thus only one Serial Number Dialog box appearing.

0 Kudos
Message 1 of 5
(3,436 Views)

One of the ways that you can do this is to edit the model (sequence model, batch model, etc). Working from the sequence editor add two StationGlobals referencing the current number of UUTs (I'll say numUUTs) and the max number of UUTs (I'll say maxNumUUTs). Create a f(x) statement in the Setup window with StationGloabls.numUUTs++. This will increment the humber of UUTs each time the model is called. Then add an if statement from the flow control pull down in the insertion palette. In the conditional express check if StationGlobals.numUUTs > StationGlobals.MaxNumUUTs. Between the "If" and the "End" statements in the Steps window add a GoTo from the flow control menu of the insertion palette and make the Destination Step <Cleanup>. Then add a f(x) Statement in the Cleanup pull down and make the Expression StationGlobals.numUUTs-- to decrement the current number of UUTs being tested. This will skip running the usual UUT functions that are called for this model and not allow more than one to be run at a time.

Ian M.
National Instruments
0 Kudos
Message 2 of 5
(3,421 Views)

The problem with this solution is that it involves applying the fix to every application previously built and all future applications. I had hoped there would be a way to fix this problem at the source - namely the TestExecutive (Simple OI). This would allow a single fix and distribution versus the many required by your proposed solution.

0 Kudos
Message 3 of 5
(3,367 Views)

The process model can be saved and distributed to any systems that you need to have this functionality. You can have as part of the process model a step to programmatically create the variables you need as globals and as soon as a sequence is run using this process model it will automatically check if the variables have been created and if not then it will create it so you only have to program it once on a single process model.

Ian M.
National Instruments
0 Kudos
Message 4 of 5
(3,354 Views)

Hi GH_BEM,

 

I am assuming you are using the LabVIEW implementation of the interface.  In that case, you can prevent multiple executions from occurring by handling the button events in the main event structure.  In this event structure, set the Test UUTs button (and the other execute buttons if desired) to be disabled and greyed.  To re-enable the buttons once the execution finishes, add a new callback to the "Config events callback" subVI to handle the EndExecution event. In the callback code, re-enable the buttons.

 

I have attached an example showing this approach.  let me know if this method will work for you!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 5 of 5
(3,286 Views)