View Full Version : Buttons for controlling Extender
02-23-2011, 03:57 PM
Hello, My team wants me to program an extender but when i deploy, the robot completely loses Teleop. Here is my program that i made. Can you guys give me feedback
02-23-2011, 04:06 PM
It looks like you took a Motor example and called it from Teleop. As you have discovered, this does not work. There's a tutorial you can view from the LabVIEW Getting Started window that tells you how to integrate examples into the robot framework.
In your case, you need to do a couple of things to make the code work the way it looks like you are asking it to. Put the Motor Open in the Begin vi, and wire its device reference output to a Motor Refnum Set, giving it a memorable name. Put the Motor Close in the Finish vi, taking its device reference from a Motor Refnum Get with the name you chose. In your Expand and Retract functions, remove the while loop and take the Motor Set's device reference from a Motor Refnum Get just like the one you put in Finish.
Once you do that, the code should run. However, you don't appear to have any way to stop the motor. That might be a problem.
vBulletin® v3.6.4, Copyright ©2000-2016, Jelsoft Enterprises Ltd.