From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-11-2010 09:33 PM
Hi,
I'm trying to plot waveforms in a single waveform graph accumulatively.
As my program is in a "For Loop", everytime it runs once, it will produce a waveform and display out in the graph.
So if i set the loop to run 30 times, the graph will have 30 waveforms in it. But the problem is that everytime a new waveform is produced, it will replace the previous waveform in the waveform graph.
Even if i loop it for 30 times, the waveform graph will only have 1 waveform(latest) been displayed.
How can i solve it ? I want the graph to display all the 320 waveforms if i loop it for 320 times.
Thanks in advance.
03-11-2010 09:39 PM - edited 03-11-2010 09:44 PM
Try using a waveform chart instead of a waveform graph if it's all the same signal and you want to see it appended.
If that's not what you're after, you'll have to be more specific.
03-11-2010 10:18 PM
I tried changing to Chart and loop the program for 2 time. Now, the chart show 2 waveform "side by side" (continuously) which is not what i want. I want it to stack on top of one another so i can compare them.
How can i do it ?
03-11-2010 10:30 PM
You will need to store your previous waveforms in a shift register. When you add a waveform, append it to your array of waveforms and write them to the graph.
Call up the context help on the waveform graph so you can get the datastructure set up properly for multiple waveforms.
03-12-2010 12:35 AM
I did use shift register but the waveforms displayed are continuous, as in the waveform are displayed side by side.
How do i display them on a waveform graph or chart that appears to be stacking on top of each other, as in same amount of time showing multiple waveforms.
Thanks in advance
03-12-2010 01:22 AM
Hi,
For displaying multiple waveforms in a Waveform graph, each waveform should be a row in a 2-D array. Each row represents a waveform. Build a 2-D array of your waveforms and wire it to the Graph.