12-04-2013 08:40 PM
I have attached the vi which i am really struggling with. Basically, i want to select n points using the mouse clicks and then draw a shape connecting those points by using
a boolean LED to move smothely through points in order and back to the first point. i have noticed that when the gradient between two is negative the LED goes in opposite direction unexpectedly.
I really dont know how to fix this.
Any help will be appreciated.
Solved! Go to Solution.
12-05-2013 04:03 AM
Hello gurucode
i changed the code to the best of my understanding
let me know if this helps i added a case structure where you were moving the boolean
12-05-2013 07:15 AM
thanks a lot Derick, i really appreciate your help.
as you have noticed, when you run the vi and select number of points
it doest move through the points when you finish selecting them.
I have to turn off the 'new shape' button and
run it again for the LED to start moving.
i want it to start moving as soon as the number of points have finished being selected.
I attach the clearly labeled vi.
thanks
12-05-2013 07:47 AM
12-05-2013 09:21 AM
here is the vi in the previoius version. L12
12-05-2013 09:15 PM
Hello gurucode
I have made the changes in the VI, once again to the best of my understanding.
Problems with the code (if you have a straight line parallel to the y axis the movement is super fast)
i've left that one for you to play around with set to your liking
PS. If you have some free time, you may want to look into design patterns, they are pretty cool and help manage your code better
Links :
http://www.ni.com/white-paper/7595/en/
http://www.ni.com/white-paper/3023/en/
12-05-2013 09:18 PM
Hello udka,
Im sorry i saw your messgae relatively late, i see gurucode has submitted the old code in 2012.
I have submitted my latest solution in 2012 as well 🙂
12-06-2013 04:16 AM
Thank you so much Derrick, that really solves the problem.:smileyhappy
I will definitely look into the design patterns. Thanks for the link.
12-06-2013 04:20 AM
Glad i could help 🙂