Sockets
Ura
✭
in RobotStudio
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 , <RobotIP> , 1000;
SocketConnect server, <GripperIP> , 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
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 , <RobotIP> , 1000;
SocketConnect server, <GripperIP> , 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
0
Comments
-
I have succeded establishing a connection by deleting the
SocketBind server , <RobotIP> , 1000;
row (although RobotIP was not equal to GripperIP )
But now my gripper tells me, he's connected to the right ip, but the programm doenst continue from the
SocketConnect server, <GripperIP> , 1000;
row....
0 -
Scratch that....
It continued but didn't show me, that the program pointer moved, which i missinterpreted
Problem solved... Good i could talk with myself about it
0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings