Understanding Waiting and Non-waiting Blocks in VEXcode IQ

Non-waiting blocks

Non-waiting blocks have the stack continue even if the block’s behavior is not yet complete.

The “drive” block is a good example of a non-waiting block. In the example below, the robot doesn’t move because the “drive” block begins but then the “stop driving” block stops it before the motors can move.

Screenshot of a VEX IQ Blocks tutorial interface, showcasing programming blocks and options for building and controlling VEX IQ robots, designed for educational use and beginner robotics enthusiasts.

Non-waiting blocks are useful when you want to perform multiple behaviors at the same time.

Waiting blocks

Waiting blocks pause the rest of the stack until that block’s behavior has been completed.

Most waiting blocks are found among the Motion and Drivetrain blocks.

If a VEX IQ Clawbot needs to retrieve a cube, you can use waiting blocks to have the robot carry out each behavior individually.

Screenshot of a VEX IQ Blocks tutorial interface, showcasing programming blocks for building and controlling robots, designed for educational purposes and beginner robotics enthusiasts.

Screenshot of a VEX IQ Blocks tutorial interface, showcasing programming blocks and examples for building and coding VEX IQ robots, aimed at educators and students in the robotics learning community.

Blocks that Can Wait or Not Wait

VEXcode IQ lets users change the following waiting blocks to non-waiting blocks with one click: “spin for,” “spin to position,” “drive for,” “turn for,” and “turn to heading”.

By changing the block for opening the claw to non-waiting and changing the block for raising the arm to non-waiting, the Clawbot drives forward while the claw opens and drives in reverse while the arm raises.

Screenshot of a VEX IQ Blocks programming tutorial, showcasing code blocks and their arrangement for building and controlling a robot, aimed at educational purposes for beginners in robotics.

 

This approach to retrieving a cube is better in competition settings because it saves time.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: