10-26-2022 11:35 AM - edited 10-26-2022 11:38 AM
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).
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
Solved! Go to Solution.
10-26-2022 01:57 PM
You're making things more complicated than necessary.
See attachment.
10-26-2022 04:44 PM
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
10-27-2022 09:16 AM
@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,