multypass program

  • hello,
    I´m programming with a kr16 controlled by krc2.
    I'm doing a multipass program for welding application.simply I want to repeat the cycle between two points 50 times but increasing the height one millimeter on each pass. normally I program in fanuc and in that case it is done by PR but in KUKA i don´t know how . i have programmed the loop and cycle counter but if someone could tell me how to increase height 1 mm each pass between P1 and P2 please? the code that I have scheduled is this:


    MULTIPASS.DAT


    DECL INT COUNTER=0


    MULTIPASS.SRC


    INI
    PTP HOME=10% DEFAULT


    LOOP
    PTP P1 VEL=10% PDAT1 TOOL[1] BASE[0]
    PTP P2 VEL=10% PDAT1 TOOL[1] BASE[0]
    PTP HOME=10% DEFAULT
    COUNTER=COUNTER +1
    IF COUNTER==50 THEN
    EXIT
    ELSE
    ?????????????????????
    ENDIF
    ENDLOOP


    PTP P3 VEL=10% PDAT1 TOOL[1] BASE[0]
    COUNTER=0


    Thank you

  • Hi potibo83,


    I'm not trying this code, but it is posible looks like this;


    INI
    PTP HOME=10% DEFAULT


    ;TCP IS NEAR AT WELDING POSITION WITH P4
    PTP P4 VEL=10% PDAT1 TOOL[1] BASE[0]


    COUNTER=0
    REPEAT
    PTP P1 VEL=10% PDAT1 TOOL[1] BASE[0]
    PTP P2 VEL=10% PDAT1 TOOL[1] BASE[0]

    XP1.Z=XP1.Z+1
    XP2.Z=XP2.Z+1

    COUNTER=COUNTER +1
    UNTIL COUNTER>=50


    PTP P3 VEL=10% PDAT1 TOOL[1] BASE[0]
    END

  • Easiest way to do this is to create a Base that has one axis (say, Z) perfectly aligned with the "layering" effect you want to create, then manipulate the Base inside your FOR loop. Something like:

  • thanks to both of you. It works well. but in the ceyhan´s option when i restart the program again P1 and P2 are not in the original hight point. They are positioned at the last point of passage.

  • You have to include a means to "undo" the changes when you start a new part. You'll note that in my example, I set $BASE (a dynamic variable) to BASE_DATA[1] (a static variable), and then perform all my changes to $BASE. BASE_DATA[1] is never tampered with, and as such always serves as the initial start point for a fresh part.

Advertising from our partners