Update Variable

Please tell me.
How to update a variable. I use generateScript,
but is variable updated only when the program starts.

We will need a lot more information about what you are tying to do in order to help you resolve your question.

Assuming you mean will the value of a URScript variable only be updated when the program starts, then yes this is correct. The generateScript method is called exclusively when the play program button is pressed, and writes script that will form parts of the UR program. The installation file script is written first, followed by the script for the robot program (which includes any script that URCap program nodes will generate)

Please be more specific if you have any more questions, hope this helps.
Sam