LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to plot 6 hours data on waveform graph

Hello

I am using LabVIEW 2016 version.

I have around 50 temperature channels read in the program. Test will run for 6 hours.

I have to plot all 50 temperature channel data on waveform Graph. X axis will be time stamp and Y axis will be temperature.

Is it possible to do this without slowing down the program.

If I keep appending to the graph, then the program may become unresponsive.

Can I define a data window for the waveform graph.

When the test starts, the update will be for every second. after a minute data update will be for a minute on the waveform graph. Timestamp should adjust automatically. If after an hour, update will be for hour. In this way, user can see the full trend of how temperature is behaving for a period of six hours. Please let me know how to do this

 

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

Since you have varying dT requirements  (1/second, 1/minute, 1/hour) you can't use a waveform since waveforms require a consistent dT (delta Time between samples).

 

So use an XY graph where you build the timestamp for each data point as X, and the temperature at each data point as Y.

Then you just keep track of time and build arrays in your loop adding data to it every second, every minute, or every hour depending on your current time.

 

Have you done the math to see how much data you are collecting in total?  It sounds like you are collecting 60 + 60 +5 for each channel.  (60 seconds at 1/second) + (60 minutes at 1/minute) + (5 hours at 1/hour).  That is not a lot of data and shouldn't cause a problem, even when you multiply it by 50 for 50 channels, and 8 bytes per sample assuming double floating point.   Actually it will be more than 8 because you'll have the time data in there as well.

0 Kudos
Message 2 of 5
(3,286 Views)

Use a chart and present the data as a Waveform data type.

 

The chart will plot the data using the T0 of the waveform.

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 5
(3,278 Views)

I'm looking at just such a graph running on a laptop monitoring coolant flows.  I take one sample/minute, and graph 300 points, so I'm looking at the last 5 hours of flow.  There are buttons marked "More" and "Less" -- each push of "More" expands the time base by a factor of 3 (for 5 ranges), so the maximum I can see is 5 * 3^5  = 405 hours, about 17 days.  I can also push "Less" and get back to the smallest time range, 5 hours.  Here's an example, at the lowest (5 hour) scale after it has "wrapped around" and is showing from 15 to "20" hours (the new data are coming in at around 16 hours -- I'm going to try to program a "break" in the trace to distinguish "new data" from "old data, being over-written").Flow GraphFlow Graph

I got the idea for this kind of flexible graph (I call it a "FlexiGraph") from Culverson Software's Blog, written by Steve Bird.  See if this is what you want -- you can modify the ideas presented here to suit your own graphing needs.

 

Bob Schor

 

P.S. -- Another (related) idea is to have two displays, a Chart that has a scrolling display of the last, say, hour of the data, and a Chart scaled to show the entire 6 hours.  If you don't have enough Front Panel space for two such Charts, create two sub-VIs that "accept" the data, with one creating the one-hour Chart on its Front Panel, the other the 6-hour Chart.  In your Main, create a sub-Panel with a switch that (depending on the setting) installs the appropriate sub-VI in the sub-Panel.  Incidentally, in the screen shot shown above, the box called "Flow View" that has the FlexiGraph is just such a sub-Panel.

0 Kudos
Message 4 of 5
(3,263 Views)

@Hemagopal wrote:

 

I have around 50 temperature channels read in the program. Test will run for 6 hours.

I have to plot all 50 temperature channel data on waveform Graph. X axis will be time stamp and Y axis will be temperature.

Is it possible to do this without slowing down the program.

If I keep appending to the graph, then the program may become unresponsive.

 


I have a program that is plotting over 50 different values at ONE SECOND intervals in 5 separate X/Y graphs each displaying a 24 hour period. 

 

This program has been running 24/7 for over a year and never has crashed or "slowed down".

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 5
(3,226 Views)