NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Control LabVIEW GUI via TestStand sequence

Hello,

 

I have a VI with several buttons(controls) that the user can change during the test.

How can I associate these buttons(controls) with TestStand sequence so that during the sequence depending on a variable I set In TestStand the buttons(controls) in the VI will be activated.

 

Thank you,

 

Lev Kolomiets

0 Kudos
Message 1 of 5
(3,886 Views)

You can use variables to communicate between the two.

 

Scenario -1 --- Labview takes input from the test sequence :

 

The test sequence must update the variables.

The LV code must have a loop which looks for this variables to update the GUI.

 

Scenario - 2  ---  Teststand takes input from the LV front panel

 

For any change in the GUI update corresponding Teststand variable.

Teststand needs to loop to check for this variable.

 

Hope this helps.

0 Kudos
Message 2 of 5
(3,872 Views)

Lev,

 

Are you talking about your User Interface?  Or is it just a VI that you call from your test sequence?

 

If it's the User Interface then you should use UI Messages.... (Google or Bing: TestStand UI Messages.  let me know if you have more questions on that).

 

If it's a VI you call in a different thread from your test sequence then you will want to pass in the sequence context.  Then you can use the VIs on the TestStand palette (specifically TestStand - Get Property Value.vi). 

 

Hope this helps some,

 

 

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

You need to share refrences somehow. This is easy if you start your labview GUI with Teststand. I imagine you can start it with a new thread. then simply have a refrence to your control as an output. make sure you use the teststand message box options so you can see it.

 

You can also start Teststand with a labview GUI look at the operator interface examples. then you can simply set one of the Station Globals as a refrence to you controls

 

and last but not least you could have a program that starts both the GUI and the Teststand and exchanges refrences between them. There may be some other methods but thats what i typically do.

0 Kudos
Message 4 of 5
(3,840 Views)

Taylor,

 

You shouldn't need station globals.  Nor should you need something to start both.

 

There are 2 options that I consider to be better:

 

1- In TestStand you can have global queues.  If a queue begins with a * then it is global to the engine and anyone within the scope of that active engine can then use it.

 

2- The better method.  Pass your sequence context in a UI message.  Then you can use the Set and Get property VIs and pass data back and forth all day long.

 

Hope this helps,

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