FOR code in KUKA

  • Hello, i have products it seems straight metal sheet their heights are 5mm, i have box which has this metal sheets, i want TL get sheets and put the other area, i will repeat this 1000 10.000 times maybe.


    Top of product's height from the ground is 1000mm, this sheets Putted on Top on each other so lower sheet's height from the ground is nearly 10mm


    How can i do robot's pick point get lower per lap?


    Probably i have to use for loop but how?


    **İ know the long way is typing 1.000.000 lime codes but what is shortcut?:thinking_face:

  • This is pretty simple. This example assumes you have hand-taught the Pick position for the top item in the stack, in Base 1, with the Base's -Z axis pointing down. The variable rPartThickness is assumed to be set to how thick each sheet metal sheet is.

    However, a FOR loop may not be a good way to do this -- everything has to be inside the loop, including your moves over to the Dropoff area. A better way would be to use a counter variable, and increase it by 1 every time you pick a sheet. Then your Pick routine and Drop routine (and other routines, like Move Home, Move To Maintenance, etc) can be separated.

  • **İ know the long way is typing 1.000.000 lime codes but what is shortcut?:thinking_face:

    shortcut to typing 1000000 lines of code is reading 300 page manual :winking_face:


    if you are sure of product thickness and tight tolerances, you may compute pick point as you go - one per pick... or calculate all of them before you start.

    but while this can work, it is very inflexible without feedback.


    for calculation look up geometric operator or palletizer code samples


    for feedback, lookup up search with interrupt (RESUME command)

    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



  • I only need this example, How can i do? What i need about code statement?



    Ground to sheet height:

    1000mm

    Pick

    Process..



    995mm

    Pick

    Proces..



    990mm

    Pick

    Process..



    985mm

    Pick

    Process..



    980mm

    Pick

    Process

    .

    .

    .

    .



    10mm

    Pick

    Process..



    5mm

    Pick

    Process..





    END

  • 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

  • thank you i will try

  • Oh...this is too much products and difference. I used to work in a project that's up to 10 unstable roofs with one gripper.at first,I've tried to use forloop with num=num -1 .but it was a changed num..it was damn to teach operator to change the num.sol used interrupt.trigger with part sensor.but it didn't work well as l imagine .you know it can't run farst oR it will occur bad collision...so l set the OV =5%:neutral_face::neutral_face:...maybe you could ref my bad exp:tired_face:

  • You can put one laser sensor on the gripper that detects the part at a distance and use interrupt to reduce the speed for the last 100mm maybe.

Advertising from our partners