This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Jaguar CAN Position Mode Initialization?

Greetings!

Is there anyone with a working CAN initialization sequence for position control with an encoder for the Jaguar BDC motor controller that can share the code? It doesn't matter what language (Java, C++, Assembler, etc.). I've been looking for anything that can show this sequence to no avail. An AppNote, anything?

When I try to use BDC_COMM, the motor has violent reversals that I'm afraid will strip the gears. It would seem that the Voltage Ramp setting should help avoid this, but it's grayed out in position mode. I've set PID values of .35, .001, .01 that seem like a reasonable starting place. I've set my quad shaft encoder to 2 encoder lines w/ 128 pulses per revolution (at least I *think* that's what the setting in BDC_COMM means).

I then set a position and the motor takes off at full speed, passes the position and then violently reverses and goes at full speed the opposite direction (some of the time). Other times, the motor just keeps running at full speed without any apparent heed to the fact that it's way past the set point. This sounds like PID problems. But, the violent reversals keep me from doing much testing for fear of tearing the gear box to pieces.

Any help would be appreciated and I'd gladly write up the solution for others to have.

TIA,

Mike

4 Replies

  • Hi Mike,

    On the BDC-COMM Configuration tab, what do you have the various parameters set to? (i.e Encoder Lines, POT Turns, Max Vout(%), etc.)

    From what you said, your Encoder Lines should be 128. You can also set the max Vout to be less so that your motor will not spin at full speed.

    In the Mode tab, when you select Position mode, what Reference do you have selected? For you setup it should be set to Encoder. Try selecting Potentiometer and then re-selecting Encoder for the reference.

    Finally, is the Position value (at the bottom of the window) updating when the motor moves?

    -David
  • Hi Yano,

    Encoder lines is set to two (it's a quadrature shaft encoder with A & B). POT turns is set to 128 (the shaft encoder is 128 PPR). OK, on the Max Vout I'll set that so it's not quite as violent when it reverses.

    The firmware documentation is incredibly vague as to the units or meaning of the Encoder Lines and POT turns fields -- let alone how POT Turns relates to shaft encoder pulses per revolution if at all.

    Does the Voltage Ramp do anything? And, what are the units on the Voltage Ramp? Is it volts/revolution? Percentage per second? Volts per second? In fact, the API document leaves much to be desired as to units on most of the parameters.

    In the mode tab when I first start the program, the Potentiometer/Encoder box is grayed out. If I switch to speed mode, then I can select the encoder and then switch back to position mode and the setting seems to stick although this behavior is very counter-intuitive (this is BDC_COMM88 with version 87 firmware, BTW).

    When I have everything selected, the Position value does change. But, the motor (a CIM) blissfully continues to increment in the positive direction even though it's way past the set point. After 30-60 seconds or so, I usually pull the plug because it doesn't appear to be sensing how far off it is. Do you have suggestions for the PID values that would change this behavior? I'm currently using .35 (P), .001 (I), and .01 (D) that I had picked up from one of the forum boards as a starting point.

    I've been successful in controlling the jaguars in the voltage control (open-loop) mode. What I'm trying to do is to use one of the closed loop modes in conjunction with the shaft encoder for absolute control of the motor. Unfortunately, I've yet to find a worked and working example of how this is done. If you can help me get this working, I'd gladly write an application note for TI's subsequent use, so other folks don't have to muddle through this interface again.

    TIA,

    Mike

    Post edited by: taichichuan, at: 2010/02/17 13:48

    Post edited by: taichichuan, at: 2010/02/17 13:48
  • Encoder Lines refers to how many ticks per revolution. So in your case that is 128. POT Turns refers to how many turns your potentiometer has (if you were to hook one up). Since you are using the encoder, the number of POT turns is not relevant.

    -TI Yano
    aka
    David Yanoshak
    aka
    dyanoshak on Chief Delphi Forums
  • Hi David,

    OK, that helps. As soon as I can get to my control system this evening, I'll give it a whirl and see what happens.

    I've already written up all of the steps needed to get the jags onto the CAN bus and the software set up to show everything speaking. Once I get these problems licked, I'll do the same for the programming piece.

    Is there any way, even with an NDA with my company, that I can get the sources to the Jaguar firmware so I can write "The Definitive Jaguar API Reference"? I won't modify it, simply look at it to write a guide that explains what the API really is as well as the units, etc. and throw in mode examples. It's probably too late for this build season. But, I'm assuming that the Jaguars will likely still be in use next year as well.

    Thanks,

    Mike
    AKA
    Mike Anderson
    AKA
    taichichuan on Chief Delphi

    Post edited by: taichichuan, at: 2010/02/17 16:00

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.