To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 2968
2967  |  2969
Subject: 
Faster Firmware/Motor Control
Newsgroups: 
lugnet.robotics.rcx
Date: 
Tue, 17 Jul 2012 16:59:23 GMT
Viewed: 
25114 times
  
Hi all,

One of the common ways I like to control the speed of a gearmotor (in NQC) is by
introducing a loop, for example, like this:

while(true)
{
  OnFwd(motor);
  Wait(a);
  Off(motor);
  Wait(b);
}

I often do this as a motor approaches a setpoint (say an offset from a target
position as measured by a rotation sensor) or the like.  Variable a and b could
be defined somewhere else but usually are around 1/100 or 2/100 of a second.
Any more than that and the motion gets jittery.  I sometimes swap out Off for
Float, depending on the application (unloaded the motors tend to glide right
through the Float, however).

I seem to remember hearing someone (Dick Swan?) built some Firmware a while back
that ran much faster and allowed for 1/1000 second (millisecond) intervals for
the Wait command, instead of 1/100 (decisecond).  Any truth to that?

Obviously if I could cut down the time delay, the sawtooth of "On" to "Off" gets
a lot crisper and the whole thing would work a lot better.

Thanks in advance,

-Iain



Message has 1 Reply:
  Re: Faster Firmware/Motor Control
 
(...) I have it and use it exclusively. i'll mail you a copy when i get your e-mail sddess Take care, Dave K (...) (12 years ago, 17-Jul-12, to lugnet.robotics.rcx)

6 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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