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 / 915
914  |  916
Subject: 
Possible bug in firm0328 or NQC 2.2
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 12 Jan 2001 08:49:41 GMT
Viewed: 
1840 times
  
Yesterday evening I was testing some NQC code for an RCX with the new
firm0328 installed. A very strange thing happened: motor B was running when
motor A was expected to do.
I double checked the connections, and the code, and couldn't really
understand why it happened.
I succeeded in isolating the piece of code, a single statement:

    OnFor(30,OUT_A+OUT_C);

When I replaced the instruction with the following:

    On(OUT_A+OUT_C);
    Wait(30);
    Off(OUT_A+OUT_C);

everything went well.

The program is very long and involves many different new features, including
events monitoring, resource acquisition, battery level control and many
others, so I don't know what might interfere with that particular piece of
code, if there is any interference. I still have to try and write a smaller
program that replicates the problem. But a possible candidate for an
interference is the SetGlobalDirection statement, that reverses OUT_A at the
very start of the main task:
    SetGlobalDirection(OUT_A, OUT_REV);

I want to stress that in other parts of the programs OUT_A works perfectly,
is just that particular OnFor statement that creates the problem.

Any idea?

Ciao
Mario



Message has 1 Reply:
  Re: Possible bug in firm0328 or NQC 2.2
 
(...) You've got the args to OnFor() backwards. It should be OnFor(OUT_A + OUT_C, 30); If your original source had the args in the correct order, email it to me and I'll check the assembly listings to see what code is actually being generated. (...) (24 years ago, 13-Jan-01, to lugnet.robotics.rcx.nqc)

3 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