Skip to content

DobotLab compatibility

Magician implements the 28 Python functions in the DobotLab Dobot Magician manual (sections 3.6.1 to 3.6.28, February 2026 edition) with the same names and argument order.

Section Function
3.6.1 ptp(mode, x, y, z, r)
3.6.2 set_device_withl(enable, version)
3.6.3 set_ptpl_params(vel, accel)
3.6.4 set_ptpwithl_cmd(mode, x, y, z, r, l)
3.6.5 set_r(r)
3.6.6 motion_params = vel, acc
3.6.7 jump_params = zlimit, height
3.6.8 set_multiplexing(io, multiplex)
3.6.9 set_pwm(io, freq, cycle)
3.6.10 set_do(io, level)
3.6.11 get_di(io)
3.6.12 get_adc(io)
3.6.13 set_endeffector_suctioncup(enable, on)
3.6.14 set_endeffector_gripper(enable, on)
3.6.15 set_infrared_sensor(port, enable, version)
3.6.16 get_infrared_sensor(port)
3.6.17 set_color_sensor(port, enable, version)
3.6.18 get_color_sensor()
3.6.19 wait(second)
3.6.20 set_home()
3.6.21 get_pose()
3.6.22 get_posel()
3.6.23 clear_alarm()
3.6.24 get_arm_speed_ratio(mode)
3.6.25 set_lost_step_params(value)
3.6.26 set_lost_step_cmd()
3.6.27 get_lost_step_result()
3.6.28 set_converyor(index, enable, speed)

Differences

  • When the arm reports an alarm, a function raises a DobotAlarmError subclass instead of returning False.
  • clear_alarm also raises when an alarm is active again after clearing.
  • set_home homes also during an alarm, as the Home button of DobotLab does, and clears the alarms when homing ends.
  • Inside batch, the functions queue their command and return at once.
  • get_pose() returns a Pose, which unpacks as x, y, z, r, joints.
  • set_conveyor is an alias for set_converyor. Magician.Stepper1 and Magician.Stepper2 select conveyor motors 0 and 1.

Example

from pydobotlab import Magician

with Magician() as robot:
    robot.motion_params = 50, 50
    robot.ptp(mode=1, x=220, y=0, z=50, r=0)  # MOVJ_XYZ
    print(robot.get_pose())