09-15-2008 09:35 AM
Hi - for whatever reason, I have never been able to get my hands around graphs and their data. Currently I have a parallel loop running, which aquires the present reading from a piece of lab equipment . Obviously this output is not an array, but single points. What is the proper way of charting this onto a waveform chart? Should I be shifting the data out of the while loop, and then appending the new data to an array? Currently I use the 'build array' on the output, and send this to the chart.
By surface appearance this looks to work. However my timebase is off. Because the sample time is not always consistent, what is the best way to configure the dT/d0? Should I actively be measuring the time to aquire the signal, and piping this into the chart?
Thanks for entertaining my entry level questions!
Best Regards,
Jamie
09-15-2008 10:06 AM
Hello Jamie!
If you have timing information about your samples e.g. frequency, so you can connect 1/f to the dt input of your waveform. T0 is the absolute timestamp of your first sample. So you can connect the get the PC Time getting your first sample and remember this absolute time and always connect to the T0 input of the waveform.
If your each package includes a message counter or timestamp information, so use better the XY Plot.
If you have no timing informations and no timestamps, so you can use the waveform chart (not the graph), it will store/buffer samples for you, so you will not need to store them in a shift register and use build array VI.
09-15-2008 11:40 AM
Hi - thank you for your response and explaination. I have attached a VI, which works exactly as I need. 🙂
My next question is how do I combine the data to stack these two plots (vs overlay). In the past I have clustered the two 'arrays' of data, but I can not cluster the two waveforms. I tried to bundle the two waveforms, as well as build waveform (from output of two waveforms).
Getting there,
Jamie
09-15-2008 11:58 AM - edited 09-15-2008 11:59 AM
You can use the Build Array VI to combine two Waveforms
http://forums.ni.com/ni/attachments/ni/170/355668/1/Waveform.png
09-15-2008 12:47 PM - edited 09-15-2008 12:48 PM
Yes I tried exactly that, however the chart does not change between 'stacked' and 'overlay'. They both appear as overlay. My appologies, I meant to mention this in the last reply.
09-15-2008 01:18 PM - edited 09-15-2008 01:27 PM
I would suggest you have to duplicate the Y scale at first, and than you can stack your plots.
Eugen
09-15-2008 03:42 PM
I'm not sure I follow - if by duplicate, you mean expand the 'create waveform' to include a second 'Y', it does not work. It simply takes the lower-most wired input as the value(s). Perhaps I'm not understanding what you mean(?)
Regards,
Jamie
09-15-2008 04:05 PM
I don't know really right, but my suggestion doesn't work stable (not always). May be it's a LabVIEW bug.
But you understand me right, I meant the second Y-Axis.
09-15-2008 05:10 PM
I wasn't sure what version you are using but here is a quick mopup in 8.0. Note that I used a waveform chart. To get the plots to stack I had to expand the plot legend first then stack the plots.
Hope this helps.
09-16-2008 07:03 AM
Yes that did the trick! Those sneaky folks at NI...
Thanks to you both for your help and better understanding! Perhaps I will update later with more questions, but for now I am good.
Best Regards,
Jamie