07-13-2017 07:15 AM
Hi all,
I am doing a very simple program to create an array and see the data in waveform graph. the data will be on y-axis and the time in x-axis. For the time I have problem with the actual time ,the system time for labview is 07:00:00 pm . My question is that how I can change the system time to the actual time or how can I have actual real time in the x-axis.Thank you all in advance.
Solved! Go to Solution.
07-13-2017 07:23 AM
Hi Ziad,
use a waveform instead of a plain array for your data. Put the needed timestamp into the waveform…
I have problem with the actual time ,the system time for labview is 07:00:00 pm . My question is that how I can change the system time to the actual time
Please explain the terms "actual time" and "system time". Why are they different?
07-13-2017 07:42 AM
Thank you GredW
can you please attach a screenshot of how to do it.
07-13-2017 07:56 AM
07-17-2017 08:15 AM
I need to plot N distinct plots on the same graph where the x-axis is the host system (computer clock) time. My issue is the waveform indicator displays the wrong time (7:00 pm when it's 9:00 am ) when set to absolute time.
07-17-2017 12:20 PM
Please post your VI
07-17-2017 12:43 PM
This is my vi
07-17-2017 01:00 PM
I see, the chart does not automatically update its reference time, which is something like Jan 1, 1903. What you can do is use a property node at the start of your program to adjust the x-axis offset. Also, to make sure it keeps track of time correctly, you'll want to change the multiplier as well, since the default is 1 second. It looks like you're getting 10 pts per second so we can make it 0.1s = 100ms.
My preferred method is actually to use an XY graph instead of a chart. In that case I would update the data like this:
Feel free to use whichever way is more intuitive to you.
07-17-2017 01:51 PM
The time shown on the chart isn't wrong, it's just showing the default time. If you changed the options to show the date you would see it's Jan. 1, 1903 (standard start of epoch time).
The chart doesn't know what real-time is unless you tell it but in your case there's really no such thing. An array of doubles has no embedded timing info (initial time or delta time) so there's no reason to display absolute time as it would just cause confusion. Basically you would just be using your chart as a clock so what's the point? If you really want to do it just follow the code for the chart in this link:
http://digital.ni.com/public.nsf/allkb/0A4899EF6D01B9C5862568B70074F989
Also take a look at some of the examples (Help > Find Examples...) for arrays. You're really doing things the hard way. You can generate a 1D arrays by auto-indexing your for loop for instance. I don't know what you were trying to do with the 2D array so post back if I'm missing something.
07-17-2017 02:54 PM - edited 07-17-2017 02:54 PM