The difference between main run and advance run

  • Hi guys.
    I don't understand the difference between main run and advance run. For example:


    $TOOL - Tool coordinate system relative to the flange coordinate system in the main run
    $TOOL_C - Tool coordinate system relative to the flange coordinate system in the advance run


    I know about advance running, but I can't understand, for example, what is the difference between $TOOL and $TOOL_C in terms of main run and advance run.


    May somebody help me to understand? ???

    Edited once, last by lomaxe ().

  • Put simply (perhaps oversimplified), the Main run pointer follows the motion the robot is currently executing, and the Advance pointer is how many motions the robot path planner is looking ahead.
    The Holy Grail of most robot motion programs is to blend every motion seamlessly into the next. But in order to do this, the motion planner must be able to look ahead of the motion it is currently carrying out -- under some circumstances, it may be necessary to look several moves ahead. In KUKAbots, the number of moves the Advance pointer runs ahead of the Main pointer is controlled by the system variable $ADVANCE, which is allowed to be set from 0 to 5, with a default value of 3.
    If $ADVANCE is set to 0, the robot will be unable to blend one motion into the next, and so will come to a complete (albeit very brief) halt at every motion point, before it evaluates the next motion and begins it.
    Since any motion point can have different speed, Base, Tool, etc than the motion before or after it, these changes are one of the things the Advance pointer covers. So most of the system variables that end in _C are connected to the Advance pointer, where the variable with the same name is connected to the Main pointer.
    For most programmers, this all takes place in the background, and has little visible effect. The one big issue in dealing with the Advance pointer is that, while it runs ahead of the Main pointer by $ADVANCE number of motion steps, any non-motion commands (Inputs, outputs, math calculations, etc) between the two pointers can either "break" the Advance pointer -- preventing it from getting past that logic until the Main pointer catches up -- or, with the use of CONTINUE statements, allows those lines of code to be executed ahead of where they are programmed, relative to the Main pointer. This can be useful, but can also be dangerous -- for example, using CONTINUE carelessly could lead to a robot sending a "clear of zone" signal before the point where the signal was actually intended to be set, leading to collision risks. So for actions that need to be explicitly tied to certain motion points, while avoiding any breakage of the Advance pointer, TRIGGER commands are used.

  • Only a small correction:


    Quote

    $TOOL - Tool coordinate system relative to the flange coordinate system in the main run
    $TOOL_C - Tool coordinate system relative to the flange coordinate system in the advance run


    Quote

    So most of the system variables that end in _C are connected to the Advance pointer, where the variable with the same name is connected to the Main pointer.


    Actually it is the other way: _C (C stands for current meaning the one corresponding to the move you currently see the robot perform) is main run and without _C is the advance run version.


    Fubini

  • Hi,

    Lets say $ADVANCE = 3

    The robot passes a couple of positions with different velocity and accelerationparameters.


    P1 (VEL 0.5)

    P2 (VEL 1)

    P3 (VEL 1.5)


    If $VEL and $VEL_C is monitored, will they still show the same or what will be the difference?

  • They will not be the same. $vel will be ahead of $vel_c. $vel shows the velocity of the motion command in advance run. vel_c the velocity in main run. The advance run reaches p3 earlier as main run. So as soon as the advance run reaches the motion $vel.cp line setting 1.5 the value of $vel will show 1.5. If main run is behind 2 motions and the robot is currently on the way to p1 the value of $vel_c will still be 0.5 at the same time when $vel already is 1.5.


    If we assume for the sake of simplicity that it takes advance run 1.25 seconds to prepare each motion and main run 2.0 seconds to execute each motion then you would see the following after pressing start+:


    At time 0.0 $vel becomes 0.5

    At time 1.25 $vel becomes 1.0

    At time 1.25 $vel_c becomes 0.5

    At time 2.5 $vel becomes 1.5

    At time 3.25 $vel_c becomes 1.0

    At time 5.25 $vel_c becomes 1.5


    Fubini

Advertising from our partners