Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   CANJaguars and encoders (http://www.chiefdelphi.com/forums/showthread.php?t=134525)

legts 13-02-2015 17:09

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!

cstelter 13-02-2015 17:50

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.

legts 13-02-2015 17:51

Re: CANJaguars and encoders
 
Quote:

Originally Posted by cstelter (Post 1443569)
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!


All times are GMT -5. The time now is 11:36.

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