Python#

This guide provides detailed information on how to use the Python commands in VEXcode CTE. Here, you will learn how to read and understand each command, with comprehensive descriptions, parameters, and usage examples.

Understanding the Command Entries#

Each command entry in the API Reference includes the following components:

  • Command Name and Signature: This is the name of the command and its parameters.

  • Description: A brief explanation of what the command does.

  • Blocking/Non-Blocking: Indicates whether the command waits for completion before moving to the next command.

  • Parameters Table: Lists and describes the parameters that the command accepts.

  • Returns: Describes what the command returns, if applicable.

  • Example: Provides a sample code snippet demonstrating how to use the command.

Example Command Entry#

move_inc()#

The move_inc(x, y, z, wait) method moves the End Effector by the requested X, Y, and Z distances.

This can be a waiting or non-waiting method depending on if the wait parameter is used.

Parameters

Description

x

The distance on the x axis to move for, in millimeters.

y

The distance on the y axis to move for, in millimeters.

z

The distance on the z axis to move for, in millimeters.

wait

Optional. The wait parameter determines whether the method will block subsequent method (wait=True) or allow immediate execution (wait=False). If unspecified, the default for the wait parameter is wait==True.

Returns: True if the 6-Axis Arm has moved to the requested position when wait is True. False if it did not.

# Move the Arm +100 millimeters on the y axis.
arm.move_inc(0, 100, 0)