cancel
Showing results for 
Search instead for 
Did you mean: 

graph or chart with time date

SOLVED
johnnyt
Member
Solved!

graph or chart with time date

Message contains an attachment

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.

 

 

 

 

15 REPLIES 15
Dennis_Knutson
Knight of NI

Re: graph or chart with time date

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.

johnnyt
Member

Re: graph or chart with time date

Message contains an attachment

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.

 

 

Dennis_Knutson
Knight of NI

Re: graph or chart with time date

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.
johnnyt
Member

Re: graph or chart with time date

"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.

Dennis_Knutson
Knight of NI
Solution

Re: graph or chart with time date

Message contains an attachment

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

 

Try this.

johnnyt
Member

Re: graph or chart with time date

Thanks, Dennis, that did the trick!
johnjt
Member

Re: graph or chart with time date

Message contains an attachment

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.

 

johnjt
Member

Re: graph or chart with time date

Message contains an attachment

attached is a LV version 8.0

Dennis_Knutson
Knight of NI

Re: graph or chart with time date

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.