View Single Post
  #8   Spotlight this post!  
Unread 15-02-2016, 00:26
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 68
Tparbotmail is an unknown quantity at this point
Re: DriveTrain TankDrive Control

Hi Kevin

We spent most of the weekend trying to get a feel for the closed loop CANTalon. We did quite a bit of testing. Here is what we found.

talonFL.setEncPosition(0);
talonFL.reverseOutput(false); // sets the "Reverse Closed-Loop Output" signal true reverses, false if default
talonFL.reverseSensor(true); // sets the "Reverse Feedback Sensor" signal, pass true to reverse closed loop math to reverse motor direction
this.talonFL.setInverted(true); // PercentVbus Mode
talonBL.reverseSensor(true);


We tested against these methods all weekend just trying to understand how they all work together. Primarily in autonomous. setInverted was necessary for teleo and non-closed loop work. That had an impact. What I could discover through research is the attachment I uploaded. I don't understand when I flipped the reverseSensor it did change the output to positive + in the "Selected Device 0 Quad Encoder" section. But below that in the "Quad Encoder 4x" Section it remained negative. Does someone understand why that is? Or what the relationship is? There are snippets in the software manual but it is not quite all in one place. Maybe it is an I missed it. But maybe some of the frustration is that this part is not well illuminated in the Software guide.

The picture is starting to form for our team but still a lot of unanswered questions. I'd say it took us over 8 hours just to figure out how to test phase alignment for for motor controllers. Robot has not been off the blocks all weekend just doing that. No significant testing of anything else either. Please let me know if you want to discuss in more detail.
Attached Thumbnails
Click image for larger version

Name:	SelfTest.png
Views:	17
Size:	54.9 KB
ID:	20075  
Reply With Quote