LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generating real time for an xy graph behaving as a chart

Hi there, i have created a xy graph to behave like a chart . But on the x axis i need time be generated. Is there a way of generating time like a stop watch, but with the graph also acting like the stop watch. But i need also the time data to be outputted to a spread sheet and one column to display time of results e.g. seconds, minutes, 1,2,3,4 etc down one column. By the way the xy graph is contained within a while loop and i have tried supplying time by using a control rate so the data on graph updates every second. But when it comes to spread sheet output the time is in seconds, but always start from a large number(223424,224424,225424 etc and never from zero.

Hope somebody can help me, thanks Stuart
0 Kudos
Message 1 of 4
(2,940 Views)
> Hi there, i have created a xy graph to behave like a chart . But on
> the x axis i need time be generated. Is there a way of generating time
> like a stop watch, but with the graph also acting like the stop watch.
> But i need also the time data to be outputted to a spread sheet and
> one column to display time of results e.g. seconds, minutes, 1,2,3,4
> etc down one column. By the way the xy graph is contained within a
> while loop and i have tried supplying time by using a control rate so
> the data on graph updates every second. But when it comes to spread
> sheet output the time is in seconds, but always start from a large
> number(223424,224424,225424 etc and never from zero.
>


I'm not certain that I understand the problem, but I think that you want

to use the Offset property on the X scale of the graph. What this does
is add an amount to the X value to compute the scale's displayed value.
In otherwords, if the X values go from 0 to 100, and you set X Offset
to be 500, then the scales will display numbers from 500 to 600. You
can then set the formatting to whatever you like, like Relative Time or
Absolute Time.

Greg McKaskle
0 Kudos
Message 2 of 4
(2,940 Views)
Thanks for the help, tried the x offset, the problem is though when i set the offset the graph tends to revert back to original input. What i am using to supply the time is a wait untill next ms multiple with is set to a 1000 which is contained within a while loop, so the data is represented on the xy graph every second. Just wondering if there is a better way to use time and also display time on spreads sheet in multiples of seconds or minutes.

Thanks Stuart
0 Kudos
Message 3 of 4
(2,940 Views)
stu22,

Have you looked at the Variable-Time Chart XY shipping example? I would start here. This shows how to display moving time with the moving data.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 4 of 4
(2,940 Views)