Subject:
|
Re: Event monitoring
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Thu, 15 Mar 2001 02:21:40 GMT
|
Viewed:
|
2420 times
|
| |
| |
In article <GA7660.514@lugnet.com>, "Jeff Lalo" <jeff_lalo@hotmail.com>
wrote:
> Hi all,
>
> I have just switched to NQC 2.3 b1 (from 2.2) to implement the new
> features
> of the RCX 2.0. I have used event monitoring to clean up my if/else
> statements that control outputs. This works fine with all legal event
> sources, but I use allot of virtual sensors and would like to use them as
> event sources. The current problem:
>
> I have built a simple differential light sensor that calculates the
> difference in software. I want to use event monitoring with this virtual
> sensor. My current idea is to spoof the value to a counter or message
> buffer and then set the events with the spoof as the source. Does anyone
> know how to set the message buffer internally to a variable value using
> NQC
> and RCX 2.0 firm(without actually receiving a message from the tower)?
>
> Would greatly appreciate help :-)
You can generate a message internally with
InternalMessage(X);
but X must be a constant (can't be a variable). I'm not sure if this
will trigger the message event - I haven't tried it myself.
If it does trigger an event, you could use the message to trigger the
event but store the calculated value in a global variable somewhere.
That way you'd only need to send constant messages. You could also use
counters the same way (triggering it just to send a signal to the event
watching task, but read the actual data value from a global).
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message is in Reply To:
| | Event monitoring
|
| Hi all, I have just switched to NQC 2.3 b1 (from 2.2) to implement the new features of the RCX 2.0. I have used event monitoring to clean up my if/else statements that control outputs. This works fine with all legal event sources, but I use allot of (...) (24 years ago, 14-Mar-01, to lugnet.robotics.rcx.nqc)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|