Configuring a 4-Motor Drivetrain in VEXcode Pro V5

The VEX Visual Studio Code Extension has replaced VEXcode Pro V5, which is now end-of-life.

VEXcode Blocks and VEXcode Text remain actively developed and supported for all VEX platforms.

When starting to program with VEXcode Pro V5, Drive and Turn commands will not appear in the Command Reference until a Drivetrain has been configured.

You can only configure one Drivetrain per project.

If you are configuring a Drivetrain without a Gyro Sensor, click here. 

In this article, the default values in the Drivetrain Settings are for the VEX V5 Clawbot.


Adding a Drivetrain

VEXcode Pro V5 interface with Robot Configuration button highlighted on the Toolbar.

To configure a Drivetrain, select the Robot Configuration button to open the Robot Configuration window. A project must be open in order to use the Robot Configuration window.

VEXcode Pro V5 Robot Configuration menu is open and the ‘Add a device’ option is shown.

Select “Add a device.”

Device selection window with ‘Drivetrain 4-Motor’ option highlighted.

Select “Drivetrain 4-Motor.”

Side by side screenshots of the left and right motor ports being assigned on the V5 Brain. Next, the 3-Wire Gyro option is selected and the gyro port options are shown.

Select which ports the Left Motors, Right Motors, and the Gyro Sensor are attached to on the VEX V5 Brain. Ports that are already configured for other devices will be unavailable.

Note: The Gyro Sensor is connected to a 3-Wire port not a Smart Port.

Drivetrain settings window with Done button highlighted to confirm configuration.

Once the Drivetrain has been configured, select “Done” to submit the device to the configuration or “Cancel” to return back to the Robot Configuration window.

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


Changing a Drivetrain’s Port Numbers

Drivetrain settings window with port selection icons highlighted.

You can change the port number for the Left Motors or Right Motors in the Drivetrain by selecting the device’s plug icon in the top right corner of the Drivetrain Settings window.

Side by side screenshots to demonstrate the Ports being changed for the left and right motors and the gyro.

Select a different port on the Port Selection window and the port number will turn blue. Then select "Done" to submit the change.


Changing a Drivetrain’s Wheel Size

Drivetrain settings showing wheel size dropdown menu with multiple size options.

You can change the wheel size for the Drivetrain by selecting the drop down menu under “Wheel Size.”


Changing a Drivetrain’s Gear Ratio

Drivetrain settings showing input and output fields used to adjust gear ratio.

You can change the gear ratio for the Drivetrain by entering values in the “Input” and “Output” boxes.


Reversing a Drivetrain

Drivetrain settings with directional arrows indicating option to reverse drivetrain direction.

The Drivetrain Settings window also allows the direction of the Drivetrain to be reversed.


Deleting a Drivetrain

Drivetrain settings window with Delete button highlighted below.

A Drivetrain can also be deleted by selecting the “Delete” option at the bottom of the window.


Changing a Gear Cartridge

Drivetrain settings showing gear cartridge options for selecting motor speed configurations.

The Drivetrain Settings window also allows the gear cartridge to be changed.

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

Last Updated: