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 / 21936
21935  |  21937
Subject: 
nop in NQC?
Newsgroups: 
lugnet.robotics
Date: 
Mon, 5 Jan 2004 18:36:27 GMT
Viewed: 
737 times
  
   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);
Off(OUT_A+OUT_C);

I'm trying to run the motors at an effective slow speed, while still at a
reasonable power level. This works, but I'm wondering if I can goose the speed
up slightly with an effective nop or other single-bytecode command inbetween the
On & Off commands.
   Line following: why contemplate your own navel when the 1.0 RCX's have one?

--
Brian Davis



Message has 6 Replies:
  Re: nop in NQC?
 
(...) Try this: int i; i = i; Kevin (21 years ago, 5-Jan-04, to lugnet.robotics)
  Re: nop in NQC?
 
(...) you may try something like this: On(OUT_A+OUT_C); On(OUT_A+OUT_C); Off(OUT_A+OUT_C); or if you're looking for speed control, you could try: if (speed>5) On(OUT_A+OUT_C); else Off(OUT_A+OUT_C); if (speed>4) On(OUT_A+OUT_C); else (...) (21 years ago, 5-Jan-04, to lugnet.robotics)
  Re: nop in NQC?
 
(...) I think all of the single bytecode commands have side effects, which may or may not matter to you. You might want to use UnmuteSound(). Another option would be to create a command that does nothing. For example, a jump to the following (...) (21 years ago, 6-Jan-04, to lugnet.robotics)
  Re: nop in NQC?
 
"Brian Davis" <brdavis@iusb.edu> wrote in message news:Hr150r.vu2@lugnet.com... (...) bytecode? I'm (...) timer (...) sequences like: (...) at a (...) the speed (...) inbetween the (...) have one? (...) Opcode 0x10 is effectively a nop when (...) (21 years ago, 6-Jan-04, to lugnet.robotics)
  Re: nop in NQC?
 
(...) 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 (...) (21 years ago, 6-Jan-04, to lugnet.robotics)
  Re: nop in NQC?
 
(...) Here's a program that tries to analyze the various NOP options: #pragma reserve 0 __nolist void NOP1() { Wait(0); } __nolist void NOP2() { Wait(-1); } __nolist void NOP3() { asm { 0x27, 1 }; } __nolist void NOP4() { asm { 0x10 }; } __nolist (...) (21 years ago, 6-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