# RTDE script stop

**URL:** <https://forum.universal-robots.com/t/rtde-script-stop/32205>\
**Category:** Technical Questions\
**Created:** [January 18, 2024, 6:08am UTC](https://forum.universal-robots.com/t/rtde-script-stop/32205 "2024-01-18T06:08:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gargsonu0414](https://avatars.discourse-cdn.com/v4/letter/g/6de8d8/32.png) [@gargsonu0414](https://forum.universal-robots.com/u/gargsonu0414)\
**Post date:** [January 18, 2024, 6:08am UTC](https://forum.universal-robots.com/t/rtde-script-stop/32205/1 "2024-01-18T06:08:04Z")

</div>

Hello,

I am building my own SDK using RTDE. In a separate thread (let’s call it t1) I keep a check of whether rtde control interface is connected or not. In another thread (t2) I issue move commands, inverseKinematics commands etc. If rtde control interface is  
disconnected by any chance t1 raises a flag and commands in t2 will not be executed.

I observe that if an unreachable pose is give to a move command the rtde script stops, however the rtde control interface is still connected.

I have two questions:

1. Should I keep a check on let’s say robot status parameter in a new thread t3 to see if script is running or not (I noticed robot status changes from 3 to 1 if the script stops)? Is there a better way to deal this issue?

2. To reupload the script there are two ways I can think of a) use the reupload function in script client b) disconnect the control interface and reconnect it again. Which one is suggested? And how can I close the pop up “RTDE script not running…” on the teach pendant using SDK?

Thanks in advance!
