# Socket\_open() issue

**URL:** <https://forum.universal-robots.com/t/socket-open-issue/7470>\
**Category:** URScript\
**Created:** [May 28, 2020, 2:42pm UTC](https://forum.universal-robots.com/t/socket-open-issue/7470 "2020-05-28T14:42:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mvrooij](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/mvrooij/32/2151_2.png) [@mvrooij](https://forum.universal-robots.com/u/mvrooij)\
**Post date:** [May 28, 2020, 2:42pm UTC](https://forum.universal-robots.com/t/socket-open-issue/7470/1 "2020-05-28T14:42:16Z")

</div>

Dear,

I use socket\_open() to connect to a remote PC. I first launch the PC program, then I switch on the robot and start my script. Quite often, the script just stops running. It’s because the socket\_open() times out after 2 seconds. On some days, it works on the first try on others I have to re-start 5 or 6 times.

I can, of course, write a little loop that checks the result of socket\_open(), but there’s 2 issues: 1) I also have an older UR5 with URscript that doesn’t return a result for socket\_open() (only later versions do) and 2) I just want to understand why the problem occurs so I can solve the problem, rather then treat the symptoms…

Thanks.
