> For the complete documentation index, see [llms.txt](https://manual.rotrics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.rotrics.com/v1.0-chinese/pick_and_place_chn/kai-shi-shi-qu-he-ban-yun.md).

# 开始示教和搬运

Rotrics的气动搬运功能可以通过Rotrics  Studio控制并记录下机械臂的运动实现，也可以编写G-code程序控制机械臂运动，实现搬运。

## 使用Rotrics Studio进行示教搬运

#### 1) 连接机械臂到Rotrics Studio

![](/files/-M77jIK-5kreQhAiotGl)

#### 2) 点击Basic -> Functions -> Teach\&Play -> ON

此时顶部&#x7684;**`Record`**&#x548C;**`Record List`**&#x6309;钮会变为可用状态。

![](/files/-M77jfPD6HC3tp4--Ivt)

#### 3) 选择对应的前端模块（Air Pick / Soft Gripper），点击ON

![](/files/-M7Ai3oxe7-0kLh1a8Si)

#### 4) 拖动机械臂到对应的位置，点击`Record`记录位置和前端模块状态。

此时可以看到Recrod List右上角显示已经记录了一个示教动作。

![](/files/-M7AiBhxIqkSFRTP8g4G)

#### 5) 点击Pick拾取物品，点击`Record`记录位置和前端模块状态。

![](/files/-M7AjIbwlORWFgyyRNRL)

💡**Tips:** 如果使用柔性爪进行示教搬运，&#x5728;**`Grip`**&#x6293;取物品之前 ，需要&#x5148;**`Release`**，再下降到对应位置，然后&#x518D;**`Grip`**。

#### 6) 拖动机械臂向上抬升一段距离（5cm左右，其他高度也可以），点击`Record`记录位置和前端模块状态。

💡**Tips:** 为了防止机械臂在运动过程中误碰撞到搬运的物体，需要让机械臂按照门型的轨迹运动，也就是先抬升一段距离，再移动到目标点上方一定高度，再向下移动。

![](/files/-M7Amnwgtvk779RJszFi)

#### 7) 拖动机械臂移动到目标点的上方大约5cm的位置，再点击`Record`记录位置和前端模块状态。

![](/files/-M7AmwlyDWkkRF6Svw2e)

#### 8) 拖动机械臂到目标点，点击Place，放下物品。再点击`Record`记录位置和前端模块状态。

![](/files/-M7AnUR60ePoNfytyJnM)

#### 9) 点击Air Pick / Soft Gripper的OFF，关闭气泵。点击`Record`记录位置和前端模块状态。

![](/files/-M7AoVWhtmyFeDY9GIVe)

#### 10) 点击Record List， 查看所有记录的示教动作。可以点击`+Add Delay`在不同的动作之间添加等待时间。

![](/files/-M7AomnURzXkmYkWNLca)

![](/files/-M7ApWvEnCn7VeZcX6L5)

#### 11) 点击Replay，复现所有示教动作。

![](/files/-M7ApswWONjse29Umw43)

目前只支持复现一次示教动作，后续版本会增加多次循环示教的功能。

如果现在需要进行循环示教动作，需要点击底部的`Export`按钮导出G-code文件，复制多次，机械臂即可按照示教动作循环运动。

<div align="left"><img src="/files/-M7ArCZ0FTenj9T67d9s" alt=""></div>

如果Replay之后，还需要增加新的示教动作，需要点&#x51FB;**`Teach&Play`**&#x7684;**`OFF`**，重新点&#x51FB;**`ON`**&#x4E4B;后再记录新的动作。

## 使用触控屏进行示教搬运

#### 1)将触控屏连接到机械臂，点击`Basic -> Reset -> HOME`使机械臂运动到HOME点

<div align="left"><img src="/files/-M5a8Si1Nr4sjdVTVSYL" alt=""></div>

#### 2) 点击Teach -> Air Pick / Soft Gripper 进入对应模块的示教模式

<div align="left"><img src="/files/-M5a9vp4NPD2yk8jN3U7" alt=""></div>

#### 3) 点击Disable开始示教

<div align="left"><img src="/files/-M5aBuDQ6pvlXPRUP4pA" alt=""></div>

Disable会使得电机失力，从而可以拖动前端模块的位置。

#### 4) 拖动机械臂到对应的位置

#### 5) 点击Pick拾取物品

<div align="left"><img src="/files/-M5aC48XymjydO-wlyF-" alt=""></div>

#### 6) 点击Record记录当前点坐标和气动模块状态

<div align="left"><img src="/files/-M5aCDbS_jSi2N8A4CuT" alt=""></div>

#### 7) 拖动机械臂到目标位置，点击Place放下物品

<div align="left"><img src="/files/-M5aCLbRkq0vMAE0rnUc" alt=""></div>

#### 8) 点击Record记录当前点坐标和气动模块状态

<div align="left"><img src="/files/-M5aCPWXBjett0NCcF6K" alt=""></div>

#### 9) 依次重复记录所有位置

<div align="left"><img src="/files/-M5aCaK-TF-Vcf-5XvWJ" alt=""></div>

在每次记录点之后，可以在下一个点之前添加延时指令，使机械臂等待一段时间后再执行下一步。

#### 10) 点击Replay即可复现整个示教过程

<div align="left"><img src="/files/-M5aChTKdxk6G4doWWCQ" alt=""></div>

## 编写G-code指令进行搬运

使用G-code进行气动搬运工作，需要先新建一&#x4E2A;**`.gcode`**&#x6587;件，使用系统自带&#x7684;**`记事本`**&#x7A0B;序或者第三方的文本编辑器打开（比如Notepad++），在其中输入机械臂运动控制指令，完成后通过Rotrics Studio软件发送给机械臂即可进行气动搬运工作。

#### 1) 相关的G-code指令说明；

运动控制指令：

* **`G0 X300 Y20 Z0`** - 机械臂运动到点（300,20,0）
* **`G0 F3000`** - 设置速度为3000mm/min;
* **`M2000`** - 设置机械臂以直线模式运动；
* **`M2001`** - 设置机械臂以快速模式运动；

气泵控制指令：

* **`M888 P2`** - 设置前端模块为气动模块；
* **`M1000`** - 气泵吸气；
* **`M1001 -`** 气泵吹气 ；
* **`M1002`** - 气泵泄气 ，泄气气阀打开 ；
* **`M1003`**- 所有气泵气阀停止工作；

#### 2) 气动G-code流程说明

A.使用M888 P2指令设置前端模块为气动模块；

B. 使用M2000 或M2001设置机械臂运动模式；

C. 使用G0指令控制机械臂的运动；

D. 使用M1000 - M1003指令控制气泵的工作；

其中柔性爪和吸盘的气泵动作是相反的，具体说明如下：

**吸盘工作过程：**

* 使&#x7528;**`M1000`**&#x4F7F;气泵吸气，拾取物品；
* 使&#x7528;**`M1002`**&#x4F7F;气泵泄气，释放气泵内部压力，放下物品；
* &#x20;使&#x7528;**`M1003`**&#x5173;闭所有气泵气阀；

**柔性爪工作过程：**

* 使&#x7528;**`M1001`**&#x4F7F;气泵吹气，使柔性爪抓紧，抓取物品；
* 使&#x7528;**`M1000`**&#x4F7F;气泵吸气，使柔性爪松开，放下物品；
* 每次停止柔性爪的使用时，先使&#x7528;**`M1002`**&#x4F7F;气泵泄气，释放气泵内部压力；
* 再使&#x7528;**`M1003`**&#x5173;闭所有气泵气阀；

#### 3) 示例

***吸盘***

***柔性爪***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://manual.rotrics.com/v1.0-chinese/pick_and_place_chn/kai-shi-shi-qu-he-ban-yun.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
