is it possible to have the ur communicate with some external Sensor over Modbus TCP and receive UrScript commands over the real time interface from a pc at the same time? There is only 1 Ethernet Port on the controller so would using a switch be enough to allow the robot to connect to the 2 devices as mentioned?
That’s perfectly ok. CB3.1 has normal 1Gb ethernet interface.
is there any way to include the value read by the modbus compatible sensor directly into the real time interface default output struct so i can access the data from the pc ?
You have to copy it inside the running program (ie thread) into suitable GP integer register.