NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Callind LabVIEW GUI in Teststand

Hi,

 

I have a LabVIEW GUI built for the post silicon validation of a device. This GUI is very much reqiured for communicating with device for all the tests to be done. I want to automate these test using NI teststand. I'm a beginer in teststand. For first test i called this GUI in a new thread and passed the varibles between the GUI and teststand using GET and SET property function present in teststand pallete. But in order to do these i had to alter the GUI to use the GET function. Is there any best way to do this without editing the source code of the GUI to interact with it using teststand?.

 

Regards,

Brijnesh JK

0 Kudos
Message 1 of 8
(4,493 Views)

Without knowing a lot more about your GUI, it's impossible for me to know if it can be done without any changes to your GUI. I'd guess the answer is probably not, unless your GUI is designed to be automated by external callers.

 

You don't have to use get/set though, TestStand can pass parameters in and out of VIs with native data types.

 

-Doug

0 Kudos
Message 2 of 8
(4,477 Views)

Thanks for the reply Doug,

 

In short my GUI has controls for loading macros, setting GPIO directions,Writing and reading registers of the DUT using I2C. Now in my current sequence I'm using the global variables for the communication between them using get/set function. I wanted to know, is there any way I can build a VI so that it can act as bridge between GUI and my teststand without editing the source code?. I had read about UI messages in NI forms, but i don't know how to use it. Do UI messages can help in this regards?.

 

Regards,

Brijnesh JK

 

0 Kudos
Message 3 of 8
(4,463 Views)

UI Messages are not at all relevant.

 

It sounds like you simply did not connect any of your controls/indicators to the VI' connector pane. Do that and you will not have to modify the code or write something new.

0 Kudos
Message 4 of 8
(4,459 Views)

Hello Dennis,

 

Thanks for your reply

 

The GUI is having a State machine architecture. It have a continuous running while loop with a stop control. So even if i connect the controls/indicators to the connector pane and then pass the values using teststand, The GUI wont accept it because of the continous while loop. Is there any solution?

 

Regards,

Brijnesh JK

 

 

0 Kudos
Message 5 of 8
(4,453 Views)

The VI is really incorrectly written to be called by TestStand. I would suggest you break up the complex top level VI into smaller VI that would perform specific tests.

0 Kudos
Message 6 of 8
(4,446 Views)

Hello Dennis,

 

Yes, exactly. Actually the GUI is written by some one else, it is really complex and it is not written in a way so that it can be called in Teststand. As it is written by some one else and it does lot of function i found it is hard to split the top level GUI. So i called this GUI in separate thread in the sequence and used the set/get functions from teststand pallet, passed sequence contest to GUI to modify the GUI so that it can take and give inputs to my sequence. I used producer consumer architecture making the GUI source code( event based State machine) as a consumer and a producer to get the values from the teststand global variables using get property function of teststand palette. This works in a way such that whenever a particular global variable is set true(say Boolean) by teststand then the producer loop of the GUI enques it. In the consumer loop it get dequed and i  made value signaling if the Boolean is true(this is to invoke the event for that particular Boolean control). I think this is not a best method for this. So i posted the quetion to get to know a better way for the implementation of such kind of GUI in teststand for test automation.

 

Regards,

JK

0 Kudos
Message 7 of 8
(4,439 Views)

There are many ways to communicate between a sequence and the UI. Here are some possibilities:

 

1) I'm making an assumption that both the UI and your code modules are running in the same LV runtime engine or both are running in the development environment. - if so you can simply use a LV queue or some other labview specific mechanism. Just call a VI from the sequence to equeue or dequeue as well as having a VI in the UI do so.

 

2) Another possibility is TestStand queues, these use COM and can be accessed even if the UI is in a different process or version of labview than the code modules. There are step types to directly use teststand queues from sequences and you can also access teststand queues directly from LabVIEW using Engine.GetSyncManager() (See the API help for more details).

 

3) Another possibility is UI messages. You can send a synchronous UI message from the sequence that is then handled in the UI. If you pass a variable as the ActiveX data parameter to the UI message you can use it to communicate both directions with the UI. Make sure you post the UI message synchronously so that the posting thread blocks until the UIMessage is done being handled by the UI.

 

There are probably several other ways as well.

-Doug

 

0 Kudos
Message 8 of 8
(4,432 Views)