Hi.
You can create an installation variable and store the value there. Then the data will be persistent on reboot.
You can have a look at this forum thread for more information: URScript: Persistent or static variables that retain their values after stopping and starting the robot program or even after rebooting the robot?