LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous XY Graph with data logging from ADAM modules

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!

0 Kudos
Message 1 of 5
(1,219 Views)

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:

  • When the data is read with 1s intervals you can use a simple chart and set its X axis to show relative time. At 1s interval you don't need to apply scaling to the X axis values…
  • When the data is read at 1s intervals you might build a waveform of the samples and show that waveform on a waveform graph (or even chart). Format the X axis as needed…
  • Build a XY plot from timestamps and samples. This options is best for non-even intervals between the samples…

LabVIEW comes with a huge library of example VIs. There also is an example on using charts and graphs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(1,204 Views)

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!

0 Kudos
Message 3 of 5
(1,137 Views)

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.

0 Kudos
Message 4 of 5
(1,160 Views)

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.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 5
(1,140 Views)