# URCaps infinite loop

**URL:** <https://forum.universal-robots.com/t/urcaps-infinite-loop/4957>\
**Category:** URCap Development\
**Created:** [August 22, 2019, 9:50am UTC](https://forum.universal-robots.com/t/urcaps-infinite-loop/4957 "2019-08-22T09:50:06Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![thph](https://avatars.discourse-cdn.com/v4/letter/t/b77776/32.png) [@thph](https://forum.universal-robots.com/u/thph)\
**Post date:** [August 27, 2019, 10:21am UTC](https://forum.universal-robots.com/t/urcaps-infinite-loop/4957/11 "2019-08-27T10:21:15Z")

</div>

It is important to separate between the Java layer and the script layer. The generateScript() method should only contain the scope of script writing - for more information you can read the articles provided in [getting started.](https://www.universal-robots.com/developer/ur-cap/polyscope-x-design-guidelines/) When creating a variable, it is not visible in the polyScope. Also you need to assign a value to the variable in polyscope and then refer to the variable in your generateScript() method in program node to use it.  
Could be something like this **Installation node** ::

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/b/ba95a24d37f6cf5bf6e63548771bfaceb4096e51.png)

assign a value in the polyScope (robot UI):  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/7/78bb6e8d467d12e0a663e83f4d89b353dc1b4bc3.png)

and it should be possible to refer to it in the **program node** :

 ![image](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/01763ae630867753ce98be9e545440286e51c89f.png)

this is just an example.

---

_[View the full topic](https://forum.universal-robots.com/t/urcaps-infinite-loop/4957)._
