# Creating simple timer

**URL:** <https://forum.universal-robots.com/t/creating-simple-timer/9660>\
**Category:** URCap Development\
**Created:** [November 5, 2020, 2:37pm UTC](https://forum.universal-robots.com/t/creating-simple-timer/9660 "2020-11-05T14:37:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnaylor](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nnaylor](https://forum.universal-robots.com/u/nnaylor)\
**Post date:** [November 5, 2020, 2:37pm UTC](https://forum.universal-robots.com/t/creating-simple-timer/9660/1 "2020-11-05T14:37:42Z")

</div>

I have a CB5 that is being used to dispense glue. I’m trying to setup a timer so we can determine how much time of actual dispensing has been done. Example of what I have:

Before Start  
Time\_count=0  
Robot Program  
Set Dispense=On  
Wait: 4  
Set Dispense=Off  
Thread \_1  
If Dispense=True  
Time\_Count=Time\_Count+0.1  
Wait: 0.1

For some reason I’m getting an extra 0.1 added every time.

---

<div class="post-metadata">

**Author:** ![sam.verity-hilton](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/sam.verity-hilton/32/6046_2.png) [@sam.verity-hilton](https://forum.universal-robots.com/u/sam.verity-hilton)\
**Post date:** [November 5, 2020, 3:58pm UTC](https://forum.universal-robots.com/t/creating-simple-timer/9660/2 "2020-11-05T15:58:13Z")

</div>

By CB5, do you mean e-Series? the older generation of robots running polyscope 3.x are the CB3 series, and a robot running polyscope 5.x is e-Series 🙂

Regarding timers, you dont have to do timer operations in a separate thread. In advanced commands, there is a timer node you can use to time any processes you wish. The timer node allows you to add new timers as well as start, stop and reset any timers you have defined.

---

<div class="post-metadata">

**Author:** ![nnaylor](https://avatars.discourse-cdn.com/v4/letter/n/a9adbd/32.png) [@nnaylor](https://forum.universal-robots.com/u/nnaylor)\
**Post date:** [November 5, 2020, 4:49pm UTC](https://forum.universal-robots.com/t/creating-simple-timer/9660/3 "2020-11-05T16:49:06Z")

</div>

Oops, I meant CB3 and we’re running 3.14. I didn’t even notice the timer function. I’ll have to play around with that and see what I can come up with.

Thank you.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/system/32/1_2.png) [@system](https://forum.universal-robots.com/u/system)\
**Post date:** [December 2, 2020, 3:30pm UTC](https://forum.universal-robots.com/t/creating-simple-timer/9660/4 "2020-12-02T15:30:19Z")

</div>

Closed on December 2, 2020, 3:30pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
