Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding 'Pause Instruction' to python code for 'Load CSV file'
#1
Hi all,

I am using the example python code provided by RoboDK 'Load CSV file' to create a series of points the robot is to go to. After each of these points I would like to add in a Pause Instruction for, say, 3.5 seconds. I am using a UR10 robot. When I extract the program when I add this feature in the software after I import the python code, the program code for this is 'sleep(3.500)'. Would anyone know if I can add this instruction in automatically after each xyz position in the python code? And if so, would you be able to advise me on this?

Thanks in advance,
Lauren


Attached Files
.py   xyzlist_01.py (Size: 3.22 KB / Downloads: 103)
#2
Hi Lauren,

Yes, you can add a pause in your program with something like this:

Code:
program.MoveL(target) # move to a target
program.Pause(time_ms)  # add a pause (units in milliseconds)

More information and examples here:
https://robodk.com/doc/en/PythonAPI/robo...Item.Pause

The AddProgram description has a more complete example.

Albert
#3
Hi Albert,

This works perfectly, thank you. I had not came across the robolink Module help page/document before, thanks for the link!

Thanks,

Lauren
  




Users browsing this thread:
1 Guest(s)