Go to Post I'm 5'5", and I'm our team's drive coach. Our drivers are nearly always taller than me. In my case, it's not the driver's station that needs to be made of lexan...it's our drivers. - StephLee [more]
Home
Go Back   Chief Delphi > Technical > Electrical > CAN
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-03-2011, 21:17
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Help with CAN/ JAG encoder settings

Is there a description anywhere that outlines how the various CAN based Speed/ENcoder control settings work?

I've just installed US Digital encoders on a pair of Swerve drives and I've been playing with JAG test application. It seems like I can change the Encoder count and PID gains to move from a herky jerky control to a pretty smooth control.

But I'm not sure how this will manifests itself once I switch to LabVIEW.

eg: If I set the encoder count value to 1440 (US Digital output) I can send the CAN a speed request to 60 (rpm) and the wheel spins too fast but smoothly. If I set the encoder counts to 360 the wheel runs at the correct speed, but very jerky.

ANyway, I seem to get smoother control over the full range of speeds if I use a higher encoder count value (even if I adjust the PID gains accordingly).... but I feel that I'm just guessing, and I don't know what will happen once I switch to LabVIEW. eg: what value do I send the Drive VI? +/- 1 or RPM?

How does it know what Speed I want? Will it mimic the JAG test app?

Also, can I use the encoder counts to measure distance if I'm using them to control speed.

Phil
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 19-03-2011, 23:26
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,620
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: Help with CAN/ JAG encoder settings

The encoder count should equal the actual encoder. You should not adjust it below or above the actual encoder generally.

In doing so, you create a situation in which the Jaguar will improperly calculate or report anything that is based on a full revolution. After all, it will think there are more or less positions in that full revolution than the encoder can really report.

The PID values are a separate matter. I've not used the Jaguar PID loop with LabView. I can tell you that you should review various posts on this subject. You should remember that Jaguar implements an ideal PID loop, while LabView implements a time domain (standard) version of that loop from what I've seen.
Reply With Quote
  #3   Spotlight this post!  
Unread 11-04-2011, 02:42
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Help with CAN/ JAG encoder settings

Quote:
Originally Posted by PhilBot View Post
what value do I send the Drive VI? +/- 1 or RPM?
Drive is a special beast since it is intended to be controlled by a joystick (-1 to 1). You set the Max Output value on the Open Drive (Existing Motors) VI to control what that -1 to 1 gets scaled to.

Quote:
Originally Posted by PhilBot View Post
How does it know what Speed I want? Will it mimic the JAG test app?
In the case of Motor Control Set Output, in speed mode, the units are in RPM... look at the context help for details. You need to configure the number of encoder lines in LabVIEW so it can scale to RPM.

Quote:
Originally Posted by PhilBot View Post
Also, can I use the encoder counts to measure distance if I'm using them to control speed.
Yes... but to do it you need to configure the position reference as well as the speed reference.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 20:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi