Skip to content
User Manual > Basic Functions

Common Examples#

This page covers gravity compensation and teach-and-playback operation. See Running Examples for keyboard-control examples and key bindings.

Confirm safety before running an example

Every example on this page acquires control authority, switches the control mode, and may immediately drive the robot arm or end effector. First confirm that the robot arm, tool, payload, and cables are installed correctly, clear the motion range, and ensure that on-site personnel can immediately operate the physical emergency stop. Exiting the program or releasing control authority cannot replace the physical emergency stop. If an example returns False, times out, or causes unexpected motion, stop sending new commands and follow the on-site safety procedure.

Confirm that the control service is ready

Before starting the operations on this page, confirm that the robot arm's internal service has finished starting, the indicator at the end of the arm is steady yellow, and the control service is in the IDLE state. A flashing yellow indicator means that the service is still starting; wait for startup to complete before proceeding. See Light Up the Robot Arm for power and connection instructions.

Gravity Compensation#

Press and hold the arm-end button to enter gravity-compensation mode. After entry, the status indicator is steady blue; see Robot Arm Status Indicator for the complete table.

Support the robot arm before entering gravity compensation

Entering gravity compensation may let external force or gravity move the robot arm. First clear the motion range, confirm that the tool and payload are securely installed and that the physical emergency stop is available, and support the robot arm before running the example. See Control Modes for mode meaning and exit methods.

Teach and Playback#

The following workflow applies to P7 firmware with teaching-and-playback enabled. After starting the control service, use the arm-end button to switch between teaching, gravity compensation, and trajectory playback states. The status indicator follows the P7 LED table. If the installed firmware does not provide teaching and playback, follow the control modes supported by the device.

  1. Start the control service and confirm that the arm enters external-control mode with a flashing green indicator.
  2. Press and hold the arm-end button for about 3 seconds to enter the teaching-and-playback app's idle state; the indicator remains flashing green.
  3. Press and hold the arm-end button for about 2 seconds to enter gravity compensation. After confirming a steady blue indicator, support the arm and move it to the required positions.
  4. In gravity compensation, short-press the arm-end button to start recording. The indicator shows flashing blue.
  5. Short-press the arm-end button again to stop recording and return to gravity compensation; the indicator returns to steady blue.
  6. Press and hold the arm-end button for about 2 seconds to exit gravity compensation and return to the teaching-and-playback idle state.
  7. Double-press the arm-end button to enter playback preparation; the indicator flashes green.
  8. Short-press the arm-end button to move the arm to the start of the recorded trajectory; the indicator becomes steady green.
  9. Short-press the arm-end button again to start playback. The indicator shows flashing green; after the trajectory completes, the arm returns to its start point.
  10. During playback, short-press the arm-end button to stop or resume playback.

To record another trajectory, return to gravity compensation after playback and repeat from step 3. If unexpected motion occurs, stop operating immediately and use the physical emergency stop according to the site safety procedure.