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
  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)
 
  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)
 
  Re: nop in NQC?
 
(...) <snipped> (...) Or you can just forget all that. I ran the same test with the order changed and the 3rd NOP of the 5 I tried was always the fastest (regardless of which one I used). Modifying the program to try each of 5 different options in (...) (21 years ago, 7-Jan-04, to lugnet.robotics)

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