Using My Blocks in VEXcode V5

My Blocks is one of the block categories within VEXcode V5. Some other categories include Looks, Sound, Sensing, and Variables. My Blocks are used to create a sequence of blocks that can be used multiple times throughout a project.


How to Make a Block

Screenshot of the My Block selection interface in VEX V5 software, illustrating options for creating custom blocks in the Blocks Tutorials section.

Select ‘Make a Block’ from the My Blocks category.

Screenshot showing how to rename a block in VEX V5 programming interface, featuring the block selection menu and the rename option highlighted.

Rename the block by entering in the ‘Block Name’ field, then select ‘OK.’


How to Customize a Block

Add an input (number)

Screenshot of the VEX V5 Blocks programming interface showing the 'Add Input' option in a block tutorial, illustrating how to add inputs to a block in the programming environment.

Select the, ‘Add an input (number)’ option from the ‘Make a Block’ screen. Rename the input by entering in the ‘number’ field, then select ‘OK.’

Add a input (Boolean)

Screenshot of the VEX V5 Blocks programming interface showing the 'Add Boolean' block option, illustrating how to incorporate boolean logic in programming tutorials.

Select the, ‘boolean’ option from the ‘Make a Block’ screen. Rename the input by entering in the ‘boolean’ field, then select ‘OK.’

Add a label

Screenshot of the VEX V5 Blocks programming interface showing how to add a label to a block, with highlighted options and a clear layout for user guidance in the tutorial section.

Select the, ‘Add a label’ option from the ‘Make a Block’ screen. Rename the label by entering in the ‘Label Text’ field, then select ‘OK.’

Combine inputs and labels

Screenshot of the VEX V5 Blocks programming interface showing the 'Combine Inputs' block tutorial, illustrating how to merge multiple input signals into a single output for programming robots.

Combine inputs and labels together in order to create a sequence of blocks, then select ‘OK.’


How to Delete Inputs / Labels

Screenshot showing the steps to delete a block in VEX V5 programming, featuring a user interface with highlighted options and buttons for deletion.

To delete an input or label, select the ‘Clear’ icon on top of the input or label that you wish to remove.


How to Use the Define Block

Screenshot of the Define Block feature in V5, illustrating how to create and customize blocks in the tutorial section. The image shows a user interface with options and settings for block configuration.

A parameter can now be used from the {Define} block once it is created.

Screenshot of the Define Block feature in V5, illustrating how to create and customize blocks in the tutorial section. The image shows a user interface with options and settings for block configuration.

Attach additional blocks to the {Define} block.

Screenshot of the Define Block feature in V5, illustrating how to create and customize blocks in the tutorial section. The image shows a user interface with options and settings for block configuration.

Use parameters from the {Define} block.

Screenshot of the Define Block feature in V5, illustrating how to create and customize blocks in the tutorial section. The image shows a user interface with options and settings for block configuration.

Use the [My Block] attached to the {When Started} block.


How to Use My Blocks

Driving in Squares Example

In this example, the robot will use My Blocks to:

  • Drive forward in a 200 mm square.
  • Turn right 45 degrees.
  • Drive forward in a 300 mm square.

The {Define} hat block breaks down a procedure. In the following example, this {Define} hat block breaks down the blocks used to drive in a square a certain number of times. Drag arguments from the {Define} block to be used within the blocks.

Once the {Define} block is set, the newly created block can now be dragged and added to the {When Started} block to set parameters.

Illustration of V5 blocks in a tutorial, showcasing various programming elements and their connections, designed to help users understand block-based coding concepts.

Once the parameters are changed, the project is ready to be Download and Run.

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

Last Updated: