Interrupt in Rapid

  • Hello to the members..

    i am working on a drilling spindle which can sense the object using load indicator, a touch will generate current rise, which is used as interrupt signal in the rapid code. the point of touch will be the starting point of the moveL in trap routine.

    below is the rapid code for the drill:


    VAR intnum intload

    PROC main ()

    IDelete intload;

    Connect intload WITH Drilling;

    ISignalDI , Control_Drill, 1,intload;

    Set Spindle_on; “Bit to power up Spindle”

    MoveJ p10, v100, Fine, Tool1;

    MoveL p20, v100, Fine, Tool1;

    Set Enable_On; “Spindle Start Rotating at reference speed”

    Wait Time 2; “Time to reach desired rpm and get smooth in terms of current”

    MoveL OFFs (P20, 0, 0, 50), V10, Fine, Tool1;

    ! Interrupt should occur here as the drill bit touches the surface before reaching 50mm Z-Axis and DI “Control_Drill” sets high. Robot should go to P40.

    Reset Enable_On;

    MoveL p30, V10, Fine, Tool1;

    Reset Spindle_on;

    End PROC

    TRAP Drilling

    VAR Robotarget p40

    StopMove/ Quick;

    P40:= CRobT ( \Tool := Tool1 \ WObj := WObj0);

    MoveL OFFs (p40, 0, 0, 30), v10, Fine, Tool1;

    ClearPath;

    StartMove;

    ExitCycle;

    End TRAP

  • my problem is, in auto-mode robot directly goes to TRAP Routine at P40, and got stuck there, even if the DI is not set high.

    I also used "SearchL" command instead of "MoveL". the robot goes to p40 and got stuck there after Di is set high.

    i looked for "StorePath" and "RestorePath" commands in my teachpendant commands list but could not found.

  • thanks for reply.

    Sir, with SearchL the robot goes to the interrupt trap and store the position of Touch point. but robot got stuck there.


    SearchL Control_Drill, p40, OFFs( p20, 0, 0, 50), Fine, Tool1;

    !robot execute the command, and store the position data in p40.


    TRAP Drilling

    StopMove/ Quick;


    MoveL OFFs (p40, 0, 0, 30), v10, Fine, Tool1;

    !Robot stuck here at MoveL command. and not executing the command.

    ClearPath;

    StartMove;

    ExitCycle;

    End TRAP

    any help...

  • Sir, i tried the SearchL option without any trap routine, but robot still stop at "MoveL" command after the "StopMove/Quick" command. and stays their.

    Could be the reason "Storepath" and "RestorePath" are missing in the code.

    also not present in my Tech.Pendant..

  • have you checked if the signal is not already high before the cycle starts?

    I would put a waitDI before connecting the interrupt.


    then in my opinion more correct inside the trap:

    StopMove

    ClearPath;

    WaitTime 0.3;

    StartMove;

    pMemPos: = CRobT (\ Tool: = tTool1);

    MoveL Offs (pMemPos, 0,0,50), v200, fine, tTool1;

Advertising from our partners