From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph or chart with time date

Solved!
Go to solution

I just can't seem to figure out how to graph current time and date on the x axis.  I'll be getting data from a serial port and parsing out to an array for logging.  Attached you will see a simple example in Labview 8.  I tried the property nodes but could not get the year past 1904.  Any help would be appreciated.  Thanks Much.

 

 

 

 

0 Kudos
Message 1 of 16
(3,849 Views)

It would have been nice if you had attached the code with the property nodes to see what you were doing wrong.

 

There's a very old example that explains what you should be doing. Look up Real-Time Chart.

0 Kudos
Message 2 of 16
(3,843 Views)

Hi Dennis,

 

Attached is how I was doing the property node.  Notice time is correct, but I just can't get the date and year.  Thanks.

 

 

0 Kudos
Message 3 of 16
(3,835 Views)
Sorry, I didn't notice that you also wanted the date. You've have to enable absolute time I believe. The easiest way may be to create a waveform data type with the build Waveform function and wire the waveform to the chart.
0 Kudos
Message 4 of 16
(3,819 Views)

"build Waveform function "

 

I tried that too, it only works with a single plot, not four, as in my example.  I have a feeling that Labview simply can't do what I want it to do: plot four sets of data on one chart with real date and time.   I've been working on this for almost two days now and I see no solution in site.

0 Kudos
Message 5 of 16
(3,812 Views)
Solution
Accepted by topic author johnnyt

Sure it can do it. You need to build the correct data type for the chart, of course.

 

Try this.

Message 6 of 16
(3,804 Views)
Thanks, Dennis, that did the trick!
0 Kudos
Message 7 of 16
(3,791 Views)

Hello Again,

 

I realize this is an old thread, but just recently I found that the technique we settled on to display time/date is causing a memory leak in my Labview application.  It just reared it's ugly head recently, and it takes weeks to show up.  I discovered with the help of Labview's VI analyzer that the build arrays were the culprit.  If I take them out of our example, then I will not be able to build the waveform.  So I am now, still looking for a solution to the original problem of getting the DATE into my graph.

 

To see the memory leak manifest itself, change the time of the loop to 1 millisecond or look at my attached examples.

 

0 Kudos
Message 8 of 16
(3,316 Views)

attached is a LV version 8.0

0 Kudos
Message 9 of 16
(3,314 Views)
Yes, using the build array will cause memory problems if used for a long enough time. It's not at all a memory leak. You would need to implement a buffer to keep the arrays from growing past a certain size. There is an example called XY Chart.
0 Kudos
Message 10 of 16
(3,313 Views)