06-25-2014 09:46 AM
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.
06-25-2014 09:59 AM
Hi,
Try with this code , I hope it helps you,...also in Chart's Properties go to Display Format-Type-Relative Time
06-25-2014 10:00 AM
06-25-2014 10:07 AM
What do you mean real time? The system time? Check here for setting the system time to X-axis
06-25-2014 10:09 AM
06-25-2014 10:12 AM
06-25-2014 10:22 AM
Thanks for the advice P@Anand!
06-25-2014 10:31 AM - edited 06-25-2014 10:32 AM
Just Check my Rubed code 🙂 (Sorry for off topic discussion)
06-26-2014 04:44 AM
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
06-26-2014 05:02 AM - edited 06-26-2014 05:02 AM
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…