PDA

View Full Version : Little Step U, changing speed during run?



J.We
08-12-2005, 10:00 PM
Is there anyone who know how to change speed during run, when controlling a step motor with Little Step U?
For example: can I change speed when using command {H}, {J} or {G} during movement? Otherwise I have to stop the motor before changing speed!

What can I do to get around my problem, is there anyone out there who has had the same problem?

Regards // Johan

Chris Savage
08-12-2005, 10:33 PM
Johan,

ˇˇ Aren't you still trying to make the speed change coincide with an input in the IP1 and IP2 pins?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

J.We
08-12-2005, 11:09 PM
Chris,
The inputs IP1 and IP2 only stops the motor(depending on what command you drive the LSU in, {H}ˇlisten toˇIP2, {J} on IP1, {F} on both and so on..). They works like a type of emergency stop. I would be nice toˇchange speed with the IP pins but my question is ifˇthe LSU is build to be able to change speed during run at all. Is it possible to changeˇonly by upgrading the {A} command?


I have tried to contact the manufacturer, but they have not responded. This was only an attempt to reach out to other LSU users...
Maybe my wishes and expressions is confusing, but I hope this will clear things up..

Chris Savage
08-12-2005, 11:22 PM
Johan,

ˇˇ By all means this is definately the place to get feedback from those people who know the product and/or have used it.ˇ I just wanted to confirm your original question, since it slightly changed.ˇ I hadn't realized you found that information out already.ˇ Perhaps someone on here is a Little Step-U guru?ˇ =)

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

dandreae
08-12-2005, 11:36 PM
Here isˇa code that uses a different command, but it may give you idea on how to accoplish your code.



Dave

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae

Tech Support
dandreae@parallax.com (mailto:dandreae@parallax.com)
http://www.parallax.com

kelvin james
08-13-2005, 02:12 PM
I can probably help you out, but i am a little confused on what you are trying to accomplish here. Are you saying you want to increase /decrease the speed as the motor is moving from one position to another? Or do you want to change the speed once a position has been reached? The second option is easy, the first is a problem, but can be done with some creative code. On another note, I use the remote operation, using ip1 and 2, that turns the stepu into a pulsed driver for operations that can't be done by serial commands. Anyway, try and give some more details on the operation.

kelvin

J.We
08-16-2005, 09:04 PM
Ok, I will try to explain my application in more details.
Your first option is more like it.
On one side I have my step motor controlled and driven by BSxs and LSU. On the other side I have “a sensor” that checks a signal. In the middle I have another controller that is doing stuff with the signal; this controller uses RS232 to communicate with BSsx. I want to move and control the motor in real time, lets take one example: The motor I running, if the signal is strong I want to speed up my motor, if the signal is week I want to increase the speed, ore if the signal is really bad I want to change direction. I want to ramp it up while running.
I can probably do this by step a small number of steps at the time with different speeds…
But that would not be beautiful.
ˇ
Do you recognise my problem? Can you please give me an example on some creative coding, which makes this easier?

I will look into the remote state in more details, but i dont think it would do the trick.. we will see..

regards//Johan

kelvin james
08-19-2005, 12:43 AM
Now that i see what you are trying to do, i have some not so good news. Changing motor speed in real time is something a stamp won't do well, single tasking and slow response is the problem with your setup. You can update the speed serially to the stepu from your pc, but the command is slow and will delay the movement a bit. You can use the remote ( direct control from the stamp ), bypassing the serial commands, but still the stamp has to monitor serial input via communication from the controller, to update a speed variable in the loop. And that will also cause a delay in the motor function. I have included a simple program that ramps the motor up to a constant speed using the remote mode, just to give you the basic idea. There are some values you can play around with for control, and some can be changed to variables to update from your controller. The timings here are for a 1.8 degree motor. You will have to change the directives, baud and pins to match your stamp.

kelvin