You could have an output turn on automatically when the robot controller is running, not the program.
You could also use one of the fieldbus protocols (EIP or Profinet) and there are registers that contain the state of the robot so the PLC could know exactly what state the robot is in at all time, you would want to know that robot mode is running. You could also look at program mode and know what state the program is in, playing, paused, stopped, etc
You can get more information on the protocols on the UR support site.
Is it possible when the robot is turned on (not when the program is running) some variable, reference, marker, etc. was displayed as high and when the robot was turned off as low?. Something like a virtual "robot on" switch. I need to use such a mentioned above "switch, variable" in a PLC that supports another machine.