I am working on a program that will control a string of movements that will allow the program to call a point and have the robot safely move there from another point, working its way through intermediate points.
Example: Robot is at P1 but needs to move to P5. To get there it needs to move through P2 and P4 but can skip over P3 safely (assume they are in order). The way I have it setup currently is that the program calls the function name and inputs the desired position (1-10) and the robot runs a series of case statements that will move the robot around. The moves are called in a sub program just to keep the main one a little cleaner.
My question is, can I set the movement variables (acceleration, speed, base) once per run of the sub program and have it work for any of the points. Or do I have to have the variables set directly before each movement?
moveCall (movePos:IN, type:IN)
IF type == 1 THEN
IF type == 0 THEN
PTP P1 C_DIS