RobotStudio event

Synchronisation with logical instructions

Hi,

I would like to please you to take a thing about this code:

....

PROC Testor(robtarget point)
 VAR robtarget ActualPoint;
 VAR num Height := 100;
 
 MoveJ t_HelpPoint1, vmax, z100, GreiferWObj:=Tester;
 MoveJ Conc, t_HelpPoint2, vmax, z50, GreiferWObj:=Tester; 
 ActualPoint := point;
 ActualPoint.trans.z := ActualPoint.trans.z + Height;
 MoveJ Conc, ActualPoint,vmax,z10,GreiferWObj:=Tester;
 ActualPoint := Align(point); !User function
 MoveL ActualPoint,v150,fine,GreiferWObj:=Tester;
 Greifer close; ! User routine
 ActualPoint := point;
 ActualPoint.trans.z := ActualPoint.trans.z + Height; 
 MoveJ ActualPoint,vmax,z10,GreiferWObj:=Tester;
 RETURN;
ENDPROC

For thoose which know that the program pointer is faster than robot and logical instructions below move instructions are executed in some cases earlier than the robot comes to positions, I want to ask this:

Will the variable ActualPoint have correct value in all cases or will this variable be rewritten with new value sooner then robot will came to programmed positions? I think no. I tried to simulate it and it seems to be OK but I would like to have some technical explanation.

Martiner2007-3-20 13:20:19

Comments

  • Hi
    A fine point will stop ahead program execution so in your code ActualPoint will have the correct value.
    Per Svensson
    Robotics and Vision Specialist
    Consat Engineering
  • This I know but as you can see ActualPoint at line 4 can be overwritten by ActualPoint at line 6.
  • Hi Mariner

    My opinion is that the position is passed as a value to the Move function, so the fact you change the value of ActualPoint after the execution of the Move is irrelevant.
    In fact:

    MoveLconc, p, v1000,z10,tool0;
    p.x:=p.x+100;
    MoveL p, v1000,fine,tool0;

    is the same of

    MovelConc, p, v1000, z10, tool0;
    Movel Offs(p,100,0,0), v1000, z10, tool0;

    The important value is the one that p has in the moment in which the CPU "drinks" the instruction. Next, you can do what you want with your variables, the already queued movements will not change anymore.

    Ciao
    Claudio