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 / 616
615  |  617
Subject: 
Re: NQC and rcx2
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Thu, 25 May 2000 01:35:44 GMT
Viewed: 
1663 times
  
In article <Fuz3tv.Lrq@lugnet.com>, "James Pritchard"
<dungeon@madasafish.com> wrote:

All the things I've tried work fine. The only thing I find confusing is
the
events and control of global objects.
Could you try to explain how to set-up and use these features?


Documentation is always the last thing to get done....

Until I get it completed, your best bet is to read the lego
documentation - especially the opcodes monel,monex,monal, and monax.

The monitor/catch works like this:

monitor(events)
{
// body
}
catch
{
// handler
}

  monel events, handler
  body code
  monex
  goto done
handler:
  handler code
done:

Essentially, the monitor command begins even monitoring (within the
body) and if an event occurs, the handler is invoked.  the acquire/catch
construct is similar but uses monal/monax instead of the event stuff.

I haven't played much with resource acquisition.  Event handling is
pretty cool though.  You'll first need to setup the events.  Use
SetEvent() to setup a specific event source.  You can also use Set() to
tweak things like the hi/low thresholds....for example:

Set(LowerLimit(0), 10); // set lower threshold for event 0 to 10

I'll try to post an example or two after the next release (mostly
because the SetEvent() call is going to change a bit to make things a
bit easier).

Dave Baum

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Re: NQC and rcx2
 
All the things I've tried work fine. The only thing I find confusing is the events and control of global objects. Could you try to explain how to set-up and use these features? James Dave Baum <dbaum@spambgoneenteract.com> wrote in message (...) (24 years ago, 22-May-00, to lugnet.robotics.rcx.nqc)

6 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