LEGO Engineering

| | | | | | | |
What is a task split?


22nd of April, 2010

(0 )

A task split creates a line of code that is executed simultaneously with another line of code.  As a consequence, hardware conflicts can occur if both tasks are trying to control the same output device at the same time.

The following code compiles and executes, but there is a conflict because motor A cannot run both forward and backward at the same time.

task_general_pic_1.jpg

The following program also executes, but all it does is run motor A forward for 2 seconds.

task_general_pic_2.jpg

Note that jumps cannot cross task splits and cannot switch between task splits:

task_general_pic_3.jpg





AG
ses

   :
   :
* :
* :
 


Home | About Us | Contact Us

© 2013 Center for Engineering Educational Outreach, Tufts University
© 2013 The LEGO Group. All rights reserved.