View Full Version : single lline encoder on Jags
can we use a single line encoder like a gear tooth encoder or an optical encoder with the 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
I don't see why not as long as you tell the Jag "number of lines per revolution".
Have you tried this?
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
Ah! You mean lines as in counts, but he means lines as in wires.
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).
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
According to the jaguar getting started guide:
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.
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.
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.
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.
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.
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?
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.
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.
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.
We are using Wind River C++. We just call CANJaguar::GetSpeed().
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.