# Socket Communication in Robot Studio

**URL:** <https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295>\
**Category:** RobotStudio\
**Created:** [November 13, 2008, 2:43pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295 "2008-11-13T14:43:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravi](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@ravi](https://tech-community.robotics.abb.com/u/ravi)\
**Post date:** [November 13, 2008, 2:43pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/1 "2008-11-13T14:43:20Z")

</div>

Hi,  
I am trying to do Socket Connection in Robot Studio 5.11.  
The main idea is to do a TCP/IP based communication with the Robot.At present I am doing it in offline mode(Using Virtual Controller).  
I enabled the communication part1 and Part2 in Virtual Controller(Create/Modify Station).  
Here is the part of the code

MODULE Own\_Socket

VAR socketdev Server1 ;  
VAR socketdev Client1;

PROC main()  
SocketCreate Server1  
ENDPROC  
ENDMODULE  
If I compile the above code I get the error "Error 161 : Option is missing. : The instruction SocketCreate requires the option PC Interface. 12.11.2008 00:29:29 RAPID "  
I hope this is because of some part in Communication are not enabled.  
Could any one guide me on how to do this?  
BR  
Ravi

---

<div class="post-metadata">

**Author:** ![RussD](https://avatars.discourse-cdn.com/v4/letter/r/dec6dc/32.png) [@RussD](https://tech-community.robotics.abb.com/u/RussD)\
**Post date:** [November 13, 2008, 3:56pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/2 "2008-11-13T15:56:26Z")

</div>

Try adding the option PC interface in your virtual system via the system builder.

---

<div class="post-metadata">

**Author:** ![ravi](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@ravi](https://tech-community.robotics.abb.com/u/ravi)\
**Post date:** [November 13, 2008, 3:58pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/3 "2008-11-13T15:58:37Z")

</div>

I tried it…but no luck

---

<div class="post-metadata">

**Author:** ![ravi](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@ravi](https://tech-community.robotics.abb.com/u/ravi)\
**Post date:** [November 13, 2008, 3:59pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/4 "2008-11-13T15:59:02Z")

</div>

I tried it but no luck…

---

<div class="post-metadata">

**Author:** ![PerSvensson](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/persvensson/32/1040_2.png) [@PerSvensson](https://tech-community.robotics.abb.com/u/PerSvensson)\
**Post date:** [November 14, 2008, 12:47pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/5 "2008-11-14T12:47:05Z")

</div>

Tried your module in a vc with the option PC interface and it compiled ok except for a missing ; after SocketCreate Server1

What RobotWare version are you using?

---

<div class="post-metadata">

**Author:** ![ravi](https://avatars.discourse-cdn.com/v4/letter/r/58956e/32.png) [@ravi](https://tech-community.robotics.abb.com/u/ravi)\
**Post date:** [November 14, 2008, 6:34pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/6 "2008-11-14T18:34:47Z")

</div>

Hi thanks for the reply.I got it running..its a mistake from my side.

---

<div class="post-metadata">

**Author:** ![cynosure.tarun](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cynosure.tarun](https://tech-community.robotics.abb.com/u/cynosure.tarun)\
**Post date:** [August 20, 2012, 5:03pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/7 "2012-08-20T17:03:39Z")

</div>

Hello Friends,

i have add pc interface through system builder but still I get the error "Error 161 : Option is missing. : The instruction SocketCreate requires the option PC Interface.

Please give some information how to get rid of it.

Regards  
Tarun Patel

---

<div class="post-metadata">

**Author:** ![Steve\_Murphy](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Steve\_Murphy](https://tech-community.robotics.abb.com/u/Steve_Murphy)\
**Post date:** [August 21, 2012, 2:55pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/8 "2012-08-21T14:55:54Z")

</div>

Hello Tarun,

Double check that you are actually running the virtual controller with the PC Interface option. (See System Information).

This does work correctly when the option is there.

Steve

---

<div class="post-metadata">

**Author:** ![cynosure.tarun](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cynosure.tarun](https://tech-community.robotics.abb.com/u/cynosure.tarun)\
**Post date:** [August 22, 2012, 5:20pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/9 "2012-08-22T17:20:38Z")

</div>

Hello Steve

Thanks for your reply.

it’s working now.

Tarun

---

<div class="post-metadata">

**Author:** ![Andrew90](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew90](https://tech-community.robotics.abb.com/u/Andrew90)\
**Post date:** [March 12, 2015, 12:34pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/10 "2015-03-12T12:34:23Z")

</div>

Hey guys,

I have a similar problem as ravi. I am trying to make a server program in RobotStudio to interact with python 2 client code. I already made a simple client-server application and in offline programming it works great. The problem is that when I put the code from RobotStudio in the actual IRC5 Robot Controller it gives the error: Error 161 : The instruction SocketCreate requires the option Socket.  
After entering in the System properties/Control module/Options from the TeachPendant I saw that the: Socket Messaging [619-1] is not installed in the controller and I believe this is why I cannot work with sockets at this point in time. How can I fix this problem? I hope that someone can help me

---

<div class="post-metadata">

**Author:** ![Andrew90](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Andrew90](https://tech-community.robotics.abb.com/u/Andrew90)\
**Post date:** [March 12, 2015, 12:34pm UTC](https://tech-community.robotics.abb.com/t/socket-communication-in-robot-studio/2295/11 "2015-03-12T12:34:47Z")

</div>

Hy guys,

Concerning the problem above, I also made a program in RobotStudio that interacts with Python code. My problem is that the program in RobotStudio is working but after downloading the program in the actual Robot Controller it gives the exact same error that ‘ravi’ got (Error 161 : The instruction SocketCreate requires the option Socket).  
On the TeachPendant Error screen at Action it states that I should update the system image with the required option.  
My question is how should I do this?? The Controller type is IRC5 M2004.

Can anybody help?  
Thanks in advance
