LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to update a Waveform Graph at runtime?

I have a vi that returns a 2-dimensional array of doubles. At the moment, I am using a Waveform Chart to graphically display the data at run-time. What I would rather do is use a Waveform Graph to display the data.

I have tried wiring a Waveform Graph to this 2D array of data, but I don't get anything to display on the Graph. It must update during run-time, which is what the Chart does - however, the chart only holds a certain number of values and discards older data. This won't work since I need the user to be able to scroll back through the test run and look at all waveforms for a given point in time.

When setting up the Waveform Graph, I selected "Transpose Array", but this didn't change anything. Is there somethin
g I'm missing here? By the way, the 2D array contains 16 channels of data (soon to be 40 channels), so the amount of information is quite large.

Thanks in advance for any assistance,
tsc
0 Kudos
Message 1 of 8
(4,321 Views)
Don't know why you're not seeing anything on the graph, unless you are sending it a 2D array of 16x1.

Data passed to a graph replaces whatever was already displayed - there is no history, unlike in charts, where the data is added on to the end of the history. The attached example might clarify this - it uses a for loop to emulate a subvi returning 2D data of variable sample length, and passes it to both a graph and chart. If you set the number of samples to 1, nothing shows on the graph. Also check out the graph/chart example that comes with LV.

Also, have you tried increasing the chart history length to something greater than the 1024 sample default?
0 Kudos
Message 2 of 8
(4,321 Views)
Hi,

As Roo Payne said, if you update a waveform Graph with new data, it will clear its display of any old data and replace it with the new data. You can use shift registers though to append new data to old data in a waveform graph. Check out the following link for an example program that does it.
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3E7DB56A4E034080020E74861&p_node=DZ52038

Regards,
Ankita A.
0 Kudos
Message 3 of 8
(4,321 Views)
Hi All
 
I am exactly having the same problem as Maxpower,i got very good tips from the forum members.But still i am not getting the results i am expecting.
 
Is anyone got solution for this problem.
 
Thanks All
 
 
 
0 Kudos
Message 4 of 8
(3,976 Views)

Veeru,

You seem to be asking the same question over and over again but I find the description of your problems confusing. What exactly have you tried and what exactly are the issues with the answers you've been given? Please post some code that illustrates what you've got and what you want to change. As already mentioned, a chart with a long enough history or a graph with a shift register/build array are both viable options.

0 Kudos
Message 5 of 8
(3,970 Views)

Thanks Dennis

I got tips from mike and Joseph.

I have attached the vi i have done.From Joseph point of view i can use the graph palette and scaling,when using the graph palette the user needs to zoom in and zoom out to see all the plots.Thats useful, instead what i like to do is without the user doing anything i like to display all the datas right from the beginning to till the last moment.Also another tip from Joseph,scrolling the horizontal bar is also useful,but i am mostly interested to do like this(the user should stand back and see the plot without moving the scroll bar,...)

I do apologize for repeating this question

Thanks

 

 

 

0 Kudos
Message 6 of 8
(3,947 Views)
I don't quite understand what your for loop is supposed to do but if you are trying to implement the shift register solution that you've gotten, you did it incorrectly. Look at the attached code. with each iteration, the new data is appended to the old.
0 Kudos
Message 7 of 8
(3,939 Views)

Thanks Dennis

This may be my last question in this topic.Sorry For loop i wrong in this code.

In my code i am just using an array of elements,so each element in the array is updated continuosly and plotted separatley(chart).

Thanks for your help

 

0 Kudos
Message 8 of 8
(3,928 Views)