To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 78
77  |  79
Subject: 
Re: problem with control speed using NQC
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 22 Jul 1999 02:25:30 GMT
Viewed: 
2382 times
  
But how does the original mindstorms software do it.  With the Mindstorms
software you can set the speed of each motor and it is obviously different.

I must be missing something.  I did a search on lugnet and found some NQC code
to drive the motors with 255 different speed settings, but havn't spent the
time to implement it yet.  Has anyone else tried this.  The program is pretty
long.

In lugnet.robotics.rcx.nqc, Dave Baum writes:
The RCX uses pulse-width modulation to control power to the motor.  The
pulses are between 1ms and 8ms of power during an 8ms interval.  In
theory, this would result in different power being provided to the motor.

The problem is that the motor has an internal flywheel, and even at 1/8
duty cycle (1ms per 8ms), the motor can keep the flywheel going at full
speed (without a heavy load).

You'll notice more of a difference in speed if the motor is under heavy
load, but even so the PWM scheme isn't great.

Dave

In article <FF7J8H.Anz@lugnet.com>, "Ben Fleskes" <benfleskes@msn.com> wrote:

Okay,  need some more help.

I have the following code running.  My expectation is that the speed of the
motor would increase but the integer value in the 'Fwd' command doesn't seem
to make any difference.  The motor always runs at full speed.


   Fwd(OUT_A+OUT_C,1);
   Sleep(50);
   Fwd(OUT_A+OUT_C,3);
   Sleep(50);
   Fwd(OUT_A+OUT_C,5);
   Sleep(50);
   Fwd(OUT_A+OUT_C,7);
   Sleep(50);


What am I missing?

Thanks for your help.

Ben

--
reply to: dbaum at enteract dot com



Message has 1 Reply:
  Re: problem with control speed using NQC
 
The Mindstorms RCX Code software does the exact same thing as the code you listed, the only caveat is I think RCX Code uses power settings from 1 to 8 while NQC uses 0 to 7. Both result in the same bytecodes for the RCX to interpret. // turn A on (...) (25 years ago, 23-Jul-99, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: problem with control speed using NQC
 
The RCX uses pulse-width modulation to control power to the motor. The pulses are between 1ms and 8ms of power during an 8ms interval. In theory, this would result in different power being provided to the motor. The problem is that the motor has an (...) (25 years ago, 22-Jul-99, to lugnet.robotics.rcx.nqc)

6 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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR