Z axis offset movement

  • Hello Everybody,


    I am using kuka KRC2 with version of V5.4.14,


    I'd like to make my program using relative movements for z axis, I have to pick somewhere between 500 to 1000 number of sheets which all kept in a single column. The number of the sheets can be interrupt by operator anytime, each sheet has the thickness of 2mm.I have a sensor which is mounted on the gripper for the sheet present feedback.


    I would like to move the robot from a reference point PTP P1 to the down side 2mm,check for the part present feedback if TRUE pickup the sheet or keep going towards down in each 2mm until I get the sensor feedback also it should not go down beyond the last sheet position.


    How do I programme for this,I've found LIN_REL{Z},which makes a relative movement from the actual position.



    Thanks in Advance :smiling_face:

  • Use geometric operater ":"and not lin_rel for this. If user can interrupt movements there are cases where the robot will start the relative move again from the current position where the robot was halted e.g. line selection.


    You want to offset in tool or base decides whether you should use the offset on the left or right side of your target point calculation.


    For the part detection you can use interrupts.


    Fubini

  • Why only a single 2mm step. I thought you had multiple.


    Considering the problem description: Why 2 mm steps at all. If you have a sensor that detects your sheets why not go down until the sensor triggers. In that case you could setup an interrupt to stop the robot when sensor triggers and then go up again a little if needed. Lookup Brake and Resume commands if this is an option.


    Fubini

  • Hai,


    I have been trying on interrupts. I got 2 points P1 and P3, When the robot moves from P1 to P3, if $IN[3] == FALSE THEN I want to stop the robot there and turn on the vacuum.


    Unfortunately the robot still moves to P3 and not jumps to the sub program


    ;SUB Progrm


    DEF GRIP()

    INI


    BRAKE

    INTERRUPT OFF 1

    OUT 11 'VACUUM' State = TRUE

    WAIT Time=1 Sec

    RESUME

    END


    Can anyone suggest why this is happening, Kindly correct me if I am doing wrong logic here.

  • in the past i had similar necessity



    the users of this forum help me , i do some changes to the program and work correctly.

  • also this post can be useful:


  • How is the interrupt declared?


    It would be helpful if you posted the actual code of the main program, the search-motion program, and the interrupt service routine. Use code boxes.

  • How is the interrupt declared?


    It would be helpful if you posted the actual code of the main program, the search-motion program, and the interrupt service routine. Use code boxes.

    Hai Skyefire and Panic mode,


    many thanks for your reply,


    kindly find the code.


    when the input IN[9] == true ,the subprogram grip () is not been called.

  • Line 6 contains motion to be interrupted. This motion must be moved to a subprogram . Also add in that subprogram something to stop advance run, like


    Code
    DEF SEARCH()
      PTP P3
      WAIT SEC 0
    END


    and in your existing program replace the line 6 to


    Code
    SEARCH()

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Interrupt DECL should be in top-level program, Interrupted motion should be in a sub-program (which needs to end with WAIT TRUE or some other command that breaks the Advance Run Pointer). See example:


    if $IN[3] == FALSE THEN I want to stop the robot there and turn on the vacuum.

    when the input IN[9] == true ,the subprogram grip () is not been called.

    Are you using $IN[9] or $IN[3]? Is the Interrupt supposed to fire on the Input going True or False?


    Note: Interrupts only fire on edge transitions of the condition. This means that, if you have:

    GLOBAL INTERRUPT DECL 10 WHEN $IN[9]== TRUE DO GRIP( )

    Interrupt 10 will only fire when $IN[9] changes from False to True.

    This means that if $IN[9] is already True when the INTERRUPT ON command executes, the Interrupt will not fire until $IN[9] becomes False, and then True again. Your program should include a check of the $IN before executing INTERRUPT ON.

Advertising from our partners