Hello!
Lets say that I have some code that looks like this:
def main_function()
$advance = 5
SomeMovements()
TellComputerWhereRobotIsGoing()
end
def SomeMovements()
ptp p1 c_ptp
ptp p2 c_ptp
ptp p3 c_ptp
ptp p4 c_ptp
ptp p5 c_ptp
end
Display More
The idea is that the function TellComputerWhereRobotIsGoing() sends a messsage to the PC about where the robot's final target is. Since the advance value is set to 5, this means that the robot program should send the coordinates of p5 to the pc while the robot is still moving towards p1. Is there a good way of doing this? Is there a system variable that holds the coordinates of the last target in the list of queued targets? I could of course just insert a "wait sec 0", and wait until the robot stops at the final target, but I don't want to do that.
Any good ideas? I would like to have the whole functionality inside TellComputerWhereRobotIsGoing(), so that rules out modifying SomeMovements().
Thanks in advance!