01-25-2022 11:10 AM
Hello,
I am trying to learn how to create a XY-graph (elapsed time since starting code = x, pressure/temperature/or flow rate values = y) that appears on my Front Panel. Currently, my VI successfully writes all of my sensor data to an excel file with a time spacing of 1 second. I have read a few forums about the best function to use for this (appears to be XY graph?), but I am still confused about where to place this function within my block diagram.
My VI is attached. Could someone show me how to plot just one of my outputs against time?
Thanks!
01-25-2022 01:24 PM
Hi hue,
@hollyhue wrote:
I have read a few forums about the best function to use for this (appears to be XY graph?)
Where did you read that? Can you provide links?
You have several options:
LabVIEW comes with a huge library of example VIs. There also is an example on using charts and graphs…
01-26-2022 11:35 AM
Hi Gerd,
Thanks for your reply. After doing some further research and realizing my data is evenly spaced (other forum discussed unevenly spaced data is good with build XY plot), I think the Waveform chart within the while loop is the best option. Do you have any advice on how to plot only 2-3 of my outputs from my sensors? The full array has 19 elements, but I only want the 1, 4, 7. Would index array be the best option? Thanks!
01-26-2022 03:21 PM
Hi Gerd,
Thank you for your help! After further research and examining some of the LabView examples, I found that 'Waveform Chart' is the best option for me because I want to continuously plot my data and it is evenly spaced.
I did have another question: my output array has 18 elements, but I only want to plot the 1st, 3rd, 7th, and 9th -- how do I get these values as separate lines on a single waveform chart? I did learn that you can index the array to get one of the values (using index array function), but when I try to expand this indexing to other values, I do not see independent lines on the waveform chart. I tried to look at the help option on the Waveform Chart which suggests using the bundle function, but the output of this is a cluster which is not compatible with the Waveform Chart. I think I am missing something simple, but I cannot figure it out.
01-27-2022 05:46 AM
A cluster is actually compatible with the Waveform Chart, probably it's also what you need. See Waveform Chart Data Types and Update Modes.vi in the examples.