NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to add a Graph in the Teststand Labview OI

Is it possible to add a graph to the Labview OI so that data can be passed up via the sequence context? Would posting a UI Message be the right way to trigger the graph to update? I'm not sure how to do this since the graph is not a UI control.
 
Has anyone done this or is better to just pop-up a graph in a sequence step?  
0 Kudos
Message 1 of 9
(4,571 Views)
Hi,
 
Pop-up a graph in a sequence step is definitely the easiest way.
However you can use subpanel on the OI and register your pop-up VI in there.
This works fine, looks better, but needs a lot more programming.
Andras
0 Kudos
Message 2 of 9
(4,564 Views)
Personally, I wouldn't want to customize the operator interface for each sequence file that I write. I believe in keeping the OI generic. If every test sequence you run, requires a graph of the same type, then using the UIMessage will work but Andras is correct, the pop-up is easier to code.
0 Kudos
Message 3 of 9
(4,554 Views)
I'm not sure how to use a pop-up graph in a TestStand step, because I would want to use a waveform graph in a loop as follows:
 
loop
1. Gather data to plot from GPIB multimeter.
2. Plot/add the current data to the waveform graph.
end loop
 
I would like to keep the graph on the screen the entire time. I would also need to be able to either programatically dismiss it at some point or by clicking a button on the pop-up.
 
When I try to do this I get a flashing opening/closing VI or a dialog type pop-up where I can't update the VI until I dismiss the pop-up.
0 Kudos
Message 4 of 9
(4,539 Views)
If you change the step type to the Run VI Asynchronously and this will allow it to run by itself while still being able to run through the rest of the sequence. If I am understanding this correctly, that should be all you need to do.

Brandon Vasquez | Software Engineer | Integration Services | National Instruments
0 Kudos
Message 5 of 9
(4,521 Views)
If I run it asynchronously I'm not sure how I can get data to the graph. The idea is I want to loop on getting measurements and displaying them in the chart until I terminate the loop.
0 Kudos
Message 6 of 9
(4,512 Views)
One way you can send data to the graph is by using a LabVIEW queue.  The VI displaying the graph can be checking a queue for the data to display.  You populate the queue from another VI.
TestStand has two good examples that do this.  See the examples under TestStand\Examples\Auto Schedule and TestStand\Examples\LabVIEW Express VIs.  I recommend starting with the LabVIEW Express VIs example.
 
Hope this helps.
0 Kudos
Message 7 of 9
(4,494 Views)


One way you can send data to the graph is by using a LabVIEW queue.  The VI displaying the graph can be checking a queue for the data to display.  You populate the queue from another VI.


JoseHdz,

Would a queue still work if his OI was built to an executable?  I had a cool app at one time that was using queues to pass data from one VI to another. But, when I built one VI into an executabe the named queues didn't work anymore.

I ask this because OI's do get built into exec's often.

Paul

0 Kudos
Message 8 of 9
(4,474 Views)
paulmw,
I have not tried this, but one way you could do this is by running the VI with the same version of the LabVIEW run-time engine that the OI was build with.  The LV OI will load the run-time engine initially.  When TestStand runs the test VI, it will try to first load the run-time engine specified in the adapter configuration.  If the specified version is the same as the version used by the LV OI, it will used the one in memory.  Since TestStand and the OI share the same run-time engine, creating a queue in the OI and populating with the VI run by TestStand will theorically work.  Like I said, I have not tried this, but I am assuming it will work.   The key is to make sure the LV version used to create the LV OI executable and the VI are the same.
 
Jose
0 Kudos
Message 9 of 9
(4,467 Views)