Working on some new-to-our-team tech this summer and ran into a stumper. Hoping you all can help us.
4 NEO w/ Spark Max controllers connected into two driving gearboxes
1 Double solenoid used for shifting said gearboxes
BASIC code from LabVIEW - pre-populated example with SPARK MAX chosen as the motor controller. Only changes to specify what axes to operate the left/right side motors of Tank Drive and then a button for the solenoid.
What we want it to do:
Using an XBox gamepad, use Tank Drive via axes 1 and 5 (y-axis of left and right joysticks) to operate left and right side of robot.
Double solenoid fires in reverse unless button 5 is pressed and then fire forward. Reverse is solenoid 1 and forward is solenoid 0 on the PCM.
What it do:
When enabled the Spark Max lights go from blinking Magenta to a solid Magenta.
Solenoid 1 lights up on the PCM along with the corresponding double solenoid wired.
Does not respond to inputs from XBox controller. We can see the driver station showing the action as anticipated (buttons are activating, axes are slewing). However, there is no response from the robot.
So we know the robot knows it is either enabled or disabled and we know the Spark Max controllers know if the robot is enabled and we know the solenoid is defaulting as expected.
What we tried:
(1) Turning it off and on again.
(2) Made sure the XBox controller was in the correct USB slot on the driver station.
(3) Checked PWM wiring for correct polarity.
(4) Updated all fireware and software for Spark Maxes.
(5) Connected via USB.
(6) Sacrificed a CIM as an offering to the robot overlords.
(7) Posted a thread on Chief Delphi.
Any thoughts? Hoping there is a simple solution I just cannot see right now because I sat too close to the TV.
Since you posted in the LabVIEW sub-forum, I’ll assume that’s what you’re using to program the robot.
Whenever you get stumped like this, go back to the very simple motor control example installed with LabVIEW and eliminate either the hardware/electrical system or the software. But at this point feel free to go through these items in whichever order seems best to you.
Are there any helpful errors showing on the driver station (there is almost always errors there but is there anything that stands out as different)?
Make sure you are running the correct robot code.
Check the Joystick USB port in the code (remember these numbers start from 0).
Run the LabVIEW code with the run arrow from Robot Main.vi and probe in your code where you expect there to be joystick values (depending on where your TeleOp code is, you may need to have the robot enabled to get values). Follow where this takes you.
If you’re not getting any joystick values while probing, make sure the joystick reference is named correctly in Begin.vi and your TeleOp code (wherever it is). If you don’t see a difference, try copying and pasting the entire constant, there might be an extra space or something that you can’t see. If it was not named the same in both places I would expect errors on the driver station from this.
Again, if all this does not help, go to step 1.
If your not familiar with probing in LabVIEW, I’d be happy to explain further.