Looking for an advanced motor control tutorial
Re: Looking for an advanced motor control tutorial
Well, aint there already such a precast function? I thought I once had read about that anywhere around here...?
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Looking for an advanced motor control tutorial
I don't remember hearing about it, and I don't see anything like that in the templates list.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: Looking for an advanced motor control tutorial
I'm not sure, was it this task...?
https://sourceforge.net/apps/phpbb/mind ... mp+up#p333
https://sourceforge.net/apps/phpbb/mind ... mp+up#p333
Re: Looking for an advanced motor control tutorial
Sorry for the delay, I only visit Mindboards from time to time...
Yes, if you enable the absolute position contro, this includes automatic Ramp Up/Down. All you need is to choose a maximum speed and acceleration using PosRegSetMax.
There is a tutorial here: Absolute position regulation
Yes, if you enable the absolute position contro, this includes automatic Ramp Up/Down. All you need is to choose a maximum speed and acceleration using PosRegSetMax.
There is a tutorial here: Absolute position regulation
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Re: Looking for an advanced motor control tutorial
Just what I was looking for. Thanks.schodet wrote:
There is a tutorial here: Absolute position regulation
Re: Looking for an advanced motor control tutorial
fine, thank you!
Now is there also a ramp up/dn for driving without encoder limit (ramp up or down to speed limit and then drive ahead forever until stopped by extra command)?
Now is there also a ramp up/dn for driving without encoder limit (ramp up or down to speed limit and then drive ahead forever until stopped by extra command)?
Re: Looking for an advanced motor control tutorial
Hum... yes, use a really large angledoc-helmut wrote:fine, thank you!
Now is there also a ramp up/dn for driving without encoder limit (ramp up or down to speed limit and then drive ahead forever until stopped by extra command)?
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Re: Looking for an advanced motor control tutorial
yes, sure, ok!
:)
:)
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Looking for an advanced motor control tutorial
Helmut, is this what you want?
You can update the "Speed" as often as you want. To make the motor go in reverse, just multiply the Speed by -1. The "RampWait" is to adjust the ramping slope.
Edit: The Wait also allows another task to run (it yields to another task).
Code: Select all
task MotorRamp(){
while(true){
if(CS<Speed){
CS++;
OnFwd(OUT_A, CS);
}
if(CS>Speed){
CS--;
OnFwd(OUT_A, CS);
}
Wait(RampWait);//Slow it down for the effect.
}
}
Edit: The Wait also allows another task to run (it yields to another task).
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: Looking for an advanced motor control tutorial
hi,
thanks matt, looks fine too! :D
speed is probably power percentage (pwr),
and I propose that it should be taken abs(CS), abs(pwr) to fit for negative rotations, too (edit: not sure about that).
I'll have to look for a way to stop this task intermediately by another task but If I remember correctly I should have already a solution in my BT Motor Control task.
Now nearly all application uses are fine:
ramp up/dn without limits (matt)
ramp up/dn with absolute encoder targets (schodet)
now only 1 is left:
ramp up/dn when using RotateMotor/Ex/PID for relative encoder targets
thanks matt, looks fine too! :D
speed is probably power percentage (pwr),
and I propose that it should be taken abs(CS), abs(pwr) to fit for negative rotations, too (edit: not sure about that).
I'll have to look for a way to stop this task intermediately by another task but If I remember correctly I should have already a solution in my BT Motor Control task.
Now nearly all application uses are fine:
ramp up/dn without limits (matt)
ramp up/dn with absolute encoder targets (schodet)
now only 1 is left:
ramp up/dn when using RotateMotor/Ex/PID for relative encoder targets
Who is online
Users browsing this forum: Semrush [Bot] and 0 guests