# Step By Step Program control

**URL:** <https://forum.universal-robots.com/t/step-by-step-program-control/14392>\
**Category:** Product Wishlist\
**Created:** [May 19, 2021, 7:19am UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392 "2021-05-19T07:19:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon1947322](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon1947322](https://forum.universal-robots.com/u/anon1947322)\
**Post date:** [May 19, 2021, 7:19am UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/1 "2021-05-19T07:19:05Z")

</div>

Step by Step Program Control

Should be able to run the program line by line, it would make it easier to diagnose faults in the program then having to keep running the program till the fault occurs

because the pop up fault in the script or code is not very descriptive and being able jog upto the issue will be able to find the problem faster

---

<div class="post-metadata">

**Author:** ![nik](https://avatars.discourse-cdn.com/v4/letter/n/6de8d8/32.png) [@nik](https://forum.universal-robots.com/u/nik)\
**Post date:** [May 19, 2021, 11:04am UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/2 "2021-05-19T11:04:49Z")

</div>

You can do that by adding “pauses” to the program by clicking the line numbers. If you do this with every line you can step through each of the “paused” lines.

---

<div class="post-metadata">

**Author:** ![anon1947322](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@anon1947322](https://forum.universal-robots.com/u/anon1947322)\
**Post date:** [May 19, 2021, 11:29am UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/3 "2021-05-19T11:29:38Z")

</div>

ok my next suggestion if that’s the case, Have the option to pause all lines of the program so u can untick as you go. It would be tedious having to pause 500 lines off program.

---

<div class="post-metadata">

**Author:** ![anon507564](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@anon507564](https://forum.universal-robots.com/u/anon507564)\
**Post date:** [May 19, 2021, 1:30pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/4 "2021-05-19T13:30:49Z")

</div>

You can single step through most parts of a program without adding pauses. It doesn’t seem to work in my pallet nodes (shaded blue) but just about everything else works.

When your program starts (or gets close to the area you want to step through), hit the PAUSE button on the bottom of the screen. That will enable the button next to it (between the PAUSE and STOP buttons). Click that middle button and it will step to the next node. Press that same button every time you want to step.

See image.

 ![45465465](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/2/2928ce8315e32095637c19547229cf12ddd848c9.jpeg)

---

<div class="post-metadata">

**Author:** ![jhh](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jhh](https://forum.universal-robots.com/u/jhh)\
**Post date:** [May 20, 2021, 2:33pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/5 "2021-05-20T14:33:26Z")

</div>

If you’re using version 5.6+ you can add break-points and single step programs, see [Release note Software version 5.6.x.x (universal-robots.com)](https://www.universal-robots.com/articles/ur/release-notes/release-note-software-version-56xx/)

---

<div class="post-metadata">

**Author:** ![anon507564](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@anon507564](https://forum.universal-robots.com/u/anon507564)\
**Post date:** [May 20, 2021, 2:38pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/6 "2021-05-20T14:38:03Z")

</div>

I mentioned how single-stepping doesn’t work inside a pallet process. The release notes you posted do not mention any limitations.

Are there other things that will prevent single stepping?

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [September 29, 2021, 2:09pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/7 "2021-09-29T14:09:49Z")

</div>

Single stepping also pauses any threads which as far as I can tell don’t restart until you run the prog as normal!

this is really difficult if your trying to test code that reacts to an event inside a thread

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [November 11, 2021, 8:16am UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/8 "2021-11-11T08:16:43Z")

</div>

> [@nik](#):
>
> You can do that by adding “pauses” to the program by clicking the line numbers. If you do this with every line you can step through each of the “paused” lines.

You cant add Pauses inside If Statements!  
I have a program with nested if statements and it almost impossible to see what’s happening. adding a step by step function would really be a big help.  
All major Robot manufacturers have this function and it makes life so much easier.

> [@anon507564](#):
>
> You can single step through most parts of a program without adding pauses. It doesn’t seem to work in my pallet nodes (shaded blue) but just about everything else works.
> 
> When your program starts (or gets close to the area you want to step through), hit the PAUSE button on the bottom of the screen. That will enable the button next to it (between the PAUSE and STOP buttons). Click that middle button and it will step to the next node. Press that same button every time you want to step.

The Pause button is also ineffective because again it doesn’t pause within a function like an if statement it just runs the whole thing!

---

<div class="post-metadata">

**Author:** ![anon507564](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@anon507564](https://forum.universal-robots.com/u/anon507564)\
**Post date:** [November 11, 2021, 2:40pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/9 "2021-11-11T14:40:31Z")

</div>

> [@m.hammerton](#):
>
> The Pause button is also ineffective because again it doesn’t pause within a function like an if statement it just runs the whole thing!

Add popups in the script that stop the script. Oldest trick in the scripting book. 😉

Also, if you put the popups in another if statement you can turn them on and off with one switch (my-de-bugging = true)

---

<div class="post-metadata">

**Author:** ![m.hammerton](https://avatars.discourse-cdn.com/v4/letter/m/b2d939/32.png) [@m.hammerton](https://forum.universal-robots.com/u/m.hammerton)\
**Post date:** [November 11, 2021, 3:11pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/10 "2021-11-11T15:11:43Z")

</div>

> [@anon507564](#):
>
> Add popups in the script that stop the script. Oldest trick in the scripting book. 😉
> 
> Also, if you put the popups in another if statement you can turn them on and off with one switch (my-de-bugging = true)

Yes That is unfortunately the only way around it!  
Just another frig rather than a nice solution.

---

<div class="post-metadata">

**Author:** ![anon507564](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@anon507564](https://forum.universal-robots.com/u/anon507564)\
**Post date:** [November 11, 2021, 3:42pm UTC](https://forum.universal-robots.com/t/step-by-step-program-control/14392/11 "2021-11-11T15:42:00Z")

</div>

Yeah, well… Count your blessings. You could be stuck using using Polyscope AND GibbsCam like me. 😝
