We are having quite a difficult time getting the controller of the robot to actuate the robot in any way. We have coded the drive train in canbus and one double solenoid. The compressor turns on when enable the robot, but no solenoid fires when we press any of the buttons on the controller. Nor does the drive train run when we manipulate the stick in any direction. Please find our code below.
!Why are there coercion dots in the Select function that goes to the Solenoid Set?
I believe they should be Type Defs, did you create them yourself? You might want to use the right click > create constant in the Set VI terminal, so you ensure the internal values of the Enum are the same ones that the VI is expecting to go forward and reverse.
In the end I would expect it to look similar to the one here: http://www.team358.org/files/programming/ControlSystem2015-2019/labview/index.php#DoubleSolenoid
You would need to describe your robot in a little more detail.
You are opening 4 Victor speed controllers. Are each of those controllers independently controlling the motors of 4 wheels or do you have a gearbox with two motors connected to it then you have that configuration for your left and right sides?
Two gear boxes 4 victors
Then you probably want to set two of the Victors (one from the left and one from the right) to “masters” and the other two to followers. I don’t have access to my LabView right now, if I did I’d drop you some code.
Start here for how to set up a follower…
https://phoenix-documentation.readthedocs.io/en/latest/ch13_MC.html#follower
You end up with two drive motor wires that you wire into a standard “Drive - Open 2 Motors” just like you have it now except you are using “Open 4 Motors”.
Then in your teleop you look good for driving as your “Arcade Drive” wiring looks good.
Not sure what the “Teleop Wait 1” and “Teleop Wait 2” case statements are for or what that green Drive.vi is for.
If you want a quick test just to get the robot moving just open two of the victors and pretend the other two aren’t hooked up. Just drive the robot with two victors and two motors.
Then once you can do that then start coding the other victors up as followers.
I have a more basic question to make sure your joystick is properly connected.
Since, if it’s not connected, then none of the controls will do anything at all.
Check on your Driver Station on the USB tab (left side of the DS window)
- Does the joystick show up there?
- Is it in the “0” or top position?
- When you press the joystick trigger, does the joystick entry light up on the Driver Station USB tab?
Also, what model joystick are you using?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.