LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Definate absolute time chart

Solved!
Go to solution

I am trying to make a chart of temperature values with absolute time. First, the timing seems to be a little off and second, I would like to display an hour of data and then have it write over itself so it is always displaying the last hour of data. It would be nice to be able to scroll through a day or two of data, but not neccessary. I have attached my code from Labview 2010. Could you please help me modify my code to do this? Thank you in advance for your help.

0 Kudos
Message 1 of 8
(3,655 Views)
What isn't working right? What is the problem you are seeing with your code?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(3,635 Views)

Take a look at chart properties to see the modes available.

0 Kudos
Message 3 of 8
(3,624 Views)

Thank you for your response.

 

The absolute time appears as the X-axis and starts at the correct time, however if I let it plot for a minute or so it plots into the future (it is 8:30:32 and the new value shows up at 8:32:44).

 

The range of the X-axis is about one minute and I would like the user to programatically change it to an hour, 4 hours, etc..

0 Kudos
Message 4 of 8
(3,598 Views)

Hi danjneff,

 

The absolute time appears as the X-axis and starts at the correct time, however if I let it plot for a minute or so it plots into the future

Well, you shouldn't change the start time of the X axis with each iteration…

 

The range of the X-axis is about one minute and I would like the user to programatically change it to an hour, 4 hours, etc..

Two options:

- use a large chart history and limit the range of the X axis to your time window

- don't use a chart, use a graph instead…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 8
(3,591 Views)

Thank you GerdW I moved the properties out of the loop so it doesn't reset the start time at each iteration and it works a lot better. However I have run into a new issue, how do I make it clear the chart history each time I start the program?

 

I am pretty new with LabVIEW so don't understand your answer to the x-axis question. Would it be easier for me to use a graph?

0 Kudos
Message 6 of 8
(3,583 Views)
Solution
Accepted by topic author danjneff

Hi danjneff,

 

how do I make it clear the chart history each time I start the program?

Use the history property node.

This is explained in an example VI to be found in the example finder…

 

I am pretty new with LabVIEW so don't understand your answer to the x-axis question

Again: as you are new to labVIEW you should take all those FREE online courses offered by NI on their website!

 

Would it be easier for me to use a graph?

Easier: not really.

Getting better results: yes.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 8
(3,579 Views)

Thank you GerdW.

 

The history node works great!

 

Can you point me to a graph example similar to what I am trying to do?

0 Kudos
Message 8 of 8
(3,571 Views)