To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 21949
21948  |  21950
Subject: 
Re: nop in NQC?
Newsgroups: 
lugnet.robotics
Date: 
Tue, 6 Jan 2004 21:13:42 GMT
Viewed: 
898 times
  
In lugnet.robotics, Brian Davis wrote:
   Is there a NQC command that will translate to a simple nop bytecode?

According to the LASM bytecode reference, the Wait command waits for the "given
number of 10ms".  And, "If the given number is negative, the command is
ignored."

I don't know if that is quite the same as a NOP but it's worth a try.

(several minutes go by)

task main()
{
  CreateDatalog(20);
  repeat (4)
  {
    AddToDatalog(FastTimer(0));
    Wait(1);
    AddToDatalog(FastTimer(0));
    Wait(0);
    AddToDatalog(FastTimer(0));
    Wait(-1);
    AddToDatalog(FastTimer(0));
    Wait(10);
    AddToDatalog(FastTimer(0));
  }
}


Variable 0: 17887
Variable 0: 17889
Variable 0: 17890
Variable 0: 17890
Variable 0: 17901

Variable 0: 17902
Variable 0: 17903
Variable 0: 17904
Variable 0: 17904
Variable 0: 17915

Variable 0: 17916
Variable 0: 17917
Variable 0: 17917
Variable 0: 17918
Variable 0: 17929

Variable 0: 17930
Variable 0: 17931
Variable 0: 17932
Variable 0: 17932
Variable 0: 17943

This seems to indicate that Wait(0) and Wait(-1) are very similar in effect.

John Hansen



Message is in Reply To:
  nop in NQC?
 
Is there a NQC command that will translate to a simple nop bytecode? I'm looking for a way to do fine-precision timing, and frankly checking a timer takes too long. For very fine motor control, I'm trying to use sequences like: On(OUT_A+OUT_C); (...) (21 years ago, 5-Jan-04, to lugnet.robotics)

8 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