Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Set timeout value


I'm using the python API to generate a program which is quite long. Often it will timeout before its written to disk. See output below. Is there any way to increase the timeout value? I couldn't see anything in the docs or preferences window. 



#     RL.ShowRoboDK()
#   File "/Applications/RoboDK/", line 846, in ShowRoboDK
#     self._check_status()
#   File "/Applications/RoboDK/", line 286, in _check_status
#     status = self._rec_int()
#   File "/Applications/RoboDK/", line 418, in _rec_int
#     buffer = self.COM.recv(4)
# timeout: timed out #
Hi Julian,

What function do you use before calling ShowRoboDK?

You could do something like this to change the default timeout (10 seconds):

from robolink import *

RDK = Robolink()

# Change the default timeout here, in seconds:
RDK.TIMEOUT = 30 # in seconds

# ...

Hi Albert,

Thanks for this. I think the last function before the timeout is:
My code builds a large program with subprograms in RoboDK, and then writes it to disk, all while the UI is in a hidden state as it seems to be much faster. When a timeout occurs, I find the program is finished but nothing was written to disk.

I will try your suggestion.  Thanks again!

Hi Albert,

I think I found the line that was giving me headaches. 

It was being called while RoboDK was minimized and I think that was the cause of the crash, which gave a timeout message. If this is the case I won't need to go back to a previous version either :)


Hi Julian,
This command can take a long time if you have a large program. I recommend you to hide the instructions before you start building your program.
Thanks Albert. 

I also found it builds the program fast if I hide the UI. And I think the problem was, I was using ShowInstructions while minimized.

So I guess the best order is:

1. Create the program.
2. Set program.ShowInstructions(False).
3. Hide the UI.
4. Add all the instructions.
5  Show the UI.

I was also wondering if there's a way to collapse and expand a frame in the outline panel with python? I have up to 20 frames containing hundreds of targets each, so I'd like them to appear in a collapsed state.

Many thanks

Hi Julian,

We just released a new update that allows you to expand/collapse items in the tree the following way:

# Start the RoboDK API
from robolink import *
RDK = Robolink()
item = RDK.Item('Frame 1')        # Retrieve an item with some child nodes
item.setParam("Tree","Expand")    # Expand the child nodes:
item.setParam("Tree","Collapse")  # Collapse the child nodes:

Make sure to download the latest version (at this moment, Windows only):


Users browsing this thread:
1 Guest(s)