To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3924
3923  |  3925
Subject: 
time control : BrickOS versus the RCX standard OS ?
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Sat, 17 Sep 2005 08:11:39 GMT
Viewed: 
7249 times
  
Hi list,

I'm trying to implement a position regulation (using a motor and a rotation
sensor), using for instance a PID (Proportional-Integral-Derivative) regulation.
I tried to code it in NQC, using the standard OS, but it seems that the RCX
standard OS loops at very low and unreliable frequency (few Hertz). Please see
NQC example at the end of this post.

I heard that BrickOS might allow a more reliable time control, I'd like to be
sure of this before I switch to BrickOS.

- What is the time resolution allowed by BrickOS ?

- is it reliable (will my loop really sample a sensor at the frequency that I
code) ?

- I heard that BrickOS is difficult to install (I'm under Win XP) : can you
advice me the best installer... and an howto ?

Thanks a lot !


As example below is a NQC code for a PWM (Pule Width Modulation), in which a
rotation sensor allows 10 pulse rates to the motor, looping at 0.1 seconds :

task main()
{
SetSensor(SENSOR_2,SENSOR_ROTATION);
SetPower(OUT_A,1);
while(true)
{
int actif=SENSOR_2;
int passif=10-actif; // in the standard OS the time unit is 0.01 s
OnFwd(OUT_A);
Wait(actif);
Off(OUT_A);
Wait(passif);
SetUserDisplay(actif,0);
}
}

The problem is that it doesn't loop at 0.1 seconds as I need, but much slower
(~0.5 second)... while I'd like to control time at few ms accuracy.



1 Message 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