02-25-2019, 04:46 PM
You can use更新on a program to retrieve useful program information, including travelled distance and estimated time. More information here:
So you can do something like:
So you can do something like:
Code:
from robolink import *
RDK = Robolink()
program = RDK.ItemUserPick('Select a program to get estimated travel distance', ITEM_TYPE_PROGRAM)
if not program.Valid():
quit() # the user cancelled the selection
[n_instructions, program_time, program_distance, valid_ratio, readable_msg] = program.Update()
RDK.ShowMessage('Estimated travel distance is %.1f mm' % program_distance)