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 / 1522
1521  |  1523
Subject: 
Re: How to user MONITOR command for watching TIMER in Spybotics
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sat, 12 Jul 2003 16:48:35 GMT
Viewed: 
5359 times
  
This program below shows how a timer event can be used.

Dave Baum

----

#define MY_EVENT 0

task main()
{
   ClearTimer(0);
   SetEvent(MY_EVENT, Timer(0), EVENT_TYPE_HIGH);
   SetUpperLimit(MY_EVENT, 1000);

   monitor(EVENT_MASK(MY_EVENT)) {
      while(true) {
         Wait(100);
         PlaySound(SOUND_CLICK);
      }
   }

   PlaySound(SOUND_UP);
}



In article <HHswKM.pE4@lugnet.com>,
"Liem Peng Hong" <liemph@nais.ne.jp> wrote:

Dear Members,

I managed to use NQC MONITOR command to watch TIMERs in my SCOUT using the
predefined SCOUT events (EVENT_TIMER_0). However, I failed with my Spybotics
and
RCX 2.0.

My question is how can I use the MONITOR command to watch TIMERs (or maybe
COUNTERs) in my Spybotics and RCX. Concretely I'd like to do the following
thing:

1. Clear TIMER(0).
2. Set TIMER(0) limit to 1000
2. SetEvent 0 to TIMER(0) over limit
3. Monitor MASK_EVENT(0) whether TIMER(0) over limit the preset value (1000).

Thank you in advance.

Liem PH.



Message has 1 Reply:
  Re: How to user MONITOR command for watching TIMER in Spybotics
 
Dear Dave, Thank you for your reply. In fact, for several nights I was using very similar snippet you provided to watch the timer before posting my problem, however, I was careless to spell the Timer(0) with TIMER(0) and the compiler always (...) (21 years ago, 13-Jul-03, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  How to user MONITOR command for watching TIMER in Spybotics
 
Dear Members, I managed to use NQC MONITOR command to watch TIMERs in my SCOUT using the predefined SCOUT events (EVENT_TIMER_0). However, I failed with my Spybotics and RCX 2.0. My question is how can I use the MONITOR command to watch TIMERs (or (...) (21 years ago, 10-Jul-03, to lugnet.robotics.rcx.nqc)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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