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

How to load a large number of targets using the API

#1
Hi All,

I am using the python API to generate a robot program. Adding a large number of targets using the API is very slow. When running RoboDK on Ubuntu it is so slow that it is unusable (it takes more than an hour to add 60k targets).
  • I have RDK.Render(False) and program.ShowInstructions(False) and have also tried RDK.Command("ApiUpdateAlways",False)
  • In order to try and speed things up I am not adding the targets to the scene but immediately adding them to the program using the following command program.MoveL(matrix)
  • I have set RDK.Command("ApiUpdateAlways","0") and RDK.Command("API_NODELAY", "1") but this doesn’t seem to make any difference.

I switched to windows and it is much faster. However if I want to run the script multiple times to generate multiple programs I need to restart RoboDK everytime otherwise it is very slow.

What can I do to make performance on linux similar to windows?
What are best practices / tips and tricks to add a large number of targets as fast as possible.

Thank you in advance,
Vincent
#2
To properly apply the No Delay option you can try the -API_NODELAY command line option on the Robolink instance when you create it on Python and before you open RoboDK. 

For example:
Code:
RDK = Robolink(args = "-API_NODELAY")
This will pass the No Delay parameter to RoboDK and set the no delay on the Python socket:
Code:
RDK.COM.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
#3
Thank you Albert
  




Users browsing this thread:
1 Guest(s)