LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Free-Form Graphing Question

Hello,

Please excuse my ignorance and relative inexperience with LabView 5.0, but I
need to create a continuously building graph of independent x-y coordinates.
I have latitude and longitude coordinates from the NMEA stream of a GPS and
I want to plot them as they are received. I already can read the data and
display the values in my vi, however, everything I have tried, will not
create a plot. I attempted with the x-y graph, but it is expecting an array.
I can easily plot the data, once it is recorded. But, I need to make the
display *real-time*, updating as the coordinates are added.

Any suggestions? Please be fairly basic, my LabView skill is probably 4.3
(on a 0-10 scale (10 being unbelievable)).

Thanks,
Rob




-----= P
osted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
0 Kudos
Message 1 of 4
(3,129 Views)
> Please excuse my ignorance and relative inexperience with LabView 5.0, but I
> need to create a continuously building graph of independent x-y coordinates.
> I have latitude and longitude coordinates from the NMEA stream of a GPS and
> I want to plot them as they are received. I already can read the data and
> display the values in my vi, however, everything I have tried, will not
> create a plot. I attempted with the x-y graph, but it is expecting an array.
> I can easily plot the data, once it is recorded. But, I need to make the
> display *real-time*, updating as the coordinates are added.
>

The XY graph does require an array each time its updated. That means
that you can use the graph if each point that is acquired is appended to
an array of the previous poin
ts and then graphed. There is an example
that does just that located in examples/general/graph/charts.llb/XY
Chart.vi. This example uses a subVI to do retain the last N points, and
is quite easy to use.

If you need the graph to be much much faster, and never erase, then it
is possible to use the picture control to do this. Its a bit more
involved, and I suspect the best thing to do is look for an example on
the pica.army.mil ftp site or perhaps on the NI developer zone web site.

Greg McKaskle
0 Kudos
Message 2 of 4
(3,127 Views)
Thanks again Greg, This did the trick.

Rob




-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
0 Kudos
Message 4 of 4
(3,127 Views)
Rob,

A great (and i think necessary read for beginners) is ch 28 in the G programming
reference on performance issues. It talks about using arrays efficiently
(and other stuff too). I'm not sure if the example greg points to does this
but creating an array of know size at the beginning and using replace array
element as the data becomes available is much more efficient than just building
array for each new data point or re-sizing.

Anyway, this is just FYI.

Jared

"Rob Raye" wrote:
>Hello,>>Please excuse my ignorance and relative inexperience with LabView
5.0, but I>need to create a continuously building graph of independent x-y
coordinates.>I have latitude and longitude coordinates from the NMEA stream
of a GPS and>I want to plot them as the
y are received. I already can read
the data and>display the values in my vi, however, everything I have tried,
will not>create a plot. I attempted with the x-y graph, but it is expecting
an array.>I can easily plot the data, once it is recorded. But, I need to
make the>display *real-time*, updating as the coordinates are added.>>Any
suggestions? Please be fairly basic, my LabView skill is probably 4.3>(on
a 0-10 scale (10 being unbelievable)).>>Thanks,>Rob>>>>>-----= Posted via
Newsfeeds.Com, Uncensored Usenet News =----->http://www.newsfeeds.com - The
#1 Newsgroup Service in the World!>-----== Over 80,000 Newsgroups - 16 Different
Servers! =-----
0 Kudos
Message 3 of 4
(3,127 Views)