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.
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.
11-09-2010 06:32 AM
Our testbenches run the Simple TestStand UI. We have it very often that an operator presses TestUUTs more than once. This causes very much troubles for us because TestStand runs a second or even a third time the sequencefile, and then the serial numbers and our measurement database are totally messed up.
Is it possible to allow only one instance of TestStand? Or can i disable the TestUUTs button if it is pressed the first time?
Thanks.
Solved! Go to Solution.
11-09-2010 08:19 AM - edited 11-09-2010 08:20 AM
Yes and yes.
These are two different questions.
For the first, when launching TestStand, use the testexec.exe /useExisting flag in any shortcuts you create.
For the second Simple TestStand UI, there are a couple of ways that I can think of to do this:
1. Edit the process Model Entry Points sequences to change the Sequence Properties - On the Models tab, change the Entry Point Enabled Expression to use a File Global "NotRunningFlag" to only enable if this flag is set to true.
2. Modify the source to add the TSUI__ApplicationMgrEventsRegOnStartExecution and TSUI__ApplicationMgrEventsRegOnEndExecution that get called when executions start and stop and use these to enable and disable the entry point buttons.
Hope this Helps.
-Jack
07-01-2021 09:34 AM
Captain_Jack,
I have just recently ran into the same issue as stated above.
Can you elaborate on your solution with a step by step? (I am very unfamiliar with TestStand ActiveX controls)
07-02-2021 03:18 AM
07-02-2021 07:42 AM
This YouTube video is my exact problem except I am not using LabView, I am using LabWindows/CVI. Do you know the equivalent solution LabWindows/CVI? Specifically I am using LabWindows/CVI 8.1 and TestStand 4.0.
Much appreciated!
07-02-2021 10:27 AM
@IanChristiansen wrote:
This YouTube video is my exact problem except I am not using LabView, I am using LabWindows/CVI. Do you know the equivalent solution LabWindows/CVI? Specifically I am using LabWindows/CVI 8.1 and TestStand 4.0.
Much appreciated!
I have never had a chance to program CVI. But looking at source code of a NI example of Simple GUI (TestExec.c) shipped with TS2017 it seems it would take 2 steps to implement it.
1. Registration of ActiveX events OnStartExecution and OnStartExecution. You need to add it in the same way as OnExitApplication
// register ActiveX control event callbacks
errChk( TSUI__ApplicationMgrEventsRegOnExitApplication(gMainWindow.applicationMgr, ApplicationMgr_OnExitApplication, NULL, 1, NULL));
2. Processing callback events. In you case add functions for processing of OnStartExecution and OnStartExecution . Implementation for OnExitApplication:
// the ApplicationMgr control sends this event when it is ok to exit the application.
// discard any handles to TestStand objects here at the latest
HRESULT CVICALLBACK ApplicationMgr_OnExitApplication(CAObjHandle caServerObjHandle, void *caCallbackData)
{
CA_DiscardObjHandle(gMainWindow.engine);
gMainWindow.engine = 0;
ExitApplication();
return S_OK;
}
Inside of those function you need to use these 3 handles to enable/disable buttons:
gMainWindow.entryPoint1Btn
gMainWindow.entryPoint2Btn
gMainWindow.runSelectedBtn
I hope this will be useful.