Introduction

📅Update: 2020/09/04

DexArm is developed based on the world's leading open-source project Marlin, the DexArm firmware is completely open-source, and its control commands (G-code) are compatible with Marlin. Please visit GitHub for more details of our firmware project.

G-code commands are the general control commands for CNC machines, 3D printers, etc. It is composed of ASCII strings, such as G1 F2000 X0 Y300 Z0, G-code commands usually uses \n as the sending end character.

In Marlin, the slave device will reply ok after receiving the G-code commands, the host computer then can send the next commands after receiving the ok. In DexArm SDK (pydexarm - download below👇), we have encapsulated this sending and receiving mechanism and make it convenient for users to use.

Communication Parameters

  • Baud rate: 115200

  • Data bits: 8

  • Stop bits: 1

  • Parity: None

  • Flow control: None

Initialization

After the host computer is connected to the robot arm, please send the command M1112 first to move the arm to the HOME (X0 Y300 Z0) position.

Basic Motion Control Commands

Motion Mode

Fast Mode

The default motion mode is fast mode. Under fast motion mode, command G0 is to execute fast mode, command G1 is to execute straight line mode

M2001

Straight Line Mode

Under straight line mode, command G0 and G1 are to execute straight line mode.

M2000

Basic Motion commands

Move the Arm to a target position, control the Arm moving speed and acceleration.

Related commands: G000_G001 G002_G003 M201 M203 M204;

Stop command

Related command: G004

Set working height

  • G92 X0 Y0 Z0 set the current position as working height.

  • G92.1 reset the working height.

Leveling related commands

Set leveling coefficient

M891 Xn Yn

Read leveling coefficient

M891

Magnet encoder related commands

Read current encoder position data

M893

Move to a specific encoder value position

M894 Xn Yn Zn

End effector control commands

Pneumatic module control commands

  • M1000 - air pump box to pump in

  • M1001 - air pump box to pump out

  • M1002 - air pump box to release air

    • To return to original status when the suction cup/soft gripper is not working.

  • M1003 - stop air pump box

Laser engraving module control commands

Related control commands M003 M005

3D printing control commands

Accessory control commands

Conveyor belt control commands

set conveyor belt working speed as 2000mm/min, clockwise

M2012 F2000 D0

set conveyor belt working speed as 2000mm/min, counter-clockwise

M2012 F2000 D1

stop conveyor belt

M2013

Reset the touchscreen firmware

Connect the touchscreen to DexArm after sending the following commands:

M5010000

Reset DexArm Settings

Reboot DexArm and enter bootloader

Send commands M2002, M2003 in sequence to enter bootloader mode.

Reboot DexArm commands

M2007

Re-calibrate the initial position

The DexArm HOME position and motion coordinates are based on the initial position. The initial position has been calibrated before leaving the factory. If there is an error in the arm movement, please re-calibrate the initial position according to the following instruction:

1. Adjust the arm to the following position, make sure Axis 1 and Axis 2 is in the maximum position:

2. Send command M889

Advanced commands