From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving a point on a graph in the style of a GPS

Hi,

 

I'm the definition of a novice with Labview so I apologise beforehand for any fumbling and obvious mistakes. I'm currently trying to develop a VI that emulates the behaviour of a GPS, moving a point over a map. I have done this by overlaying a transparent graph on an image of a map and attempted to move the point programmatically.

 

The basic idea is that my VI reads two sets of coordinates from a predetermined array and interpolates a number of points between them and then plots each of these in turn, thereby achieveing a smooth transition between points. I have encountered a number of problems with this idea including: incrementing the coordinate number smoothly to move the plot between multiple sets of coordinates, moving the plot in a direction with a negative gradient and stopping the VI when the first coordinate is equal to the second and as a rsult I have used a "greater than" comparison function.

 

You may not there are a number of cursors on the graph, this is to highlight the path I intend the point to take along its journey on my map.

 

Is there a simpler way to achieve what I am trying to achieve? I have heard that the use of Property nodes could prove useful but I am unsure how to use them in this instance.

 

I apologise again for any obvious blunders I may have be demonstrating and thanks in advance for any help you can provide.

0 Kudos
Message 1 of 3
(1,965 Views)

Hi.

 

You could take your array of points and write them one by one to the XY graph, with some delay, as in the attached VI.

 

Hope this helps.

 

Regards,

 

Alejandro

0 Kudos
Message 2 of 3
(1,942 Views)

Hi AlejandroZepeda,

 

Thank you for your help, it's certainly an avenue I've considered and may end up employing. I'm currently trying to write the cursor coordinates to an array, and interpolate between these points. If I can't get this to work I will simply write  a .txt file with my required coordinates on and read these over into an array and use that. Also trying to use a case structure so that once my incremented coordinate (X1 + step) meets it's respective second coordinate the VI increments the numerical control labelled "Coordinate number", this moving on to the next set of coordinates.

 

Again thanks for your help and rapid response.

 

Kind regards, 

 

Dan Taylor

0 Kudos
Message 3 of 3
(1,919 Views)