User will input through flex pendant only after that robot should come and weld the part

Hi All, 

In our application we have several welds to be made and the requirement is that soon after the first weld robot will go to home position and it needs to stay there, until user gives input through flex pendant to go-ahead with next weld. 

So basically the code should allow the user to decide when to weld. Wait time option is not suitable as the time interval between weld is not constant and this will vary between welds. 

It would be great help if someone can guide us for this requirement (from code perspective).

Thanks & Regards

Comments

  • jmf
    jmf South Africa
    Have a look at Test Case and TPReadFK in the Rapid Instructions, Functions and Data Types Manual.

    Example 1 (Test Case)

    TEST reg1 

    CASE 1,2,3 :

    routine1;

    CASE 4 :

    routine2;

    DEFAULT :

    TPWrite "Illegal choice";

    Stop;

    ENDTEST


    Example 2 (TPReadFk)

    VAR errnum errvar;

    ...

    TPReadFK reg1, "Go to service position?", stEmpty, stEmpty, stEmpty, "Yes","No"

    \MaxTime:= 600

    \DIBreak:= di5\BreakFlag:= errvar;

    IF reg1 = 4 OR errvar = ERR_TP_DIBREAK THEN

    MoveL service, v500, fine, tool1;

    Stop;

    ENDIF

    IF errvar = ERR_TP_MAXTIME EXIT;