RobotStudio event

Socket communication crashing

Hello!

I have a program for 3d bin picking, and i am connected via TCP/IP to an external computer. In the program below i create a socket and connect to it. My question is when i start the program in manual mode from main procedure i can normally connect and it works fine, but if i stop in another procedure and have to move the program pointer to another procedure the communication crashes and i get disconnected from the port. What can i do or is there an explanation to why it happens?

Program:

PROC TcpIpInicializacija()

VAR socketdev ABB_PC_socket;

VAR string IPaddress:="192.168.1.124";

VAR num PortNumber:=20001;

SocketClose ABB_PC_socket;

WaitTime 0.05;

SocketCreate ABB_PC_socket;

SocketConnect ABB_PC_socket,IPaddress,PortNumber,\Time:=WAIT_MAX;

ENDPROC

Comments

  • DenisFR
    DenisFR ✭✭✭
    Hello,
    You may use an other task to manage this.

    ☑️2024 - RobotStudio® User Group