RobotStudio event

How to change the listening port of the Virtual Controller (RobotWare 6.x and 7.x)

Maxim Riabichev
edited November 2024 in RobotStudio
Hello all,

Please note: OmniCore (RobotWare 7.x) controllers will try to listen on the following ports, in the order from top to bottom. I.e. if port 80 is blocked, then it will listen on 5466. If 5466 is blocked, then it will listen on 9403 and so on.
  • 80
  • 5466
  • 9403
  • 9805
  • 11622
  • 19985
  • 31015
  • 34250
  • 40129
  • 45003
Perhaps you don't actually need to change the listening port? If you still want to, then continue reading.

One might want to change the listening port of the Virtual Controller. For example, in my specific case, port 80 is taken by another application which means that accessing the controller resources with Robot Web Services via the default URL doesn't work.

Let's have a look at how we can change the listening port of the Virtual Controller.

WARNING: If you make changes to appweb.conf file as mentioned below, any backups made based on a appweb.conf-file with other settings will fail to open in RobotStudio. The contents of appweb.conf has to reflect the controller in the backup!

Note: The file is Read Only by default, so you will have to uncheck that checkbox in the Properties of the file.

1) Locate "appweb.conf" file in the following path:

For RobotWare 6.x: "C:\Users\<USERNAME>\AppData\Local\ABB\RobotWare\RobotWare_<VERSION NUMBER>\system"
For RobotWare 7.x: "C:\Users\<USERNAME>\AppData\Local\ABB\RobotWare\RobotControl_<VERSION NUMBER>\system"

2) Find the line "Listen -1" and change it to "Listen <ANY UNUSED PORT>"

3) Save the file.

Note that OmniCore listens on HTTPS by default, which is why we see ListenSecure -1 uncommented in the appweb.conf. But it is still possible to change the listening port in the same way as outlined above.

Change
ListenSecure -1
to
ListenSecure <DESIRED PORT>
E.g. ListenSecure 8880

For OmniCore, it is possible to have the controller to listen both on HTTP and HTTPS by uncommenting Listen -1.
In fact, by default, OmniCore controllers are listening for HTTPS requests on port 80. Which might seem weird. To ameliorate this situation, one could change the listening ports to something like this:
Listen 80
ListenSecure 443

Warning: If you disable ListenSecure -1 completely then you will run into RobAPI exceptions in RobotStudio.


Bonus: Let's say you want to verify that the controller is actually listening to the port you selected.

1) Open the Task Manager.

2) Go the the Details tab.

3) For RobotWare 6.x find RobVC.exe or for RobotWare 7.x find Vrchost64.exe and memorize the PID number.
(If you have multiple controllers running, memorize all relevant PID numbers.)

4) Open Command Prompt.

5) Send the following command: "netstat -aon | findStr <PID NUMBER>"

6) If the RobVC or Vrchost64 of that PID is actually listening on the port you want it to, the output should contain a row with "TCP    [::]:<THE PORT YOU SELECTED>              [::]:0                 LISTENING"


Note: It is possible to change ports of multiple VC's "on the fly".
For example, let's say you want to have three VC's with different but specific ports. You start the first VC. Then you edit the appweb.conf, change the port, save the file and start the second VC. Then, once more, you edit the appweb.conf, change the port, save the file and start the third VC.

If you for whatever reason would like to change the first VC's port then you edit the appweb.conf file, save it, and Restart (Warmstart) the first VC and the port should be changed.

Here's how it can look with two Virtual Controllers listening on ports 8880 and 8881:




Final remark: If you change the appweb.conf file, all controllers you create in the future will be created based on these changes.


Alright, that's it.


Have a nice day!

Maxim Riabichev
PC Software Support Engineer
Post edited by Maxim Riabichev on

Comments

  • Very useful article, many thanks!

    Are there any tricks to access a remote virtual controller in RobotWare 7.x from a PC via RWS2?
    For RobotWare 6.x setting up a proxy on the remote PC helped make it work, but that doesn't do the trick with Omni core on my computer. I have also followed this tip to no avail.
  • Hello,

    I haven't tested this myself yet, so I'll look into it and get back to you as soon as I have more information.

    Maxim Riabichev
    PC Software Support Engineer
  • Hello Maxim,
    Thanks a lot for looking into this. Adding the PublicationEnabled tag to the whitelisting trick in vcconf.xml did the job!

    <VCConfiguration>
    <RemoteVCConfiguration PublicationEnabled="true" />
    <hosts>
    <host ip="192.168.125.5"/>
    </hosts>
    </VCConfiguration>
  • Ah nice!

    Thanks for sharing.

    Maxim Riabichev
    PC Software Support Engineer