02-17-2010 10:23 PM
HELP!
I've been trying to get my motor, that will lift the robot, to go forward when button X is pressed and reverse when button Y is pressed. I've looked it up but what I find never works. I'm doing my programing in Labview 2010. Can someone please give me some tips?
02-18-2010 04:56 AM
The VIs you'll need are the ones to read the joystick values. Teleop calls Joystick Read to read some of the buttons as an example.
The next part is to call Motor Set Speed with one of three values, a positive one, a negative one, or zero if neither is pressed. There are many ways to choose between the values, but perhaps the simplest is to cascade two selectors as shown below. This says that if B1 is pressed, use -0.5, otherwise if B2 is pressed use 0.5, otherwise use 0.0.
You will also need to Open and store the motor reference in Begin and Close it in Finish. You'll need to get the motor reference by name in order to set the speed of course.
Greg McKaskle