NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

close teststand using cvi testStand API

i use cvi for Runing a seqFile but when i click close allways i get this message :

" this execution is currently running . what would you Like to do? 

  • Terminate Execution
  • Abort Execution
  • Automatically Close Execution when Done "

and how can i hide this message ? and whats the best way to stop and close teststand ? and what's the function should be used ?

Capture3.PNG

0 Kudos
Message 1 of 3
(2,079 Views)

Hiding the message doesn't solve it.

The question must be: Why is there still an execution running when you click "close"?

In most situations, disabling the close button as long as an execution is running is the best solution. Do not forget to re-enable it once the (last) execution finishes!

Another option is to not shutdown TS directly with the close button but to initiate a Terminate All.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 3
(2,059 Views)

You can look at the shipping example to see how they do it: C:\Program Files (x86)\National Instruments\TestStand 2014\UserInterfaces\Simple\CVI\Source Code

 

I'm not as proficient with CVI but it looks like they trigger the ExitApplication() function when the user closes the UI.  Which in turn is calling this function: TSUI_ApplicationMgrShutdown(gMainWindow.applicationMgr, &errorInfo, &canExitNow)

 

Then they monitor for the shutdown event and safely close out the window.

 

Problem is you will still most likely get the dialog from your post if an execution is running.  If you don't want that dialog then make sure that all executions are completed before allowing the user to close the UI.  That dialog is part of the TSUI_ApplicationMgrShutdown routine.  TestStand needs to know what you want to do if there is an open execution.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 3
(2,058 Views)