LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I make the x axis real time?

I would like to know how to make the X axis of a chart/Graph into realtime so that I can go in increments of seconds or milliseconds. How can I do this? I am getting some really funny stuff on my graphs and I notice the manual says that the "Time" label is just a default label. So I would like to know how to get the "real" time on my axis. Do you have any good ecamples?

Thanks,

Brian
0 Kudos
Message 1 of 5
(3,144 Views)
If you use the waveform data type for your data then the X axis will reflect the time that the data was acquired.
Message 2 of 5
(3,144 Views)
Brian,
If you want to view time format on the axis, right click on the graph and select X Scale>>Formatting>>Absolute Time.
To get the current time on the axis, create a property node for the graph, and select XScale Offset and XScale Multiplier. Wire Get Date/Time In Seconds function to XScale Offset (if you have LV 7 you will have to use To DBL function between) and wire constant 1 to XScale Multiplier. (see the attachment)
Zvezdana S.
Message 3 of 5
(3,144 Views)
Zvezdana,
I don't have LV 7, (I have 6.1) so that executable didn't come in. Also with what you mentioned won't I just get the time and date in seconds? what I want to get is the data ploted for the amount of time that the VI is running or that my Kodak Imaging board has been programmed to cycle within. I am going to attach some of the stuff I have been getting, I don't know if it is REAL TIME ,which I want, or if it is not.
0 Kudos
Message 4 of 5
(3,144 Views)
Hi,

I agree with Zvezdana S.'s answer but there is a small problem with it. It is that he set the offset inside the while loop. That creates a problem since the waveform extends but the offset is also increasing. What you need is for the offset to remain constant so try setting it outside the while loop. I did that and works just fine. The example should make it clear.
Message 5 of 5
(3,144 Views)