50
7 Robot External Communication Protocol
TCP/IP:
Robot is a unit of intercepted port for TCP server 2000 and TCP server 2001. Port
2000 receives control commands of the robot and sends feedback. Port 2001 sends
out robot current status within 10HZ frequency.
Port 2000:
Port 2000 follows the request-to-respond mechanism. It is able to receive script
commands and few special commands. Here listed few communication protocols
between Clients and Sever.
Clients send scripts to Server: one command or multiple commands are allowed to
execute.
When sending multiple commands, the first and last scripts are
<start>
and
<end>
respectively. Robots run program from
<start>
to
<end>
. The system send script
partially until the whole command has been send completely.
When recognizes
<start>
, the system will reply
<prog mode start>
. When
recognizes
<end>
, the system will reply
<prog mode end>
. If the script size is
larger than maximum, which is 8192 bytes, it will reply
<exceed max size 81922>
and will ignore the
<start>
has received.
When sending
<run (program name.spf)>
or
<run (program name.spf, speed
percentage)>
commands, robot will run the corresponding program. Robot will
apply the current speed when there is no speed setting or the speed is not valid.
When robot status is free, it will run the new command and send
<script start>
to
clients; whereas the robot is executing any program, it will send
<system not
ready>
command to clients. If the robot status is locked, it will send
<system lock>
.
If the program doesn’t exist, it will send
<program doesn’t exist >
.
If the program has syntax error, server will send message
<syntax error>
and the
error location to client as feedback. If the robot is in error status and received
client’s command, server will return
<system error>
to Client. The
<syntax
error>
doesn’t require reset; whereas the
<system error>
requires. If collision has
been detected, the robot will pause and return
<collision detect>
. Client sends
<resume>
to continue program.