RoboDK Forum
How to determine the time duration per instruction?可打印版本

+- RoboDK Forum (//www.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK API (//www.sinclairbody.com/forum/Forum-RoboDK-API)
+--- Thread: How to determine the time duration per instruction? (/Thread-How-to-determine-the-time-duration-per-instruction)



How to determine the time duration per instruction?-Maarten-07-21-2022

Hi, how can I determine the time duration that an instruction will take according to simulation?

E.g. I have a program with a few move instructions, I would like to determine the required move time for each separate instruction.

Related: can I separately execute the simulation of an individual instruction that is part of a program, and get a notice when done? If so, could I then use robodk.robomath.tic() and robodk.robomath.toc() before and after to measure the passed simulation time?

Best regards,

Maarten


RE: How to determine the time duration per instruction?-Sam-08-03-2022

Hi Maarten,

You can get an estimate for the whole program using the API://www.sinclairbody.com/doc/en/PythonAPI/robodk.html?highlight=update#robodk.robolink.Item.Update
I do not know of a built-in way to get a per-instruction estimate.

You can add a program call in between instructions to a Python script that logs the time, but this in itself will change the cycle time.

You can also monitor the robot and log the joints and timings, see this example://www.sinclairbody.com/doc/en/PythonAPI/examples.html#monitor-joints