adjusting acceleration while in position mode

18 years 4 months ago #4456832 by ron
<P style="MARGIN: 0px">I am using the 2850 in position mode to set the target position of the motor. I want to vary the amount of time it takes to get to the target position based on milliseconds.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">At first reading, I thought I might be able to vary the PID parameters before sending each target position, but now it seems not possible because these parameters must be saved to flash and the controller reset before the new parameters take effect (same for acceleration).
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Then I thought I might be able to adjust maximum amps to acheive the same results, and found that this also seems to be a flash and reset adjustment
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Do you know of ANY way to vary how fast the position response will be?
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">If there is no way; may I suggest a "timed position" mode where the desired position will be achieved in n milliseconds?

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4460004 by cosma
<P style="MARGIN: 0px">Try changing the acceleration ramp. It will make the change from one command value to the next slower.

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4460140 by ron

The documentation on page 40 states that this is an eeprom value. Is this a parameter I can set without reseting the controller? (sometimes I need to get to a position quickly, other times I need to get there slowly; and I can't reset the controller in between...)

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4460183 by cosma
<P style="MARGIN: 0px">It is an eeprom value and it should not be changed on the fly. If you can't use a fixed value that will work under all condition, there is not much you can do.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">You may try sending position commands every 16ms that step through a custom ramp.

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4462289 by ron
<P style="MARGIN: 0px">Let's see: It takes 32 characters to send a single 32 bit position command. One for each motor would be 64 characters every 16ms, times 63 (the number of whole 16ms slices in a second gives us 4024 characters per second, or about half of the serial port's output bandwidth. Echo would be considerably more 'cuz of all the plusses and minusses (5 per each 32 bit number, assuming all are plusses)
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Hmmm. I guess it might work. Assuming I don't send any queries to verify position during the ramp...
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Any chance you could give us a firmware update that would allow a 32 bit position command in say 10 characters (instead of the current 32 characters) could you? The microcontroller could parse the 32 bit hex into the four 8 bit holding registers
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">For instance "^" is the command, "A" or "B" or "C" or "D", etc would be 32 bit registers to load, followed by your value ("FFF23CA188" or whatever).

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4462833 by cosma
<P style="MARGIN: 0px">Setting the destination is a bit different than sending regular commands.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">You must first load a "mailbox" that contains 4 8-bit registers. Then you send a command to move the mailbox content into the destination register.
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Since you will most likely not use the entire counter range, you can get away with loading 2 (16-bit) or 3 (24-bit) values. That would take 8 or 10 characters most of the time.

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4462866 by ron

I don't think that will work because I don't know what's in the other registers.

Please Log in or Create an account to join the conversation.

18 years 4 months ago #4462875 by ron

P.S. I will be using the entire range most of the time

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.069 seconds