# Robot always starts at beginning of program

**URL:** <https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173>\
**Category:** Technical Questions\
**Tags:** bugs\
**Created:** [April 25, 2019, 11:41am UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173 "2019-04-25T11:41:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.briedenhann](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chris.briedenhann](https://forum.universal-robots.com/u/chris.briedenhann)\
**Post date:** [April 25, 2019, 11:41am UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/1 "2019-04-25T11:41:06Z")

</div>

**Software version** : 3.8  
**Robot generation** : CB3UR5

Is there any reason why the robot cannot continue to run from the middle of the program  
once it had been stopped.

The program is always starting at the beginning.

Thanks

---

<div class="post-metadata">

**Author:** ![inu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/inu/32/732_2.png) [@inu](https://forum.universal-robots.com/u/inu)\
**Post date:** [April 25, 2019, 2:06pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/2 "2019-04-25T14:06:03Z")

</div>

Hello @chris.briedenhann,

Depending on the stop condition, the robot may not be able to start from where the stop was initiated. For example, protective stops may work like a pause, but an E-Stop is seen as a violation and requires you to restart the program form the beginning.

You could build in logic to your program and have different starting points based off of flags you setup if you wish to create your own error recovery routines. You can find out more on the subject [here.](https://www.universal-robots.com/articles/ur/programming/creating-a-safe-home-routine/)

It may be worth contacting your local UR rep as well to discuss the nature of the stops and the application to make sure the robot is functioning as it should and there aren’t any underlying issues.

---

<div class="post-metadata">

**Author:** ![chris.briedenhann](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chris.briedenhann](https://forum.universal-robots.com/u/chris.briedenhann)\
**Post date:** [April 25, 2019, 2:31pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/3 "2019-04-25T14:31:31Z")

</div>

Thanks for the feedback.

The robot is functioning as it should, no problem there, it is just very annoying that the robot cannot run from anywhere in the program. I am doing sealer application and whenever a modification is made to the program, I need to step to every point for the rest of the program instead of just hitting the play button like any other robot.

Thanks

I

---

<div class="post-metadata">

**Author:** ![inu](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/inu/32/732_2.png) [@inu](https://forum.universal-robots.com/u/inu)\
**Post date:** [April 25, 2019, 2:48pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/4 "2019-04-25T14:48:47Z")

</div>

Gotcha, that makes sense.

My best suggestions would probably be to monitor your current position, and throw some logic in place that skips through sections of your code depending on the location values you are monitoring. So if you stop in a certain x/y/z position you know you are at a certain quadrant of the part, etc…

There really isn’t a clean solution, but maybe others here have some different suggestions based off of what they have seen in the past.

---

<div class="post-metadata">

**Author:** ![chris.briedenhann](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chris.briedenhann](https://forum.universal-robots.com/u/chris.briedenhann)\
**Post date:** [April 25, 2019, 3:39pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/5 "2019-04-25T15:39:41Z")

</div>

I did a feature request for this topic as well, hopefully it will be solved in the next update, this is really a issue that needs to be solved.

Thanks

---

<div class="post-metadata">

**Author:** ![prichlin](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@prichlin](https://forum.universal-robots.com/u/prichlin)\
**Post date:** [April 25, 2019, 4:21pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/6 "2019-04-25T16:21:16Z")

</div>

@chris.briedenhann  
Can you modify the logic [here](https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/start-program-from-where-it-was-stopped-15385/) to fit your application?

---

<div class="post-metadata">

**Author:** ![chris.briedenhann](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@chris.briedenhann](https://forum.universal-robots.com/u/chris.briedenhann)\
**Post date:** [April 29, 2019, 12:01pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/7 "2019-04-29T12:01:16Z")

</div>

This code is fine for a simple pick.place application, I have a sealer application that moves into very tight spaces on the car.

Thanks

---

<div class="post-metadata">

**Author:** ![anon74278050](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@anon74278050](https://forum.universal-robots.com/u/anon74278050)\
**Post date:** [May 1, 2019, 6:01pm UTC](https://forum.universal-robots.com/t/robot-always-starts-at-beginning-of-program/4173/8 "2019-05-01T18:01:45Z")

</div>

Hi,

I had the same problem. I still wish we could use the stop to pause and recover but it will not occur soon.

I simply managed a little more “my code” using “Switch Case” structure.

This way, I start by entering the “switch” and go to the “case” matching where is the next code I need to process or that is logical to use.

It is almost analogue to using a Grafcet to manage the high level sequence.

Find more detail on my DoF post : [Starting a UR Program where you want. — DoF](https://dof.robotiq.com/discussion/1606/starting-a-ur-program-where-you-want)

Regards,

David Gouffé

Integration Coach

Coach en intégration

Robotiq is now into packaging, palletizing and sanding applications. Learn more about our [new Vacuum Grippers and the Robotiq Sanding Kit.](https://blog.robotiq.com/robotiq-vacuum-sanding-launch)

1-888-ROBOTIQ #275 (762-6847)  
1-418-380-2788 #275 (Outside US and Canada)  
1-418-655-9221 (Cell)
