6.xarm_set_suction_cup
192.168.1.99:18333/ws
设置真空吸头关闭/打开:
设置真空吸头关闭/打开,可实现Blockly中设置真空吸头开关模块的设置按钮的功能。
example:
# 打开真空吸头
{
"cmd": "xarm_set_suction_cup",
"data": {
"on": true,
"wait": true,
"delay": 0
},
"id": "1"
}
Request:
cmd
- string,必填,请求接口
date
- Application/json,必填,请求数据
id
- string,必填,请求序列号
data | 数据类型 | 必须 | 描述 | 示例值 |
on | bool | 是 | 真空吸头开启为‘True’,关闭为‘False’ | true |
wait | bool | 是 | 是否等待真空吸头开启/关闭成功才结束,是则为‘True’,否则为‘False | true |
delay | int | 否 | 启动开始后延迟有效时间(秒),0代表立即启动 | 0 |
\
Response:
code=0->成功;
code!=0->失败,详情参考xArm_Python_SDK/xarm_api_code.md文档。
\
请求参数
无