KUKA KRC2 variable speed?

  • Hi mates,

    First of all I am really new programing KUKA, so maybe my question is really basic.

    A client has a KRC2 KUKA with beckhoff devicenet IO, and the want to modify the speed of one LIN or PTP movement of the program by clicking two press buttons, "+" button to increase speed of the movement and "-" button to decrease it.

    I know the basic of programming, but i dont know how to program a KUKA robot. Looking the manuals, I have understood how to create the DEVICENET inputs and outputs tags, but i dont know how to create my variable "speed_wanted" with the result of the pressbutton and place it into the movement.

    Could you help me? Maybe recomend any course to start programming this robots?

    Any help apreciated.

  • Kuka no longer offers KRC2 training so you would need to take equivalent KRC4 courses: Programming1 and Programming2


    you can add in SPS.SUB something like this. just put it in the right place (inside LOOP, wher it says user code)


    IF $IN[1] AND $OV_PRO>0) THEN

    $OV_PRO=$OV_PRO-1

    ENDIF


    IF $IN[2] AND $OV_PRO<100) THEN

    $OV_PRO=$OV_PRO+1

    ENDIF

    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

  • Hmm that is really interesting. I understand that $OV_PRO is a percentaje that multiplies the robot actual speed.

    But for example i have this loop:


    WHILE (EXECUTE_PROG==TRUE)

    PROGRAM_WITH_3_MOVEMENTS( )

    ENDWHILE


    And I only want to modify the speed of the second movement. If I havnt understood it worng, if I write that code into my WHILE loop it will modify the speed of the three movements and once each cycle of three movements. Isnt it?


    PD: Really apreciated your awesome quickly answer

  • in the $Config.DAT declare


    Code
    DECL INT SpeedMoveP1 = 50
    DECL INT SpeedMoveP2 = 25
    DECL INT SpeedMoveP3  = 60



    add all of them to ConfigMin.INI so you can change them while running...


    then write your motions in KRL and assign velocity as you please


    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

  • Hi again, if I have understand you propely, in this movement:


    Code
    ;FOLD PTP ENTRAR_PRENSA2 CONT Vel=100 % PDAT24 Tool[1]:herramienta1 Base[0];%{PE}%R 5.5.33,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:ENTRAR_PRENSA2, 3:C_PTP, 5:100, 7:PDAT24
    $BWDSTART=FALSE
    PDAT_ACT=PPDAT24
    FDAT_ACT=FENTRAR_PRENSA2
    BAS(#PTP_PARAMS,100)
    PTP XENTRAR_PRENSA2 C_PTP
    ;ENDFOLD

    I should add:

    Code
    ;FOLD PTP ENTRAR_PRENSA2 CONT Vel=100 % PDAT24 Tool[1]:herramienta1 Base[0];%{PE}%R 5.5.33,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:ENTRAR_PRENSA2, 3:C_PTP, 5:100, 7:PDAT24
    $BWDSTART=FALSE
    PDAT_ACT=PPDAT24
    FDAT_ACT=FENTRAR_PRENSA2
    VEL_PTP=Speed_Modified
    BAS(#PTP_PARAMS,100)
    PTP XENTRAR_PRENSA2 C_PTP
    ;ENDFOLD

    Is this correct?

    Thanks

  • No, that won't work.


    The issue is that the BAS call sends the value 100 (for the speed) to the path planner. And that '100' is rewritten every time someone does a Change or TouchUp on that point ILF from the pendant.


    Basically, the pendant-taught points are designed to be as simple and easy as possible for a regular operator, but to achieve this the system gives up a lot of higher-level program utility. Tampering with values inside an ILF is a good way to screw things up or have your changes overwritten by the ILF system.


    You'll probably have to use "raw" KRL code as Panic showed.

  • Depends on what you mean.


    The command BAS(#PTP_PARAMS, Velocity) will be "visible" on the pendant, but will not be alterable unless someone knows what they're doing and has sufficient User Group access.


    You could create the variable Velocity and make it controlled from the I/O using the SPS, much like Panic's example for controlling $OV_PRO. Someone who knew how could open the VarCor on the pendant and see the value. It's also possible to change the variable from the VarCor, but if the SPS is constantly re-writing the value based on the I/O inputs, that change would be overwritten within 12ms or so. Not enough time for the robot to actually change speed much.

Advertising from our partners