# Old values in variables after starting program

**URL:** <https://forum.universal-robots.com/t/old-values-in-variables-after-starting-program/25258>\
**Category:** Technical Questions\
**Created:** [November 24, 2022, 11:09am UTC](https://forum.universal-robots.com/t/old-values-in-variables-after-starting-program/25258 "2022-11-24T11:09:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuba.siczynski](https://avatars.discourse-cdn.com/v4/letter/k/f04885/32.png) [@kuba.siczynski](https://forum.universal-robots.com/u/kuba.siczynski)\
**Post date:** [November 24, 2022, 11:09am UTC](https://forum.universal-robots.com/t/old-values-in-variables-after-starting-program/25258/1 "2022-11-24T11:09:10Z")

</div>

Hi,  
We have a problem with one of ours robots. After stoping and starting the program retains old values in global variables from previous run. After robot is powered on it works fine clearing its memory before starting program. I can’t initializate values at the begging because some of them are from URcap.  
Did anyone have a similar problem?

Best regards

---

<div class="post-metadata">

**Author:** ![anibal.m.hillier](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@anibal.m.hillier](https://forum.universal-robots.com/u/anibal.m.hillier)\
**Post date:** [November 30, 2022, 6:44pm UTC](https://forum.universal-robots.com/t/old-values-in-variables-after-starting-program/25258/2 "2022-11-30T18:44:09Z")

</div>

Hi Kuba,

since you can’t call them from “initialize variables” section, you can call the variables from a script line on the “before start” section and manually put them to zero or false. In some cases the variables are not initialized in the program until the URCap node is executed, if that happens you have to put them to zero after that node, otherwise it may cause an error for calling a variable that has not been created yet.

Regards  
Anibal Hillier
