LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to pass a custom UI message from teststand to labview

A little background on what I am trying to accomplish:

 

Initially, a VI was written, and it works just fine for performing a test by manually clicking and changing front panel controls. I would like to automate this process using TestStand (since it is painfully repetative), and basically wrap this existing file with some structure that will wait for a signal from TestStand to alter these front panel controls.

 

The VI is essentially a setup controller for a UUT that I am measuring values to and from with other test equipment.

 

Here's where I am now:

 

In TestStand 4.1, I call a VI in a new thread, so that the sequence can continue to run. I know how to do that, and I know how to use the Connector Pane to configure it in such a way that my VI can be called with all the initial values I need. For the most part, the VI only needs to sit idle while I take various .

 

However, at some point in the sequence, I need to notify the VI that I would like it to take new values from TestStand, and change it's front panel controls accordingly. I would prefer not to have it sitting in a loop constantly polling TestStand, because it could introduce quite a few timing errors, or just really bog down the system with constant queries. I understand how to use the Get/Set Property VIs to call a value from the SequenceContext, but it is a less then optimal solution.

 

What I would like to do is post a UI message in TestStand ( something like a statement step saying: RunState.Thread.PostUIMessageEx(10001,0,"",Nothing,True) ), and I would like to have LabView waiting to see the UI message, so that it knows to now pull data from the SequenceContext, and update it's front panel controls.

 

Unfortunatley, I can't post any of the code, but really what I need is just an example of a very simple VI that waits to see a specific UI Message before executing some code. Also, I'm using LabView 8.5,so if you have an example from a different version please post an image of the Block Diagram so I have some hope of replicating it.

0 Kudos
Message 1 of 3
(2,528 Views)

Hi

 

1. If you post this question in the TestStand board, you might get more useful solutions.

2. I do a similar thing, but in a different way.

 

I create a dll with 3 functions: Open my VI, Update my VI and Close my VI.

dll function Open my VI: uses VI server to launch the FP of the GUI, runs the GUI ----- dynamically launch the GUI from TestStand.

dll function Update my VI: uses VI server to set the values of my GUI controls. I know which controls to update so have constant control names inside this function. you can make the control name also a user input.

dll function Close my VI: stops and closes the GUI.

 

you can call these dll functions inside TestStand as and when you need.

 

there might be better solutions using TestStand sequence context/TS Engine references

Regards
Freelance_LV
TestAutomation Consultant
Message 2 of 3
(2,512 Views)

I was trying to go the Sequence Context route, but I'm always open to new ideas (especially when my current idea isn't working).

 

I guess my question in this example is how do you update the control values of the VI while the VI is already running, without just constantly having the VI polling for new ones? (i.e. teststand can either push the values, or teststand can indicate to the VI when it is time to request new ones) That's really the major issue I'm having with this project.

0 Kudos
Message 3 of 3
(2,490 Views)