# Rtde-control reconnect after emergency stop

**URL:** <https://forum.universal-robots.com/t/rtde-control-reconnect-after-emergency-stop/36598>\
**Category:** General Application Help: How do I?\
**Created:** [October 21, 2024, 9:01am UTC](https://forum.universal-robots.com/t/rtde-control-reconnect-after-emergency-stop/36598 "2024-10-21T09:01:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zzzzzzhao](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/zzzzzzhao/32/6539_2.png) [@zzzzzzhao](https://forum.universal-robots.com/u/zzzzzzhao)\
**Post date:** [October 21, 2024, 9:01am UTC](https://forum.universal-robots.com/t/rtde-control-reconnect-after-emergency-stop/36598/1 "2024-10-21T09:01:13Z")

</div>

Hello, I am currently working with the rtde library on a Linux Ubuntu 20.04 system and developing using VS Code. Due to the lack of some teach pendants, we have created a few functional interfaces for the teach pendants. I am currently encountering the following issue.  
After an emergency stop of the robot arm, I use rtde-control-\>disconnect() to disconnect. This ensures that my interface does not crash. However, I am having problems when using rtde-control-\>reconnect() to reconnect. My first attempt to reconnect always fails, and it is only on the second attempt that I can use the functions of rtde-control.  
I would like to inquire if there is any other method to solve this reconnection issue after disconnection, as it consistently causes my interface to crash. Additionally, I am also unable to successfully call setpayload within rtde-dashboard when operating in remote mode.

ps: Other functions such as moveJ and moveL are working normally.
