1)机器人与相机一般采用socket通讯(TCP/IP)。所以机器人需要有pc-interface选项
2)机器人一般做client,在示教器-程序编辑器,添加指令-communicate下找到SocketCreate,如下图
SocketCreate socket1; //创建套接字
SocketConnect socket1,"192.168.0.2",8005; //连接server,这里需要设置server的ip和端口
TPWrite "connected success";//连接成功后输出信息
WHILE TRUE DO
!routine
SocketSend socket1Str:="Hello server";//向server发送请求
SocketReceivesocket1Str:=received_string;//从server接受数据字符串,并存储到received_string字符串
TPWrite "Server wrote - "+received_string;//写屏收到的字符串
END WHILE
4)如果通讯成功,机器人就能收到相机发送过来的字符串,举例如下,即x偏量1.23,y偏量4.56,角度7.89
更多资讯:ABB机器人配件