Go to Post So, if you feel your team is at a disadvantage, or the playing field isn't level.... Do something about it. - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 13-02-2015, 17:09
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
CANJaguars and encoders

Hi! My team is planning on wiring our encoders through the jags this year. There's one slight problem with this: the programmers don't quite know how to program that! I am wondering what the encoder ports would be when wired through the jags.

My thinking is that the encoder port numbers would be the port numbers of the jag that they are wired to. Is that correct? If not, what would be the correct approach to programming that?

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2015, 17:50
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: CANJaguars and encoders

Try seeing what functions you can call on the CANJaguar class.

setSpeedMode() is promising.

getPosition() looks like it can tell you the distance on the encoder.

I'm not seeing one immediately that can tell you the rate reported by the encoder though.

There are commands to set up a PID and enable it though in either position mode or rate mode.

Bottom line is that all access to the encoder is through the CANJaguar object and you can't instantiate an Encoder. At least that's how I understand it. We used this mode 3 years ago so my memory is fuzzy.
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2015, 17:51
legts legts is offline
Autonomous Queen
FRC #2399 (The Fighting Unicorns)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Ohio
Posts: 73
legts is an unknown quantity at this point
Re: CANJaguars and encoders

Quote:
Originally Posted by cstelter View Post
Try seeing what functions you can call on the CANJaguar class.

setSpeedMode() is promising.

getPosition() looks like it can tell you the distance on the encoder.

I'm not seeing one immediately that can tell you the rate reported by the encoder though.

There are commands to set up a PID and enable it though in either position mode or rate mode.

Bottom line is that all access to the encoder is through the CANJaguar object and you can't instantiate an Encoder. At least that's how I understand it. We used this mode 3 years ago so my memory is fuzzy.
Thank you so much! I will definitely take a look at those methods!
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 08:37.

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