Program the Real Arm · xArm 850 · Page 5 of 6
The Agent Interface
The program does not need an agent, but it is built so one can call it: an agent sends the same commands a person types, and reads the same events the program prints.
The course asks for the commands an agent could issue, the task parameters, the status it could report, the completion and failure messages, the communication methods, and the current limitations1. It suggests a start command, job parameters, a machine state, a completion event and a fault message2.
Commands
| Command | Typed by a Person | Effect |
|---|---|---|
START_JOB | start black 3 | Runs a job; refused, never queued, when it cannot run now3 |
PAUSE | p | Holds the arm mid-move; keeps the job and the vacuum34 |
RESUME | r | Continues34 |
STOP | s | Stops the arm; reports whether a card is held34 |
STATUS | status | Reports the state3 |
SHUTDOWN | quit | Stops if moving, then ends the program3 |
No command clears a fault: after FAULT or STOPPED only STATUS and SHUTDOWN are accepted, and a person recovers5.
Task Parameters
variant: which card it is. Without the camera this is the caller's word, and it chooses the stack67.quantity: from 1 to the room left on that variant's stack. The stack counts last for the whole session38.- Everything else, the waypoints, speeds and bounds, is fixed in the station file for an approved version: an agent chooses what to make, not how the arm moves9.
Status and Messages
| Event | When |
|---|---|
STATE | READY, RUNNING, PAUSED, FAULT or STOPPED5 |
STEP | Each step of the cycle, with its agent command10 |
CYCLE_COMPLETE, JOB_COMPLETE | A cycle with its time; the job's end11 |
FAULT | The code, the step, and whether a card is on the cup1213 |
STOPPED | A controlled stop, and whether a card is held4 |
COMMAND_REFUSED | A command that cannot run now, and why3 |
Communication Methods
- Commands in: one JSON line per command on standard input, or the short forms a person types3.
- Events out: one JSON line per event on standard output, and the same lines in the run's log file3.
- To the arm: UFACTORY's Python SDK, from one module only; an agent never talks to the arm directly1410.
- To other agents: connecting the program to an agent, and through it to the factory's systems, is the next course step15.
Each step maps onto a command of this project's planned agent: MoveToNamedPose for the moves home, Pick at the pick and Place at the stack10.
Current Limitations
- Without the camera the program cannot tell which card it holds, or whether the card is damaged16.
- One card per cycle, placed by hand in the corner stop while the arm is home16.
- No command recovers from a fault: every fault needs a person16.
- Commands come from one local operator. Taking them over a network would need authentication and approval of the changed program16.
Printed from https://www.anotherplace.com/learn/en/xarm-850/program/interface. Every line cites its source on that page.