LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Best to Draw Path for User Data to Follow? [2D picture controls? XY graph? other?]

Solved!
Go to solution

Hi all,

 

I am a PhD candidate and I have looked all over the forum and interwebs for someone who is doing something similar to no avail. 

 

My task (which I've found common in academic research) is displaying a path for a user to follow with some user-generated data.

I've attached a picture of my research setup just for fun (helps visualize the task).

tsr26_0-1666802004525.jpeg

 

I want to display to the person a path for them to follow and the pedal crank arm positions will correspond to X and Y of the user cursor. 

 

The method I started trying was using a 2D picture control to display a path and then a 2nd 2D picture control overlaid with the user cursor data (picture refreshed every iteration). I've attached a sample vi to give you the basic idea of where my head is at.

 

My main question is: is this the best method for what I'm trying to accomplish? I assume that this is pretty common, but I could not find a similar example. Perhaps doing this with an XY graph? Or maybe just using only 1 picture control and re-drawing the path every iteration as well as the new cursor position?

 

FYI the code I posted is with LV 2020 Community Edition, but the edition of LV on the PC which controls my motors is LV 2015 SP1 - if that is relevant for any suggestions.

 

Your help is greatly appreciated,

tom

0 Kudos
Message 1 of 4
(1,067 Views)

You're making things more complicated than necessary.

See attachment.

"If you weren't supposed to push it, it wouldn't be a button."
Message 2 of 4
(1,039 Views)

Paul,

 

Thank you for the edits - I've learned a good deal in just the few changes you made. For some reason I didn't think to use the Event Structure in this use case.

 

As to my overall paradigm though, you would agree that overlaying two different 2D picture controls is a good way to go about this? I'm new to creating visual feedback scenes with LabVIEW so I want to make sure I'm using a solid methodology.

 

tom

0 Kudos
Message 3 of 4
(1,009 Views)
Solution
Accepted by topic author tsr26

@tsr26 wrote:

Paul,

 

Thank you for the edits - I've learned a good deal in just the few changes you made. For some reason I didn't think to use the Event Structure in this use case.

 

As to my overall paradigm though, you would agree that overlaying two different 2D picture controls is a good way to go about this? I'm new to creating visual feedback scenes with LabVIEW so I want to make sure I'm using a solid methodology.

 

tom


Seems OK.

Another possible way is to just move an object around the front panel instead of re-drawing a picture.

The downside to that is that it complicates the handling of coordinates,

"If you weren't supposed to push it, it wouldn't be a button."
Message 4 of 4
(970 Views)