Sockets

Hello All.
Im fairly new to working with RobotStudio and am now working on the task for sending data to a tool.
The tool is a gripper, which is listening to incomming messages all the time.

VAR socketdev server;
PROC MAIN()
SocketCreate server;
SocketBind server , , 1000;
SocketConnect server, , 1000;
SocketSend server, Str := “Test”;
SocketClose server;
ENDPROC

where Robot- and GripperIP are Strings with the correct IP.
If have allready programmed a socked Connection in Python and it worked but here i allways get the “The Address is already in use” error (ERR_SOCK_ADDR_ISSUE).
What am I doing wrong?
I also tried changing the port the gripper listens to to 2000 which produced the same error.
Thanks for your efford.

Greetings
Ura

I have succeded establishing a connection by deleting the
SocketBind server , , 1000;
row (although RobotIP was not equal to GripperIP :blush:)
But now my gripper tells me, he’s connected to the right ip, but the programm doenst continue from the
SocketConnect server, , 1000;
row…

Scratch that…
It continued but didn’t show me, that the program pointer moved, which i missinterpreted :+1:
Problem solved… Good i could talk with myself about it :laughing: