Our programmers are trying to set up tank drive controls and are having a hard time getting all 4 drive motors to fire simultaneously. They had it working for arcade drive, but when they switched to tank control only one of the motors on each side is firing.
We are using Talon SRXs on the CAN bus.
This document:
mentions how to fire all four motors using PWM output, but it is a couple of years old and doesn’t talk about CAN.
Does anyone have a more recent example of how to make this work that I can point them towards?
I am one of the said programmers mentioned above and would just like to share the pictures of both our Begin.vi and out Tele-op. vi. The 2nd and 3rd motors in the CAN chain connect with the program and run smoothly, however the 1st and 4th motors do not.
Any particular reason you don’t combine and simplify everything into one Open 4 Motor drive?
In Teleop.vi you should not be Opening your xBox joystick 50 times a second.
You are Opening the same joystick over and over again confusing the system.
Just use Joystick 0 in Teleop.vi just like you are using Right Motors.
Begin.vi is only called once and is used to open (once) all the devices you will be using elsewhere.
Teleop.vi gets called 50 times a second to handle the constantly changing commands coming from the drivers.
I was unsure if I could use the Open 4 Motors, as I was under the impression that I needed two refnum names (one for each axis). I did not know you could still use one refnum name and wire the code blocks like that.