Log in

View Full Version : CAN Talon and Bang Bang Controller


duane
13-02-2016, 00:08
Has anyone had success with a bang bang controller with the CAN Talon speed controllers?

Our results were less than spectacular. The lag time for reading and setting the talons was noticeably slow so that you could tell even by listening that the motor was rotating over a large range of speed. I don't recall the graph values but the results were were over a large range.

We were also using an unloaded motor. The motor was on a bench with nothing attached to the shaft.

Any thoughts would be great to consider.

Thanks

Jared Russell
13-02-2016, 00:48
Are you closing the loop onboard the Talon or on the roboRIO?

Ether
13-02-2016, 00:53
The lag time for reading and setting the talons was noticeably slow... We were also using an unloaded motor

Any thoughts would be great to consider.


http://www.chiefdelphi.com/forums/showpost.php?p=1247149&postcount=8

Look at bullet points 3, 4, and 5 (phase lag, moment of inertia, controller period). That's why your results were less than spectacular.

You could improve your results by adding a shooter wheel (increase moment of inertia) and increasing the Talon broadcast frequency (decrease the phase lag).

But if you have CAN Talon, why aren't you using its built-in speed controller?

duane
13-02-2016, 13:08
> But if you have CAN Talon, why aren't you using its built-in speed controller?

Umm, huh? Esplain? I've been over the API, I didn't notice a built-in speed controller?

I'll look again, but a hint would be great.

duane
13-02-2016, 13:09
Are you closing the loop onboard the Talon or on the roboRIO?
How would I close the loop in the Talon?

@Ether indicates a built-in speed controller. I've not noticed that, I'm looking ...

duane
13-02-2016, 13:15
Are you referring to

SetControlMode(kSpeed);

Hmm, that could be useful!

Ether
13-02-2016, 14:13
...

duane
13-02-2016, 22:16
Thank you! We are having some success with using the Talon in these modes!