so i have a program where UR robot creates a targets base on transl of one preplaced target...the program goes in a loop and adds as much targets as you need for a specific application...now i want to put those targets into a Move() inside a program but i need my python program to run through targets and know how many moveL() he needs to create, while for addTarget() i didnt have much problems for because i named targets after number of times the loop played out, meanwhile i cant seem to do the same thing for addMoveL()...here is a picture for better understanding of my problem.
from robodk import robolink # RoboDK API
from robodk import robomath # Robot toolbox
from robodk import * # RoboDK API
from robolink import * # Robot toolbox
RL = Robolink()
robot = RL.Item('UR10e' , robolink.ITEM_TYPE_ROBOT)
prog = RL.Item('PROGRAM' , robolink.ITEM_TYPE_PROGRAM)
for i in range(2):
tt = f'{i+1}'
T = RL.AddTarget(tt+'1')
T = RL.AddTarget(tt+'2')
T = RL.AddTarget(tt+'3')
for i in range(2): #HERE IS THE PROBLEM
tt=(f'{i+1}1')
prog.addMoveL(tt)
prog.addMoveL(tt)
prog.addMoveL(tt)
from robodk import robolink # RoboDK API
from robodk import robomath # Robot toolbox
from robodk import * # RoboDK API
from robolink import * # Robot toolbox
RL = Robolink()
robot = RL.Item('UR10e' , robolink.ITEM_TYPE_ROBOT)
prog = RL.Item('PROGRAM' , robolink.ITEM_TYPE_PROGRAM)
for i in range(2):
tt = f'{i+1}'
T = RL.AddTarget(tt+'1')
T = RL.AddTarget(tt+'2')
T = RL.AddTarget(tt+'3')
for i in range(2): #HERE IS THE PROBLEM
tt=(f'{i+1}1')
prog.addMoveL(tt)
prog.addMoveL(tt)
prog.addMoveL(tt)