09-24-2013 03:44 AM - edited 09-24-2013 03:48 AM
Hi,
I am wondering if there is any way to display the x-scale limits of a chart in the format HH: MM: SS at all times without the format automatically switching to MM: SS: mSmS before an hour has passed. Currently I am using the code below to do this:
I feel as if this is unneccesary and that there is probably a setting somewhere which I am missing to ensure the display format, as set in the chart properties menu, does not automatically adjust to a new format before an hour has passed. If anybody has a way of doing this without using property nodes (or ideally coding anything), that would be fantastic.
09-24-2013 04:55 AM
I think buddy there is a option of relative tome as well as absolute time in Chart<<properties<<Display Format<<Type(Scroll it down)....... i Hope this will work .....
09-24-2013 05:30 AM
Thanks for the suggestion. Unfortunately, I have tried that already, the problem is that when using the format '%<%H:%M:%S>t' which I believe should be relative time in format hours:minutes:seconds it gives the relative time in minutes:seconds:milliseconds until an hour has passed which is not suitable for my application. Sorry for not making the issue clearer originally, thanks again.
09-26-2013 05:33 AM
Hi Moreilly91,
I'm Chiara, an Applications Engineer here at NI and I've been looking in to this for you. Unfortunately, I can't immediately find anything which would solve this for you - it's a very interesting quirk of LabVIEW, and one that I've not noticed before, but I think that your workaround may be the simplest way of ensuring that the X Axis stays the way you want it to. I'll keep looking to see if I can find anything more, but having spoken to a couple of people, it's not something that's really come up in the past that we can see, and I haven't found any other way around it yet.
Best wishes,
09-27-2013 09:04 AM
Thanks Chiara,
The application is an ongoing project so let me know if anything comes up .
09-30-2013 06:03 AM
Hi,
I've been playing around with this for a couple of days, and I think I've found a solution: you have to directly associate a timestamp with the waveform to get the amount of time that's passed; otherwise, the time you're currently showing on the graph isn't time from a clock at all, but based upon the relative run speeds of the loop and the computer. Also, this works better with a waveform graph than a chart - and it does mean you no longer need to use any property nodes at all to clear the history etc. I attach my VI that I think manages to do what you need it to: effectively, you have to subrtact the time at which you start the VI from each iteration of the loop to get the amount of time that's passed.
Hopefully this works for you!
Best wishes,
09-30-2013 10:50 AM
Below is a screenshot of the simplest way I've found to create a waveform chart with PC time. Works great regardless of loop dt.
09-30-2013 11:09 AM - edited 09-30-2013 11:09 AM
Oops, forget to handle the 'dt'.
09-30-2013 11:17 AM
Why the formula node? You should just be dividing by 1000.
09-30-2013 12:53 PM
Personal preference. The formula node is equivalent to dividing by 1000. Aesthetically it looks cleaner to me.