Robot Specific Blocks#

All standard VEXcode VR Blocks are available for use in the VIQRC Virtual Skills - Rapid Relay Playground.

Motion#

This Playground’s Blocks will have access to the Intake Motor and Catapult Group parameters for all Motion blocks.

When selecting a direction for Motion blocks, intake will spin the Intake Motor forward and outtake spins the Intake Motor in reverse.

For the Catapult Group, lower will spin the Catapult Group forward and release spins the Catapult Group in reverse.

Spin#

The Spin block is used to spin a motor indefinitely.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

The image displays a code block labeled "spin," which instructs the "IntakeMotor" to spin in the "intake" direction. This block is designed to control a motor, directing it to rotate in a specified direction, likely as part of a larger robotic or mechanical system.

Select which motor to use.

The image shows a block labeled "spin," with an option selected for "IntakeMotor" and another option below labeled "CatapultGroup." The "IntakeMotor" is chosen, and this selection likely relates to configuring which motor or group of motors will perform the spinning action in the "intake" direction. The dropdown menu allows for selecting different motors or motor groups for this operation.

Select which direction for the motor to move in.

The Intake Motor can spin in the intake or outtake directions.

The image shows a block labeled "spin," with an option selected for "IntakeMotor" and another dropdown menu showing "intake" as the selected option, with "outtake" as an alternative. This setup is likely for configuring the motor to perform a spinning action in either the "intake" or "outtake" direction, depending on the user's selection. The dropdown allows the user to switch between these two directional options.

The Catapult Group can spin in the lower or release directions.

The image shows a block labeled "spin," with "CatapultGroup" selected as the motor or group of motors to control. The action selected is "lower," with an alternative option of "release" visible in the dropdown. This setup likely configures the CatapultGroup to perform a lowering action, and the dropdown allows the user to choose between lowering and releasing the catapult mechanism.

In this example, the Catapult will launch the preloaded Ball before lowering the Catapult to get ready for a new Ball.

The image shows a block-based coding interface with instructions for a catapult mechanism. The program starts with the command "when started," followed by two steps. The first step instructs the "CatapultGroup" to "release" the preloaded ball, effectively launching it. The second step then commands the "CatapultGroup" to "lower," which prepares the catapult to load a new ball for the next launch.

Spin for#

The Spin for block is used to spin a motor for a given distance.

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

The image displays a coding block from a visual interface that commands an "IntakeMotor" to "intake" for 90 degrees. The command is to "spin" the motor, specifying the number of degrees the motor should turn.

Select which motor to use.

The image shows a visual coding block where the command is to "spin" a motor, with options to select between "IntakeMotor" or "CatapultGroup." The selected motor is set to "IntakeMotor," which is then instructed to perform the "intake" action for 90 degrees.

Select which direction for the motor to move in.

The Intake Motor can spin in the intake or outtake directions.

The image depicts a coding block where a motor named "IntakeMotor" is set to "spin." The direction of the spin is selected from a dropdown menu, with "intake" being the current choice, though "outtake" is also available. The motor is programmed to spin in the chosen direction for a specified duration of 90 degrees.

The Catapult Group can spin in the lower or release directions.

The image shows a coding block that is used to control a "CatapultGroup" motor. The block is set to "spin" the motor, with a dropdown menu allowing the user to select the action, either "lower" or "release," with "lower" being selected. The motor is programmed to spin in the chosen direction for a duration of 90 degrees.

Set how far the motor will spin by entering a value, and choosing the unit of measurement (degrees or turns).

The image depicts a coding block configured to control an "IntakeMotor" in a coding environment. The block instructs the motor to "spin" in the "intake" direction for "90" units. A dropdown menu is highlighted, showing the user is selecting the unit of measurement, with "degrees" currently selected. The dropdown also includes an option for "turns."

By default, the Spin for block will block any subsequent blocks from executing until it’s finished. By expanding the Spin for block to show and don’t wait, blocks will continue to execute while the motor is moving.

The image displays a block from a visual coding interface where the "IntakeMotor" is set to "intake" for 90 degrees, with an instruction to "spin" the motor. The block specifies that the motor should perform this action without waiting for the operation to complete, indicated by the phrase "and don't wait."

In this example, the Catapult will launch the preloaded Ball before lowering the Catapult to get ready for a new Ball.

The image shows a coding block sequence in a visual coding environment. The sequence starts with the "when started" block, which triggers the program when the project begins. Below this, there are two "spin" blocks targeting the "CatapultGroup" component. The first spin block is set to "release," indicating that it will launch a preloaded ball. The second spin block is set to "lower" for "1350 degrees," which moves the catapult to a position to load a new ball. The program is designed to first launch the ball and then lower the catapult for reloading.

Spin to position#

The Spin to position block is used to spin a motor to a set position.

This is can be a non-waiting or waiting block depending on if the and don’t wait option is used.

The image shows a coding block that instructs the "IntakeMotor" to spin to a specific position, set at 90 degrees.

Select which motor to use.

The image shows a coding block where the "IntakeMotor" is selected from a dropdown menu. The block is configured to spin the motor to a specific position, set at 90 degrees. The dropdown menu allows the user to select different motor groups, such as "IntakeMotor" or "CatapultGroup," to control which motor is being adjusted.

Set how far the motor will spin by entering a value, and choosing the unit of measurement (degrees or turns).

The image shows a coding block configured to spin the "IntakeMotor" to a specific position of 90 units. A dropdown menu is open, allowing the user to select between "degrees" and "turns" as the unit of measurement for the motor's position. The current selection is "degrees."

By default, the Spin to position block will block any subsequent blocks from executing until it’s finished. By expanding the Spin to position block to show and don’t wait, blocks will continue to execute while the motor is moving.

The image shows a coding block configured to spin the "IntakeMotor" to a position of 90 degrees. The block includes an option "and don't wait," indicating that the program will continue to execute the next commands without waiting for the motor to reach the specified position.

In this example, the Catapult will launch the preloaded Ball before lowering the Catapult to get ready for a new Ball.

The image shows a block-based coding sequence. It starts with the "when started" block, which triggers the sequence. The sequence first launches a preloaded ball by spinning the "CatapultGroup" in the "release" direction. Next, it lowers the catapult to load a new ball by spinning the "CatapultGroup" in the "lower" direction for 1260 degrees.

Stop Motor#

The Stop Motor block is used to stop the motor from moving.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

The image displays a single block that represents a command to stop the "IntakeMotor" in a block-based coding environment.

Select which motor to use.

The image shows a block from a visual coding environment with the "stop" command, which stops a selected motor. The block currently has "IntakeMotor" selected, with an option to choose "CatapultGroup" from a dropdown menu.

In this example, the Intake Motor will spin for 1 second to pick up a Ball before stopping.

The image displays a set of blocks from a visual coding environment that execute a sequence when started. The first block initiates the spinning of the "IntakeMotor" in the "intake" direction to prepare for picking up a ball. The next block introduces a 1-second delay, after which the motor is stopped.

Set Motor position#

The Set Motor position block is used to set a motor’s encoder position(s) to the entered value.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

The image shows a visual coding block used to set the position of the "IntakeMotor" to 0 degrees. The block is in a light blue color, with dropdown menus allowing for the selection of the motor and the unit of measurement (degrees). The number "0" is set as the position value in the white oval input field.

Select which motor to use.

The image shows a visual coding block where the "IntakeMotor" is being set to a position of 0 degrees. The dropdown menu is open, displaying "IntakeMotor" as the selected motor, with "CatapultGroup" as an alternative option. The block is highlighted with a yellow outline, and the number "0" is set as the position value in the white oval input field.

Set the unit of measurement to use, degrees or turns.

The image displays a visual coding block where the "IntakeMotor" is being set to a position of 0 degrees. The dropdown menu for the unit of measurement is open, showing "degrees" as the selected option, with "turns" as an alternative option. The number "0" is set as the position value in the white oval input field.

In this example, the lowered Catapult Arm is set as the new 0 degrees position.

The image shows a sequence of visual coding blocks used to control the "CatapultGroup." The first block is a "when started" block, followed by instructions to release the preloaded ball using the "spin CatapultGroup release" command. Then, the code lowers the catapult arm to prepare for the next ball with the "spin CatapultGroup to position 1260 degrees" block. Finally, the code sets the lowered catapult arm's position as the new 0 degrees using the "set CatapultGroup position to 0 degrees" block.

Set Motor velocity#

The Set Motor velocity block is used to set the speed of a motor.

This is a non-waiting block and allows any subsequent blocks to execute without delay.

The image shows a visual coding block that sets the velocity of the "IntakeMotor" to 50%. The block uses a drop-down menu to select the motor, and a numerical input field to set the velocity percentage. The selected motor is "IntakeMotor," and the velocity is set to 50%, with the unit indicated as a percentage ("%").

Select which motor to use.

The image shows a visual coding block that sets the velocity of a motor. The selected motor is "IntakeMotor," with an option to choose "CatapultGroup" from a drop-down menu. The velocity is set to 50%, and the unit is indicated as a percentage ("%"). The block is highlighted, indicating that the user is currently interacting with the drop-down menu to select the motor.

The Set Motor velocity block will accept a range of -100% to 100%.

In this example, the Intake Motor’s velocity is set to 100% before the Intake Motor starts spinning to pick up Balls.

The image displays a coding block setup that begins with the "when started" block. Below it, there's a comment explaining the purpose of the code: "Start spinning the Intake Motor to prepare to pick up Balls." The first block under this sets the "IntakeMotor" velocity to 100%, followed by another block that spins the "IntakeMotor" in the "intake" direction.

Set Motor timeout#

The Set Motor timeout block is used to set a time limit for Motor movement blocks.

This prevents motion blocks that do not reach their intended position from preventing subsequent blocks from running.

This is a non-waiting command and allows any subsequent commands to execute without delay.

The image shows a block that sets the timeout for the "IntakeMotor" to 1 second.

Select which motor to use.

The image depicts a block used to set a timeout for the "IntakeMotor" to 1 second, with a dropdown menu showing "IntakeMotor" as the selected motor and "CatapultGroup" as another available option.

In this example, the Catapult Group’s timeout is set to 2 seconds before it starts lowering the Catapult Arm.

The image shows a block sequence designed to start when the program begins. The sequence sets the "CatapultGroup" motor's timeout to 2 seconds and then issues a command to lower the Catapult Arm to prepare for picking up a ball. The arm is set to spin for 10 turns in the "lower" direction. This sequence likely ensures that the catapult arm operates for a specific duration before timing out, helping to manage motor operation during the task.

Sensing#

Swish has access to the standard Timer, Drivetrain, and Distance Sensing Blocks.

Eye Sensing has been renamed to Optical Sensing to match the Rear Optical Sensor.

Swish has access to Motor Sensing Blocks:

Motor is done#

The Motor is done block is used to report if the selected Motor or Motor Group has completed its movement.

The image shows a single block with a conditional statement that checks if the "IntakeMotor" has completed its task.

Select which Motor or Motor Group to use.

The image shows a block that checks if the "IntakeMotor" is done with its operation. A dropdown menu is visible, allowing the user to select either "IntakeMotor" or "CatapultGroup" to check the completion status of the selected motor or group. The "IntakeMotor" is currently selected in the dropdown.

The Motor is done block reports True when the selected Motor or Motor Group has completed its movement.

The Motor is done block reports False when the selected Motor or Motor Group has not completed its movement.

The Motor is done block is used in blocks with hexagonal (six-sided) spaces.

Motor is spinning#

The Motor is spinning block is used to report if the selected Motor or Motor Group is moving.

The image displays a block that checks if the "IntakeMotor" is currently spinning. There is a dropdown menu available where the user can select the motor to check, with "IntakeMotor" currently selected.

Select which Motor or Motor Group to use.

The image shows a block that checks if the "IntakeMotor" is spinning. There is a dropdown menu open, displaying the option to select between "IntakeMotor" and "CatapultGroup," with "IntakeMotor" currently selected.

The Motor is spinning block reports True when the selected Motor or Motor Group is moving.

The Motor is spinning block reports False when the selected Motor or Motor Group is not moving.

The Motor is spinning block is used in blocks with hexagonal (six-sided) spaces.

Position of motor#

The Position of motor block is used to report the position of a Motor or the first motor in a Motor Group.

The image shows a block that represents a command for querying the position of the "IntakeMotor" in degrees. There are dropdown menus to select the motor and the unit of measurement, with "IntakeMotor" and "degrees" currently selected.

Select which Motor or Motor Group to use.

The image shows a block that represents a command for querying the position of the "IntakeMotor" in degrees. The dropdown menu for selecting the motor is expanded, showing "IntakeMotor" selected and "CatapultGroup" as another option. The "position in" and "degrees" fields are also visible.

Select when unit to use, degrees or turns.

The image displays a command block that queries the position of the "IntakeMotor" in either degrees or turns. The dropdown menu for selecting the unit of measurement is expanded, showing "degrees" as the selected option, with "turns" as another available choice.

The Position of motor block is used in blocks with circular spaces.

In this example, the Catapult Arm will lower until its motor position is greater than 1260 degrees.

The image shows a sequence of command blocks designed to control the "CatapultGroup" motor. The sequence starts when the project begins. It releases the preloaded ball by spinning the "CatapultGroup" in the release direction, then lowers the catapult arm to prepare for the next ball by spinning the motor in the lower direction. The program waits until the motor's position is less than 1260 degrees, after which it stops the "CatapultGroup" motor. The blocks are color-coded, with condition blocks highlighted in green and the stop command in blue.

Velocity of motor#

The Velocity of motor block is used to report the current velocity of a Motor or the first motor in a Motor Group.

The image shows a single block representing a command to get the velocity of the "IntakeMotor" in percent (%). The block is rounded and light blue, indicating that it is used for reporting or retrieving a value related to the "IntakeMotor" velocity in the specified unit.

Select which Motor or Motor Group to use.

The image shows a block that retrieves the velocity of the "IntakeMotor" in percent (%). The block is light blue and rounded, indicating its use for reporting a value. A dropdown menu is visible, showing "IntakeMotor" as the selected option, with "CatapultGroup" as an alternative option, allowing the user to choose which motor's velocity to retrieve.

The Velocity of motor block is used in blocks with circular spaces.