NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make the LabVIEW Event Structure detect "Value Changed" events from TestStand UI controls?

Solved!
Go to solution

The LabVIEW 2024 Event Structure works for LabVIEW controls but not for TestStand controls. Is there a way to enable this for their "Value Changed" events, or do I have to poll their values with the LabVIEW Event Structure's Timeout event and detect changes that way?

0 Kudos
Message 1 of 6
(669 Views)
Solution
Accepted by topic author bmihura_esa

TestStand control elements are meant to be used in a different way than ordinary LabVIEW controls.

The ActiveX stuff behind allows them to directly connect to the Engine which makes is unnecessary to have handling in LabVIEW etc. in place

The only thing you have to do in the OI code is attaching the right functionality to the specific control.

 

Can you please describe your use case?

Message 2 of 6
(642 Views)
Solution
Accepted by topic author bmihura_esa

I general, I want to execute LabVIEW code when a TestStand control element is changed by a user.

 

My specific use case is this:

 

I am starting with LabVIEW's simple TestStand User Interface VI here:

 

C:\Users\Public\Documents\National Instruments\TestStand 2023 (32-bit)\UserInterfaces\Simple\LabVIEW\Source Code\TestExec.llb\Top-Level VI.vi

 

When the user clicks one of the those three test-running buttons such as the RUN_SEQUENCE button, I want to perform additional LabVIEW code like deleting irrelevant report files.

0 Kudos
Message 3 of 6
(634 Views)
Solution
Accepted by topic author bmihura_esa

You could always use the Register Event Callbacks instead to register for the events corresponding to what those buttons do (if they have matching events).

 

For example, for the "RUN_Sequence" button you could register for "StartExecution" event which should be fired at the same time.

 

Or you can not use ActiveX buttons, and use your own buttons and just use the TestStand API to make it just act like the ActiveX button

Message 4 of 6
(630 Views)

This all makes sense now, thank you.

0 Kudos
Message 5 of 6
(617 Views)

These are both good ideas, thanks!

0 Kudos
Message 6 of 6
(616 Views)