NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Run test uut entry point only once

This actually is possible.  Whenever you connect a button to a manager control, you are able to specify the CommandConnectionOptions you wish to use.  In particular, there is an option for CommandConnection_IgnoreEnable (0x4).  If you set this option, TestStand will not disable the button ever.  This may not be desireable for you, since there are cases when it is useful to have it automatically disabled (such as an Operator logs in and does not have permissions for Single Pass).  An alternative (that I have not tested yet, but it should work), is to retain the CommandConnection object reference returned from the ConnectCommand method for the buttons you wish to handle.  Whenever you want to disable the button, set the CommandConnection.Options value such that IgnoreEnable is added.  In text, this is CommandConnection.Options = CommandConnection.Options || 0x4.  You can then set the actual button to be disabled using the Button.Enabled property to false.  When you want to let TestStand control the enable state again, just set the CommandConnection.Options property to remove the IgnoreEnable option.  You can do this in text by calling CommandConnection.Options = CommandConnectionOptions && 0xFFFFFFFB.

Allen P.
NI
0 Kudos
Message 11 of 13
(1,170 Views)
Ryan,
 
I just wanted to let you know that your solution has saved me a significant amount of time in the development of my UI. I am working a parallel path of disabling the EntryPoint buttons with the added effort of exporting user input data when the EntryPoint buttons are selected. Kudos on the solution you listed.
0 Kudos
Message 12 of 13
(1,158 Views)
jap9711,
 
Glad I could be of assistance.  Steffen and Allen were good helps, too.
 
-Ryan
0 Kudos
Message 13 of 13
(1,139 Views)