|
Hi Daniel,
Daniel Carvalho <danielpc@isutc.transcom.co.mz> writes:
>
> I want to use rcx to control a lego train, but the fact that
> lejos only have 7 levels makes it dificult to set the speed.
>
> Jürgen Stube wrote in september2001:
>
> "Yes, the standard LEGO routines make it very hard to control
> speed. Basically with an 8ms cycle they set the motor output
> part of the time (depending on power level) to full voltage,
> and the rest they let it float."
>
> i've made a java program to imitate this, using a 20 ms
> cycle, but the result is not satisfying. It's not so smooth
> as when the train is controlled with the Electric Train
> Speed Regulator (#4548).
sorry to reply so late, I wanted to try it myself but didn't
get around to do it yet (I'm starting an IT-Business as a
consultant/systems programmer, see http://www.jstuber.net/).
I managed to run a train from an RCX with the standard power levels
using the view example, and that was quite nice with the metroliner
train, I could regulate from standstill to full speed.
If you just have a motor without load it will probably not so nice
and runs always at almost full speed.
> Or is it a problem with my code (see at end of message)?
What you are doing is to switch the power level quickly,
so effectively you get less power and with bigger gaps
in between.
To really slow down a motor without load you should alternate
between on and stop, and to make it smooth I'd try to stay below
10ms for a full cycle (the cycle time of the ROM code is 8ms).
Hope this helps
Jürgen
--
Jürgen Stuber <juergen@jstuber.net>
http://www.jstuber.net/
gnupg key fingerprint = 2767 CA3C 5680 58BA 9A91 23D9 BED6 9A7A AF9E 68B4
Please always send email only as plain text, not as HTML.
Bitte schicken sie Email nur als reinen Text, nicht als HTML.
|
|
Message has 1 Reply: | | Re: train control
|
| (...) hi Juergen I tried it with load, and it works much better! Only that the speed is not very stable in the curves. (...) If i use a cycle of 10ms, then i could only use 10 different speeds, because the Thread.sleep has a resolution of 1ms... (...) (20 years ago, 8-Jul-04, to lugnet.robotics.rcx.java)
|
Message is in Reply To:
| | train control
|
| hi I want to use rcx to control a lego train, but the fact that lejos only have 7 levels makes it dificult to set the speed. Jürgen Stube wrote in september2001: "Yes, the standard LEGO routines make it very hard to control speed. Basically with an (...) (20 years ago, 28-Jun-04, to lugnet.robotics.rcx.java)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|