Configuring a Motor Group in VEXcode IQ (1st gen)

When starting to program with VEXcode IQ, motor group blocks will not appear in the Toolbox until a motor group has been configured. A motor group will allow you to link two motors together in a VEXcode IQ project.

There are a number of reasons for creating a motor group, for more information on building with VEX IQ motor groups, see this article.


Adding a Motor Group

VEXcode IQ Toolbar with the Devices icon highlighted in between the Code Viewer and the Help icons.

To configure a motor group, select the Devices button to open the Devices window.

VEXcode IQ Devices menu with the IQ Robot Brain generation setting shown. This setting is highlighted and it is set to the 1st gen option.

Select the generation that you are working with.

VEXcode IQ Devices menu with the Add a device button highlighted.

Select “Add a device.”

VEXcode IQ Devices menu after the Add a device button has been selected. The Motor Group option is highlighted.

Select “Motor Group.”

Two screenshots side by side that show the process of selecting Ports for the Motor A and the Motor B.

Select which ports the motors in the motor group are attached to on the IQ Brain. Ports that are already configured for other devices will be unavailable.

VEXcode IQ Devices menu after selecting the Motor Group Ports and with the Motor Group Settings screen shown. Below, the Done button is highlighted.

Once the motor group has been configured, select “Done” to submit the device to the configuration.

Note: Selecting “Cancel” will undo any changes you have made to the device and will not be a part of the configuration.

To configure the motor group further, see the additional options below.


Changing a Motor Group’s Port Number(s)

VEXcode IQ Devices menu with the previously added Motor Group highlighted.

You can change the port number of a motor by first selecting the motor group in the Devices window.

VEXcode IQ Devices window with the Motor Group Settings menu shown. Above, the icons of the Motor Ports are highlighted.

Then, select the plug icon of the port you want to change in the top right corner of the Options screen.

VEXcode IQ Devices Port Selection menu being used to change already set Port numbers. Previously selected Ports will show green, and after selecting the new ones the user can press Done to save the changes.

Select its port on the Port Selection screen, and the port number will turn green. Then select “Done” to submit the change.


Naming Motor Group Directions

Screenshots show the Motor Group Settings being used to rename the Motor Group directions. Next, the Spin block's direction dropdown menu is shown and the new Motor Group direction names are available in the menu.

The motor group Options screen allows you to rename the directions the motor spins from their default of “forward” and “reverse.” For example, if configuring an arm motor group, you can rename the directions to “Up” and “Down.” Then select “Done” to submit the device changes to the configuration.


Renaming a Motor Group

VEXcode IQ Devices window with the Motor Group Settings menu shown. Above, the Motor Group's name is highlighted to indicate that it can be renamed. In this example it has been renamed to ArmMotorGroup.

You can also rename the motor group by changing the name in the text box at the top of the Options screen. If you select an invalid name, the text box will highlight red to indicate. Then select “Done” to submit the device changes to the configuration.

Note: for more information about naming rules for variables and devices, view this article from the VEX Library.

VEXcode IQ Spin block is shown with the Motor Group dropdown menu open. The Motor Group's new name is shown in the menu. In this example the name ArmMotorGroup is shown.

If you change the name of a motor that is already being used in your project, you will need to update the motor name in the block to the new name using the drop-down.


Reversing a Motor(s) in a Motor Group

VEXcode IQ Devices window with the Motor Group Settings menu shown. Below, the Reverse Motor option is selected and highlighted. These buttons can be used to reverse one Motor in the Motor Group, or both.

The Options screen also allows the direction of the motors to be reversed.

VEXcode IQ Devices window with the Motor Group Settings menu shown. Below, the Done button is highlighted.

Once a motor has been reversed, select “Done” to submit the changes to the configuration.

Note: if two motors in a motor group are facing one another, such as when two motors share a single shaft, one of the motors will need to be reversed or the two motors will be fighting against one another. For more information on building with VEX IQ motor groups, view this article from the VEX Library.


Deleting a Motor Group

VEXcode IQ Devices window with the Motor Group Settings menu shown. Below, the Delete button is highlighted.

A motor group can also be deleted by selecting the “Delete” option at the bottom of the screen.

Note: if you delete a motor group that is already being used in your project, the project will not work until the blocks using that motor group have also been deleted.


Using a Motor Group with a Controller

VEXcode IQ Devices menu with the Controller options shown. There is a diagram of all of the buttons on the controller, and each button can be connected to Motor Groups or Drivetrains by selecting them in the diagram. The L and R axis buttons on the controller are connected to two different Motor Groups.

If you have both a controller and a motor group configured, you can configure the buttons on the controller to control the entire motor group, instead of a single motor.

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

Last Updated: