NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Read custom TestStand user interface button

I am modifying the basic LabVIEW Simple OI (LV 8.5, TS 4.0).
I need to add a control ("NEXT" button) to the OI that I can read within my sequences and proceed. In other words, have a flow control step in my sequence that waits until the "NEXT" button is clicked on the OI.
I tried to use sequence locals, but can't seem to get to the run-time locals easily within the OI and use a VI in the sequence - very cumbersome to verify that value is changed at both ends (OI & seq). Also, it seems that it would be cleaner programmatically to use a TS control on the front panel. I tried to decipher using UIMessaging, but couldn't figure out how to read and act upon the control state change within a sequence.
 
What is the best method to add a control to the OI and programmatically respond to a control input on the OI as an event in a sequence?
 
Thanks in advance.
DB
0 Kudos
Message 1 of 4
(3,544 Views)
Hi DB,
 
You may find a great example to pause your sequences using the following OI:
Nestor
0 Kudos
Message 2 of 4
(3,501 Views)

Thanks for the reply.

That is still using a floating message box and not really pausing. I want to transfer the functionality of that "OK" button to my OI control while displaying the message text in my UI text box. Currently, I'm doing this with Station Globals and programmatically changing the global values (boolean and string). This is a little cumbersome within the sequence since I need to add delays to ensure that the write has occured before the read. I think that using synchronization would still be cumbersome.

Is there any better way to read the state of a front-panel control on the OI from within a sequence (loop until true, etc.) other than using globals or similar variables?

Thanks again,

DB

0 Kudos
Message 3 of 4
(3,480 Views)

Hi DB,

In your adapter step, you may simply include a Post Expression with RunState.Engine.BreakAll(). This will essentially place the execution of the step in a "Pause" state until you decide to Resume by pressing the button in the OI. In fact, you may use the OI offered above as-is to get the Resume functionality. If you are curious how the Resume is handled, look into the Configure ExecutionView Manager.vi in the above code.

Hope this helps DB.

Nestor
0 Kudos
Message 4 of 4
(3,462 Views)