I have code which is calling sub programs. The motion takes place in the sub programs. I have two motions which I want to sync up as a constant move (no stopping). Is there a good way to ensure this? Is KRL with KRC4 even capable of this? I have not been able to do this yet. I can easily do it if all of the code is in the same sub program.
example of code:
def sub-program1()
decl e6pos myposition
initialize mypsoition
base = base_data[x]
tool = tool_data[x]
lin myposition c_vel
end
def sub-program 2()
decl e6pos myposition2
initialize mypsoition2
base = base_data[x]
tool = tool_data[x]
lin myposition2 c_vel
end
There is of course other code in those sub programs. The main program would call sub program 1, then call sub program 2. I realize the obvious answer is to do this motion back in the main program that way I can get the constant velocity (no stopping between points) to work. I do not want to do it this way, however. This motion is a straight line. My code does work if I do all of the motion in the main program. The robot is capable of doing a c_vel here: the commanded speed is not too fast to get a way with a c_vel.
I am using manually programmed positions, not taught positions. Could this work if I used taught positions instead?
Any ideas or thoughts?