How to set up a virtual irc5 for offline control?
birschtl
✭
in RobotStudio
Hi
first things first: I am not seriously into robotics, so bare with me...
Im doing a media project where i need to control an irb120 through an already existing RAPID module. The only thing that is not working is the socket stuff inside this module although the socket connection is exactly like shown in the documentation. RAPID editor underlines the complete socket stuff red and says "wrong amount of arguments". Am i missing anything? Is this a restriction of the trial version? How exactly would i set up a virtual irc5 for offline control?
Thank you for your help!!
bs
PROC ServerCreateAndConnect(string ip, num port)
VAR string clientIP;
SocketCreate serverSocket;
SocketBind serverSocket, ip, port;
SocketListen serverSocket;
TPWrite "SERVER: Server waiting for incoming connections ...";
WHILE SocketGetStatus(clientSocket) <> SOCKET_CONNECTED DO
SocketAccept serverSocket,clientSocket \ClientAddress:=clientIP \Time:=WAIT_MAX;
IF SocketGetStatus(clientSocket) <> SOCKET_CONNECTED THEN
TPWrite "SERVER: Problem serving an incoming connection.";
TPWrite "SERVER: Try reconnecting.";
ENDIF
!//Wait 0.5 seconds for the next reconnection
WaitTime 0.5;
ENDWHILE
TPWrite "SERVER: Connected to IP " + clientIP;
ENDPROC
0
Best Answers
-
When you create your system you have to select the option PC Interface
Per Svensson
Robotics and Vision Specialist
Consat Engineering5 -
If you just import the robot modell and then create a system using from layout (found under the Robot System button, where you probably have choosen quick system). After a couple of dialog you will see the Options button in the upper right corner.where you can select which options you want.
Per Svensson
Robotics and Vision Specialist
Consat Engineering1
Answers
-
Also try to verify the program using the "Check Program" button in the RAPID tab. Does it report errors as well?
Henrik Berlin
ABB0 -
Says the same errors... Where do i set up ip controller for the irc5?0
-
Don't know if the code works, but I think it needs the vars declared to make the red go away:
VAR socketdev serverSocket;
VAR socketdev clientSocket;
0 -
Got an interesting error... The error says: "Missing option(161): The instruction SocketCreate requires the option PC"
Now we are talking... where do I set the option "PC"?
bs
0 -
where can i select the option? when i create a new station i can only select the robot... the control is added automatically...0
-
Thank you all!! It is working now... Per, your awesome!!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