LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time on the x axis

I can't believe something this basic is this problematic.  I am taking temperature readings every 5 seconds and plotting them on an XY chart that is supposed to show a 24 hour period.  At then end of that period, the vi starts a new file and continues to take data.  So, I really don't have a problem with the chart staying formated to 24 hours and the data points filling in right to left for that period.  What I want it the real time on the x axis.  I have read multiple postings and have yet to find a viable solution to my problem.

0 Kudos
Message 1 of 10
(3,205 Views)

Hi,

Try with this code , I hope it helps you,...also in Chart's Properties go to Display Format-Type-Relative Time

0 Kudos
Message 2 of 10
(3,197 Views)
There is no such thing as an XY Chart. There is a waveform chart and and an XY Z graph. What exactly are you using and what exactly have you tried? What do you mean by data points filling in from right to left?
0 Kudos
Message 3 of 10
(3,195 Views)

What do you mean real time? The system time? Check here for setting the system time to X-axis

-----

The best solution is the one you find it by yourself
0 Kudos
Message 4 of 10
(3,188 Views)

 

Your 9 year old thread gave me a good learning today 🙂

-----

The best solution is the one you find it by yourself
0 Kudos
Message 5 of 10
(3,185 Views)

@13Cmmkl wrote:

Hi,

Try with this code , I hope it helps you,...also in Chart's Properties go to Display Format-Type-Relative Time


You have Rubed the code (As I did sometime back). You can just convert the Get Time in Seconds to DBL and use.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 10
(3,179 Views)

Thanks for the advice P@Anand!

 

0 Kudos
Message 7 of 10
(3,162 Views)

Just Check my Rubed code 🙂 (Sorry for off topic discussion)

-----

The best solution is the one you find it by yourself
0 Kudos
Message 8 of 10
(3,155 Views)

Dennis,

I apologize for my lack of correct NI lingo.  Yes, I am using a wavechart.  By 'filling in from right to left', I am talking about using the update mode of 'stripchart'. I found a link in the messages to some code by Justis Jonas called 'time match.vi'  that was coded in 2005! I have put it into my code but as of yet still haven't figured out the update time interval in getting it to match my data coming in. It appears to work so far, but that is my point.  In 9 years time, LabVIEW has not put into the code something as basic as getting the time and date from the machine it is running on and allowing the user to place this on the X axis of a stripchart.  This, in my opinion is absurd.  Every potential solution I have seen so far makes it obvious that one has to be an experienced LabVIEW programmer to even put the icons into their code.  Again, pardon me for not being a 'by the book' programmer, but rather a 'by the seat of the pants' programmer.  That being said, I have two vi's that have served me very well now for over 9 years.  I could never have hoped to accomplish the complexity of what they do without LabVIEW.

A good friend of mine summed it up perfectly.  He said, 'You get to 85% of what you want out of your vi in 30 minutes.  The additional 15% will take you years'  He was not joking!

Regards,

Ron Brook

 

0 Kudos
Message 9 of 10
(3,114 Views)

Hi Ron,

 

sometimes it would help to read the "books" (aka LabVIEW help) for those things!

 

When you use a chart you need to set the x axis offset/multiplier: set offset to time of measurement start (as given by GetTimeinSeconds) and multiplier to 5 (as you receive new values with a 5s interval). Now you just need to change the display format of the x axis to display time (right-click the chart and brwose through it's property dialog).

 

It's done in just a minute - and it's already been discussed here in the forum…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 10
(3,106 Views)