The library of UnderAutomation allows to read variables.
It’s possible to set variables via a script sending but it pauses the main program.
To write a variable, you can use XML-RPC so that the robot asks your program for a new value for the variable.