How to Read a Command Reference

Step 1: Open the VCS Command Reference

NOTE: The red boxes in the image above show the programming languages that you can select toward the bottom and the clickable hamburger menu icon in the upper left corner for displaying the commands.

NOTE: Toward the bottom right of the window, you can also see the VCS version number. Check to make sure that you are using the same version of VCS that the Command Reference is. 

Step 2: See the groupings of commands for Modkit

  • Click on Modkit at the bottom of the window to select it as the programming language.
  • Click on the hamburger at the upper-left side. 

NOTE: Modkit's commands are grouped into categories - based on the part of the robot they control.

NOTE: Categories might be added or modified in later versions of the Command Reference.

Step 3: See the groupings of commands for VEX C++

  • Click on VEX C++.
  • Click on the hamburger at the upper-left side. 

NOTE: VEX C++'s commands are grouped into the categories shown above but these categories might be changed in later versions.

Step 4: See the commands for C++ Pro

  • Click on C++ Pro.
  • Click on the hamburger at the upper-left side. 

NOTE: C++ Pro's commands look like they are grouped into only the two categories shown but they are actually nested in other categories within those categories. 

  • Click on the plus sign next to vex and vex::this_thread to expand the categories as shown above.

NOTE: Categories might be added or modified in later versions of the Command Reference.

Step 5: Review a Modkit command function

  • Click on Modkit, the Motor category of commands, and action to show those commands.
  • Choose the .spin block to display its reference. 
  • Notice that the command appears on the right side of the display, and underneath it says: 'Function', 'Returns: void'. 

NOTE: It says Function because that is the type of command it is. Most of the commands listed will be either functions or variables. It says Returns: void because the command makes the motor spin and does not return a variable value. Some functions and variables might return integers or other values.

  • Notice the Overloads and Parameters table. 

NOTE: It shows you the Modkit block command, the parameter(s) it takes and explains what the command does. In this case, the parameter is the direction that the motor is set to spin (forward or backward). This command turns the motor on and spins it in the specified direction. The option of spinning forward or backward is an overload because it changes the function's signature. 

  • Notice that the name of this parameter is 'dir' which is short for 'direction'.
  • Notice the Code Snippet section. A code snippet is an example of the code being used as part of a program. 

NOTE: The snippet above shows the velocity being set for each of the two motors, both motors then being set to spin for 3 seconds, and then both motors being stopped.

Step 6: Review a VEX C++ command reference

  • Click on VEX C++, the Motor category of commands, and action to show those commands.
  • Choose the Motor.spin command to display its reference. 
  • Notice that the command appears on the right side of the display, and underneath it says: 'Function', 'Returns: void'. 

NOTE: It says Function because that is the type of command it is. Most of the commands listed will be either functions or variables. It says Returns: void because the command makes the motor spin and does not return a variable value. Some functions and variables might return integers or other values.

  • Notice the Overloads and Parameters table. 

NOTE: It shows you the VEX C++ command, the parameter(s) it takes, and explains what the command does. In this case, the parameter is the direction that the motor is set to spin (forward or backward). This command turns the motor on and spins it in the specified direction.

  • Notice that the name of this parameter is 'dir' which is short for 'direction'.
  • Notice the Code Snippet section. A code snippet is an example of the code being used as part of a program. 

NOTE: The snippet above shows the velocity being set for each of the two motors, both motors then being set to spin for 3 seconds, and then both motors being stopped.

NOTE: There is a second part of the table that is collapsed. You can click on the + to open a second part of the table that explains how to use the command with three parameters: dir, double velocity, and the units for that velocity.

Step 7: Review a C++ Pro command reference

  • Click on C++ Pro, the vex category, the Classes category, and vex::motor to show code related to the motor.
  • Choose the spin command to display its reference. 
  • Notice that the command appears on the right side of the display, and underneath it says: 'Function', 'Returns: void'. 

NOTE: It says Function because that is the type of command it is. It says Returns: void because the command makes the motor spin and does not return a variable value.

  • Notice the Overloads and Parameters table. 

NOTE: It shows you the C++ Pro command, the parameter(s) it takes, and explains what the command does. In this case, the parameter is the direction that the motor is set to spin (forward or backward). This command turns the motor on and spins it in the specified direction.

  • Notice that the name of this parameter is 'dir' which is short for 'direction'.
  • Notice the Code Snippet section. A code snippet is an example of the code being used as part of a program.

     NOTE: The snippet above shows the velocity being set for each of the two motors, both motors then being set to spin for 3 seconds, and then both motors being stopped.

NOTE: There is a second part of the table that is collapsed. You can click on the + to open a second part of the table that explains how to use the command with three parameters: dir, double velocity, and the units for that velocity.

Still need help? Contact Us Contact Us