12-01-2011 05:11 PM
I have DAQ reading in 17 channels at a rate of 500 samples/second and then writing to a TDMS file, to some guages, and to a waveform graph. I would like for the waveform graph to display more than the samples that are currently being read, I'd like for it to display the last ten seconds worth of samples. How can I accomplish this?
I've attached a picture of the relevant section of my VI. If you need anymore information about the VI just let me know.
Thanks!
Solved! Go to Solution.
12-01-2011 05:26 PM
You need to use a software buffer, like a shift register, or a queue, or a functional global variable. If you open the Example Finder and search for "chart" you'll see an example called "XY Chart". This uses a subVI to act as the buffer. This is another option.
One question: why do you have a conversion to I32 in the wire to your graph?
12-02-2011 02:55 AM
Hello,
As mentioned by Smercurio_fc also, you can use Shift register,Functional global variable etc Or use Waveform Chart and increase the Chart history length.
Regards,
Bijay
12-02-2011 07:16 AM
If you want to use graph only then try with the vi attached in which shift regs are used to store the previous data... I think you can use this and optimise further accordingly..
12-02-2011 08:39 AM
Thanks for all the suggestions guys!
I tried using shift registers but I think that's a little more complicated than I really need. I do appreciate the examples though, they should help me in the future.
As Bijay suggested, I switched it to a waveform chart and it's doing exactly what I want it to. What are some of the pro/cons of using a waveform chart over a waveform graph?? I guess I was unaware they were both available.
Also smercurio_fc - That was my ill-fated attempt at trying to "dampen" the data in order to get a more readable graph (ie less small spikes and dips). My inital idea was to average out all the samples from each second and plot just that, but I couldn't find a way to make that work. I'm still trying to find a solution for this if anybody has any suggestions!
12-02-2011 11:07 AM
Hello nmuleski, hope you are doing great!
I think this Kwoledge base can properly clarify what the differences are between waveform charts and graphs.
Let us know how it goes, if you need additional information feel free to post again, it will be our pleasure to help.
Warm regards,
Luis A.
Applications Engineer.
National Instruments.