Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   single lline encoder on Jags (http://www.chiefdelphi.com/forums/showthread.php?t=101885)

Doc543 03-02-2012 18:09

single lline encoder on Jags
 
can we use a single line encoder like a gear tooth encoder or an optical encoder with the Jags?

mikets 03-02-2012 18:19

Re: single lline encoder on Jags
 
I don't see why not as long as you tell the Jag "number of lines per revolution".

EricVanWyk 03-02-2012 18:39

Re: single lline encoder on Jags
 
Quote:

Originally Posted by mikets (Post 1119371)
I don't see why not as long as you tell the Jag "number of lines per revolution".

Have you tried this?

mikets 03-02-2012 18:51

Re: single lline encoder on Jags
 
We have connected our 250-line encoders to the Jags. They worked as expected. We are doing speed control on it although we did not use the Jaguar's built-in PID. We used our own PID controller library in the cRIO.

EricVanWyk 03-02-2012 18:56

Re: single lline encoder on Jags
 
Ah! You mean lines as in counts, but he means lines as in wires.

Ether 03-02-2012 18:57

Re: single lline encoder on Jags
 
Quote:

Originally Posted by mikets (Post 1119385)
We have connected our 250-line encoders to the Jags. They worked as expected.

Did you connect both channels? Or just one (the OP's question).

Quote:

We are doing speed control on it although we did not use the Jaguar's built-in PID. We used our own PID controller library in the cRIO.
Am I understanding correctly: You connected the encoder to the Jag, then using CAN you read the speed from the Jag, then used that speed as the feedback to a PID on cRIO, then used the cRIO's PID output to command the Jag?


Joe Ross 03-02-2012 19:02

Re: single lline encoder on Jags
 
According to the jaguar getting started guide:

Quote:

Speed control can be implemented with either an encoder or with a simple tachometer sensor. If a tachometer sensor is used (such as a gear-tooth sensor), then the signal should be connected to the Encoder ‘A’ input signal, with the ‘B’ and ‘I’ input left unconnected.
There is no mention of the same thing in position mode. I have not tried it in either mode.

Ether 03-02-2012 19:05

Re: single lline encoder on Jags
 
Quote:

Originally Posted by Joe Ross (Post 1119393)
There is no mention of the same thing in position mode.

With a single channel tach input, the Jag cannot tell what the direction is. So position control would be problematic.


mikets 03-02-2012 19:06

Re: single lline encoder on Jags
 
Quote:

Originally Posted by Ether (Post 1119389)
Did you connect both channels? Or just one (the OP's question).

I am not sure I understand your question. Are you asking if we connected both A and B? If so, yes.
Quote:

Originally Posted by Ether (Post 1119389)
Am I understanding correctly: You connected the encoder to the Jag, then using CAN you read the speed from the Jag, then used that speed as the feedback to a PID on cRIO, then used the cRIO's PID output to command the Jag?

Yes, that's correct. We call the Jag to read the speed and use that as the Input to our PID controller on the cRIO. By doing so, we can change the PID algorithm to give us a stable speed control.

Ether 03-02-2012 19:11

Re: single lline encoder on Jags
 
Quote:

Originally Posted by mikets (Post 1119399)
I am not sure I understand your question. Are you asking if we connected both A and B?

Yes, that's what I was asking, because I think that's what the OP was asking: whether or not it would work with one-channel input (rather than quadrature). Joe just answered that question affirmatively. The single channel must go to the A channel input.


Ether 03-02-2012 19:13

Re: single lline encoder on Jags
 
Quote:

Originally Posted by mikets (Post 1119399)
We call the Jag to read the speed and use that as the Input to our PID controller on the cRIO. By doing so, we can change the PID algorithm to give us a stable speed control.

Interesting. Can you read the speed from the Jag, compute the new output on the cRIO, and issue a new command to the Jag, all within the same TeleOp cycle?


mikets 03-02-2012 19:13

Re: single lline encoder on Jags
 
Quote:

Originally Posted by Ether (Post 1119402)
Yes, that's what I was asking, because I think that's what the OP was asking: whether or not it would work with one-channel input (rather than quadrature). Joe just answered that question affirmatively. The single channel must go to the A channel input.

Sorry for the confusion, I was answering the second part of his question whether I can use an optical encoder for which I assume is the KOP encoder.

mikets 03-02-2012 19:15

Re: single lline encoder on Jags
 
Quote:

Originally Posted by Ether (Post 1119403)
Interesting. Can you read the speed from the Jag, compute the new output on the cRIO, and issue a new command to the Jag, all within the same TeleOp cycle?

Yes, we have achieved pretty stable speed control with it.

MikeE 07-02-2012 21:09

Re: single lline encoder on Jags
 
Interesting.
We haven't been getting a reliable reading from the Jag when the sprocket is stationary. What language are you using (we've seen some unimplemented features in Java in previous years).

Thanks.

mikets 07-02-2012 21:58

Re: single lline encoder on Jags
 
We are using Wind River C++. We just call CANJaguar::GetSpeed().


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

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