# IP address for virtual controller

**URL:** <https://tech-community.robotics.abb.com/t/ip-address-for-virtual-controller/8550>\
**Category:** RAPID Programming\
**Created:** [November 8, 2018, 11:20am UTC](https://tech-community.robotics.abb.com/t/ip-address-for-virtual-controller/8550 "2018-11-08T11:20:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![voidnoise](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@voidnoise](https://tech-community.robotics.abb.com/u/voidnoise)\
**Post date:** [November 8, 2018, 11:20am UTC](https://tech-community.robotics.abb.com/t/ip-address-for-virtual-controller/8550/1 "2018-11-08T11:20:04Z")

</div>

Hi,

Does anybody know of a way to get the host IP for a virtual controller such that I can write code thats transferable between VC and real IRC? I know that rapid function GetSysInfo provides the wan IP but it simply returns “VC” if running on a VC. Right now I have to manually change the IP address before I transfer between systems, but would much prefer a more elegant solution that works out the IP automatically.

---

<div class="post-metadata">

**Author:** ![AlexK](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@AlexK](https://tech-community.robotics.abb.com/u/AlexK)\
**Post date:** [November 10, 2018, 8:10pm UTC](https://tech-community.robotics.abb.com/t/ip-address-for-virtual-controller/8550/2 "2018-11-10T20:10:04Z")

</div>

You might be able to run ‘netstat -ab | more’ in an elevated cmd to get what process use which port for communication. It’s worth a try at least.

Presuming it would be RobVC one needs to communicate with you could also try to find out what ports it’s listening to by finding it’s PID (Process identifier) by running:

-tasklist /fi “IMAGENAME eq RobVC.exe”

You will then get a PID number, use that and run:

-netstat -ano | findstr

---

<div class="post-metadata">

**Author:** ![AlexK](https://avatars.discourse-cdn.com/v4/letter/a/91b2a8/32.png) [@AlexK](https://tech-community.robotics.abb.com/u/AlexK)\
**Post date:** [November 10, 2018, 8:23pm UTC](https://tech-community.robotics.abb.com/t/ip-address-for-virtual-controller/8550/3 "2018-11-10T20:23:07Z")

</div>

![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/2/2d2882acba88a3f61c15b284445872bcc6e2cb91.png)

It will look something like this.

---

<div class="post-metadata">

**Author:** ![voidnoise](https://avatars.discourse-cdn.com/v4/letter/v/b9e5f3/32.png) [@voidnoise](https://tech-community.robotics.abb.com/u/voidnoise)\
**Post date:** [November 13, 2018, 3:51pm UTC](https://tech-community.robotics.abb.com/t/ip-address-for-virtual-controller/8550/4 "2018-11-13T15:51:11Z")

</div>

Thanks Ill give it a go, but ideally I am currently running the server on the robot. You have made me think thats where I am going wrong. Might be worth rethinking the setup so that both controllers have a known server to connect to, and their credentials aren’t needed in the comms set up.
