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 / 839
838  |  840
Subject: 
Re: Monitor() and Event()
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Tue, 24 Oct 2000 03:32:38 GMT
Viewed: 
1987 times
  
In article <G2vD9A.MuM@lugnet.com>, "Camus Lai" <camuslai@hotmail.com>
wrote:

Can someone teach me more on Monitor() and Event()? Does the Monitor()
check
the event status repeatly or we have to make a repeat task to activate
the
monitoring job?

If it is not checking the event status repeatly, why we cannot just read
the
input value to capture the status?


Camus Lai

Monitoring is automatic (done by the firmware).  Monitoring stops when
control leaves the monitor statement, so something like this:

while(true)
{
  monitor(EVENTS)
  {
  }
  catch
  {
  }
}

will miss a lot of events.

You need to configure the events using SetEvent()...after which you
shouldn't need to ever call Event().  I suspect the biggest use for
Event() is in debugging.  Another use is if you want to internally spoof
an event.  You could also use Event() if you have a task that is
normally running but needs to occasionally signal some wierd condition
to another task.  But in general, you should probably let the system
generate the events for you wherever possible (timers, counters,
sensors).

Dave

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Monitor() and Event()
 
Can someone teach me more on Monitor() and Event()? Does the Monitor() check the event status repeatly or we have to make a repeat task to activate the monitoring job? If it is not checking the event status repeatly, why we cannot just read the (...) (24 years ago, 23-Oct-00, to lugnet.robotics.rcx.nqc)

4 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