|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Help with CAN/ JAG encoder settings
Is there a description anywhere that outlines how the various CAN based Speed/ENcoder control settings work?
I've just installed US Digital encoders on a pair of Swerve drives and I've been playing with JAG test application. It seems like I can change the Encoder count and PID gains to move from a herky jerky control to a pretty smooth control. But I'm not sure how this will manifests itself once I switch to LabVIEW. eg: If I set the encoder count value to 1440 (US Digital output) I can send the CAN a speed request to 60 (rpm) and the wheel spins too fast but smoothly. If I set the encoder counts to 360 the wheel runs at the correct speed, but very jerky. ANyway, I seem to get smoother control over the full range of speeds if I use a higher encoder count value (even if I adjust the PID gains accordingly).... but I feel that I'm just guessing, and I don't know what will happen once I switch to LabVIEW. eg: what value do I send the Drive VI? +/- 1 or RPM? How does it know what Speed I want? Will it mimic the JAG test app? Also, can I use the encoder counts to measure distance if I'm using them to control speed. Phil |
|
#2
|
||||
|
||||
|
Re: Help with CAN/ JAG encoder settings
The encoder count should equal the actual encoder. You should not adjust it below or above the actual encoder generally.
In doing so, you create a situation in which the Jaguar will improperly calculate or report anything that is based on a full revolution. After all, it will think there are more or less positions in that full revolution than the encoder can really report. The PID values are a separate matter. I've not used the Jaguar PID loop with LabView. I can tell you that you should review various posts on this subject. You should remember that Jaguar implements an ideal PID loop, while LabView implements a time domain (standard) version of that loop from what I've seen. |
|
#3
|
|||
|
|||
|
Re: Help with CAN/ JAG encoder settings
Drive is a special beast since it is intended to be controlled by a joystick (-1 to 1). You set the Max Output value on the Open Drive (Existing Motors) VI to control what that -1 to 1 gets scaled to.
Quote:
Yes... but to do it you need to configure the position reference as well as the speed reference. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|