6.3      Scripting

Prerequisites

Ÿ   Dobot M1 has been powered on.

Ÿ   Dobot M1 has been connected to a PC successfully.

Ÿ   Dobot M1 has been connected to an emergency stop switch.

Application Scenario

You can control Dobot M1 over scripting. Dobot M1 supports various API, such as velocity/acceleration setting, motion mode setting, and I/O configuration, which uses Python language for secondary development. For details about the Dotob M1 API interface and function description, please see Dobot API Interface Document.

The download path is www.dobot.cc/downloadcenter/dobot-m1.html#most-download.

Procedure

Step 1         Select Script on the M1Studio page.

The Script page is displayed.

Step 2         Write the script.

You can double-click the interface used, the corresponding interface will be displayed on the script file page, as shown in Figure 6.14. You can also click  icon of the corresponding interface on the left pane of the Script page to view the way how to set the parameters. The scripting example can refer to Installation directory/M1Studio/config/ststore/Example.script.

NOTICE

If you use the motion command when scripting, please add the orientation command before every motion command, which indicates the arm orientation of Dobot M1.

 

Figure 6.14 Write a script

 

Step 3         Click Save on the Script page.

The Save Scrip File page is displayed.

Step 4         Input the use-defined name and the saving path, and click Save. The default path of the script is Installation directory/M1Studio/config/ststore. Please replace the path based on site requirements.

Step 5         Click Start, and Dobot M1 will move according to the script file.

The running log will be displayed on the lower pane of the Script page for checking.














 Issue V1.2.1 (2019-04-10)User GuideCopyright © Yuejiang Technology Co., Ltd