欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

ABB工业机器人ConnectionRoutine部分

程序员文章站 2024-01-04 08:29:16
...
PROC ConnectionRoutine()
      
    VAR string clientAddress;        
    SocketClose serverSocket;
    SocketClose clientSocket;
    
    SocketCreate serverSocket;
    SocketBind serverSocket,"192.168.10.10", 6000;
    SocketListen serverSocket;
    SocketAccept serverSocket, clientSocket\Time:=WAIT_MAX; 
    TPWrite clientAddress + " connected to " + "192.168.10.10";
	!AccSet 70, 100;     
	
ERROR
    IF ERRNO = ERR_SOCK_CLOSED THEN
        ReconnectAfterErrors;
        RETRY; 
    ENDIF
ENDPROC
相关标签: ConnectionRoutine

上一篇:

下一篇: