02-08-2017 05:41 PM
I am an adult coach helping our rookie High School team with our First Robotics Competition robot. We are using LabVIEW to control the left wheels with the left joystick y-axis, and the right wheels with the right joystick y-axis. We would like to add a third motor control using the right joystick for the rope climber, but I am unsure how to do this in LabVIEW. I assume it would send a PWM signal through the third slot on the roboRIO (PWM 2). Are there tutorials or example code I can view to learn how this?
Solved! Go to Solution.
02-08-2017 08:20 PM
Just to make sure I understand what you area asking,
You guys have the two wheal motors working but want a third motor to climb with. but you don't know how to configure the third motor?
Take a look at this example:
From anywhere in LabVIEW Click Help -> Find Examples...
Navigate to the FRC Robotics / RoboRIO / Robot and Motor
double click Motor Control.lvproj
Expand the roboRIO and double click Motor Control.vi
Here is a screen shot of it with some added notes:
To make it work with a Joystick, pull one of the axis and wire it to the same place as the "Speed (-1 to 1)" control. (You can look at the joystick Input.lvproj under the Joystick folder for an example on how to read the axis)
Let me know if this helps.
Ryan
02-15-2017 04:11 PM
Thank you for your helpful reply. I was able to open Motor Control.vi and Joystick Input and wire the axis to Speed. However, I don't understand your notes to 'PUT THIS IN' different vi. How do I put those subVI into the correct Begin.vi, Teleop.vi, and Finish.vi?
02-15-2017 07:45 PM
Your Begin.vi , Teleop vi and Finish vi should look something similar to mine
This is my Teleop vi.
Above this line is my Finish vi.
___________________________________________________________________
This is my Begin vi.
02-16-2017 05:36 PM
Thank you for that second post! The robot is working perfectly now, couldn't have done it without you!