Has anyone seen anything like this before? When running these falcons they are not running smoothly. The falcons seem to be stuttering. We had them running just fine before and then we re-wired everything and now we are running into some sort of issue we cant seem to pinpoint. Our CAN loop is complete I can see all of my motors and these two motors that aren’t running smooth right now with my code, they ran smooth using the phoenix tuner self test. I don’t know if my code is wrong, I don’t see where an error through that would be. Any help is greatly app reciated.
Here is a link to what the motors seem to be doing.
Did you use screws that were too long? Could be hitting the falcon’s rotor
They are running smoothly when using the self test in the phoenix tuner, so it does not seem like it could be the screws.
Without seeing all the code, the issue will be hard to pinpoint. Where are you calling the code you posted? Is there any chance you are setting the motor somewhere else (periodic tasks, elsewhere in teleop, etc)? Since it works with Phoenix tuner this sounds like a code problem.
I have it called in periodic task in the 100ms task loop. Should it not be in that loop? Other than that the motors are just connected in our auton. I don’t believe it’s anywhere else in teleop.
I haven’t programmed in labview for a bit, but I think it should be in the Teleop loop?
Also - ensure you don’t have two motor references for 1 can ID. A similar issue happened to me with java and it ended up being that I had two subsystems using the same CAN ID
If you call it in Auto and also periodic you are giving it 2 different commands when running Auto - periodic is always running. If you want to do it that way you would need to put the stuff you have in periodic into teleop block.
Teleop and Auto do not run at same time.
This could explain the behavior if you are only seeing it when running Auto.
Check your motors for screws that are too long and contacting on the inside. Also, depending on how much CAN bus utilization you have you could be experiencing over utilization which could cause the same problem.
This is it. If you called it twice, then it will behave like this. Our practice was to call everything we would use in both Auto and Teleop in Periodic tasks and then the separate commands in Auto and teleop as needed for subsystems called in both. (i.e. the drivetrain)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.