How to set up a virtual irc5 for offline control?

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

Also try to verify the program using the “Check Program” button in the RAPID tab. Does it report errors as well?

Says the same errors… Where do i set up ip controller for the irc5?

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;

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

When you create your system you have to select the option PC Interface

where can i select the option? when i create a new station i can only select the robot… the control is added automatically…

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.

Thank you all!! It is working now… Per, your awesome!!