# Servoj URScript (abrupt final motion)

**URL:** <https://forum.universal-robots.com/t/servoj-urscript-abrupt-final-motion/8644>\
**Category:** URScript\
**Tags:** urscript, servoj\
**Created:** [September 2, 2020, 1:41pm UTC](https://forum.universal-robots.com/t/servoj-urscript-abrupt-final-motion/8644 "2020-09-02T13:41:32Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![anon59108369](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@anon59108369](https://forum.universal-robots.com/u/anon59108369)\
**Post date:** [September 14, 2020, 1:06pm UTC](https://forum.universal-robots.com/t/servoj-urscript-abrupt-final-motion/8644/11 "2020-09-14T13:06:37Z")

</div>

@ajp  
First of all thank you very much for all the help, your replies help me a lot move forward with my project.

1. Robot.command is an object that comes from the following source, which allows for RTDE communication with the robot using python  
[Python 3 library to communicate with robot](https://forum.universal-robots.com/t/python-3-library-to-communicate-with-robot/461)
2. I understand now what you meant.  
Just to make sure. When I run my trajectory planning code, a set of 6 joint values is generated (different at each time t). I should run a loop that passes the output of my trajectory planning into servoj allowing it to follow that motion. That’s very similar to what I did but you are not using time increments instead you are saying to pass it to the input\_double\_registers and only trough them to the command servoj (which will assure that values are not skipped)

How can I create a loop condition? Before I had it to stop after some predefined time was reached, but how can I write the execution loop when using RTDE? (what will be the stopping condition?)

If you have any examples that would be priceless, if not I will manage

---

_[View the full topic](https://forum.universal-robots.com/t/servoj-urscript-abrupt-final-motion/8644)._
