NXT: wires and sensors

Lego Mindstorms Discussions - Lego Mindstorms Disucssions 

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
NXT: wires and sensors Adam Aulick 10-04-2006
If you were  Registered and logged in, you could reply and use other advanced thread options
Posted by Adam Aulick on October 4, 2006, 4:25 pm
In the NXT graphical programming environment, a source block (such as a
motor rotation sensor) and a sink block (such as a variable write)
connected by a wire can be in very different places in the program.

Which value will be used when the sink block using the information is
executed -- the value of the source block at the time that block was
executed, or the value of the source block at the time the sink block
asks for it?

Since the software won't let me run a wire backwards in time from a
source block to an earlier sink on the same thread of execution, I
suspect that we read the sensor only once when the sensor block is
executed, rather than repeatedly each time a block asks for input from
the wire.

But if that's the case, what happens when a wire connects a sink block
on one thread, with a source block on a different thread, and the sink
is executed before the source?


The site map in XML format XML site map
other useful resources:
Official Robosapien Website
Lego Mindstorms Website

Contact Us | Privacy Policy