System Control
Power On Robot
Power on the robot arm. Unlike start_sys(), this command only powers on and does not enable joint motion.
- Function name: Method
poweronunder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "poweron", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:poweron()
lebai.poweron()
Start Arm
First power on and initialize the robot, then enable joint motion. After the robot is powered on and initialized, it is in the powered-on state and cannot directly command motion. After successful execution, the robot transitions to idle state.
The command is accepted when the robot is in emergency stop, powered off, powered on, or stopped state. When the robot is in other states, the command will not execute and will not error.
WARNING
If the robot hardware emergency stop is pressed, this command triggers error 1011: Please release the hardware emergency stop switch and retry.
- Function name: Method
start_sysunder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "start_sys", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:start_sys()
lebai.start_sys()
Stop Arm
First stop arm motion, then disable joint motion. When the robot is in powered on, idle, paused, running, or teaching state, the command is accepted. After successful execution, the robot transitions to stopped state. When the robot is in other states, the command will not execute and will not error.
- Function name: Method
stop_sysunder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "stop_sys", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:stop_sys()
lebai.stop_sys()
Shutdown
This command can be executed in any connected state. It will disconnect power from the robot arm and control box, and the network connection will also be interrupted.
To restart after powering off, press the hardware power button. If the power-on module is installed, disconnect and reconnect the power.
- Function name: Method
powerdownunder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "powerdown", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:powerdown()
lebai.powerdown()
Reboot
Restart the control box, equivalent to pressing the power button to shut down and then pressing it again to start.
- Function name: Method
rebootunder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "reboot", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:reboot()
lebai.reboot()
Rail Home
Rail home. Only applicable to rail.
- Function name: Method
find_zerounder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "find_zero", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:find_zero()
lebai.find_zero()
Stop Motion
WARNING
Equivalent to first executing cancel_task, then executing stop_move
- Function name: Method
stopunder [Robot] - Parameters: None
- Return: None
Example Program
lebai:stop()
lebai.stop()
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "stop", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Emergency Stop
Emergency stop is divided into software emergency stop and hardware emergency stop. This API and the emergency stop operated through the App are software emergency stops. When the command is executed, it will immediately disconnect power to the robot arm and brake, causing the arm to slightly drop downward. After emergency stop, the arm will stop moving, and the flange and light board will stop working. You must call start_sys() to re-power the arm.
If other tasks and commands are currently running, emergency stop will cause these commands to interrupt and error, further causing related tasks without error handling to fail.
- Function name: Method
estopunder [Robot] - Parameters: None
- Return: None
JSON-RPC
// Request:
{ "jsonrpc": "2.0", "method": "estop", "params": [{}], "id": 1 }
// Response:
{ "jsonrpc": "2.0", "result": {}, "id": 1 }
Example Program
lebai:estop()
lebai.estop()
