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”.
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.
Ah! You mean lines as in counts, but he means lines as in wires.
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?
*
*
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.
With a single channel tach input, the Jag cannot tell what the direction is. So position control would be problematic.
*
*
I am not sure I understand your question. Are you asking if we connected both A and B? If so, yes.
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.
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.
*
*
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?
*
*
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.
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().