BRAKE, RESUME, continues path and RESUME point

  • Hello


    I am using a program which is included with an external STOP key. The stop key goes into an interrupt and then BRAKE. After the problem is solved, the command RESUME is used to continue the work...

    BUT

    After Braking and then again RESUME, the robot will just go directly to the last point of the continues path and the other points and path in between are ignored. Based on user manual, I expected that it continues from the next point not the end of the path.

    Can anyone help about the reason and how to solve it?

  • BRAKE means "pause what ever you are doing now but ... you can continue later when ok... unless when abandoning what you are doing by using RESUME command"


    RESUME command means "abandon/skip whatever you are doing now.... and resume main program" this overrides BRAKE so anything you are doing now is ... ignored and forgotten.


    in this case term "main program" is relative. this is not necessarily the top level program, it is the program level where interrupt is DECLARED.


    for example, lets imagine that you have top level program called prog1(), which calls prog2() as subprogram, and prog2 calls prog3 etc.


    prog1() -> prog2() -> prog3() -> .... -> prog10()


    supposedly you declare interrupt in prog3() and that interrupt uses RESUME command. if the interrupt is triggered and as a result RESUME command is processed... everything after prog3() is ignored. so it does not matter where (how deep in subprograms) the instruction pointer really is (prog4, prog5, prog6, ... prog10), RESUME will cause ALL of the to be skipped/abandoned and instruction pointer will jump back to prog3() because that is where this interrupt was declared. in fact it will go to line directly after call to prog4(). all child processes (suprograms) are killed/abandoned and "main program" is resumed (from interrupts perspective that is prog3 because that is where it is declared) .


    and this is the reason why interrupts using RESUME command requires that code to be abandoned is in a subprogram, not in the "main" program where interrupt is declared (prog3 in this case). if RESUME command is executed while instruction pointer is back to prog3, program will crash and error will be displayed. this is why one must make sure that advance run pointer does not leave subprograms while interrupt is active and this is why interrupt need to be disabled right after that call to prog4


    if not using RESUME, there is no reason to put part of the code into subprogram.

    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 for your clear answer. You can write a new expert manual for KUKA. :grinning_face_with_smiling_eyes: Kuka user manual is really describing some times much more complicated than it is.

    Just the remaining question is that, do I need to do anything before returning from the BRAKE subprogram (except RESUME which I shouldn't have used clearly)? In the expert manual it is not clear if it is required or NOT. However, I will give it a shot and test it on the robot.

  • Thank you for your clear answer. You can write a new expert manual for KUKA. :grinning_face_with_smiling_eyes: Kuka user manual is really describing some times much more complicated than it is.

    Just the remaining question is that, do I need to do anything before returning from the BRAKE subprogram (except RESUME which I shouldn't have used clearly)? In the expert manual it is not clear if it is required or NOT. However, I will give it a shot and test it on the robot.

    I tested and it works perfectly without RESUME.

    A note to everybody, DON'T USE RESUME!!

    It is really a dangerous command. It is a kind of GOTO but worse because you don't know exactly where is the program line going to.


    Good Luck.

    Edited once, last by saeid ss ().

  • no, don't say that... RESUME is an awesome command but like all instructions it need to be used CORRECTLY..

    all instructions are great and valuable but that does not mean that each of them should be used in EVERY application.

    if you were using interrupt to search for something, this is THE way to do so.

    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,


    As new programmer I try to understand Interrupts completely.


    I'am working on a measuring system where i have to measure multiple points on a part. thes have to be measured quite exactly so I use interrupts. Problem is that i lose a lot of time by the brake -resume commands


    Is there a solution not stopping on the interrupt but directly changing the movement to a new position


    thanks in advance

  • As new programmer I try to understand Interrupts completely.


    I'am working on a measuring system where i have to measure multiple points on a part. thes have to be measured quite exactly so I use interrupts. Problem is that i lose a lot of time by the brake -resume commands

    BRAKE should only be used when you want the robot to physically stop at each interrupt. RESUME should only be used if you want to terminate the motion that was active when the Interrupt fired.


    You haven't really described what exactly you're trying to accomplish.


    The second section of the example program might be what you need.

  • The movements i make is in red, to measure the edges of the black part. after edge trigger i want to move directly (green) to the next (red) measure path without stopping.


    Important to the green movements is that those go asap back on the part ( top is slightly bended ) . then I follow the slow height changes by 'RSI' to restart measuring in C or E


    Measuring is done by a fast optical distance sensor who sends a separate trigger signal when passing over a edge

  • ..

    Is there a solution not stopping on the interrupt but directly changing the movement to a new position

    ..

    How do You want to change the movement into a different direction without stopping? :thinking_face:

    That's physically impossible, you always get a velocity of zero when changing the path to nearly the opposite direction.

  • My Paint skills are not extreme high :winking_face:


    What i look for is the fastest way in making this measurement. the green return to the part may also be an other path or maybe I can make the red lines under some angle to make the turn easier...


    Is it possible to avoid the physical stop?

  • Thanks for you reaction buth the poblem is that between 2 and 3, i can't follow the height difference on the top side of the part.


    some of the parts that have to be picked have a thickness of 8mm and the height difference can be more than that

    Also, there is no information about the part underneath, so the next can be bigger than the one i have to measure. So it is important to stay on the part as much as possible to let the robot follow the height difference tom make a difference between the slope and the edge.


    Foto is not 8mm parts but gives an idea what has to be processed


  • I'am working on a measuring system where i have to measure multiple points on a part. thes have to be measured quite exactly so I use interrupts. Problem is that i lose a lot of time by the brake -resume commands

    RESUME is needed is one does not know how far robot can go safely without colliding with something.

    if you are measuring known parts, there is no surprise where and how large part is .

    in other words there is no need for RESUME. you can create program motions to be smooth and decelerate near measure points but move faster elsewhere.

    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

  • Thanks for you reaction buth the poblem is that between 2 and 3, i can't follow the height difference on the top side of the part.

    what height difference? top side seem to be flat and you are sensing edges...


    some of the parts that have to be picked have a thickness of 8mm and the height difference can be more than that

    so you need sensor with resolution better than 8mm. don't see what the problem is.


    Also, there is no information about the part underneath, so the next can be bigger than the one i have to measure.

    why are you trying to measure parts below? just stick to part on top. once that part is removed, measure next one that is on top...


    So it is important to stay on the part as much as possible to let the robot follow the height difference tom make a difference between the slope and the edge.

    creating solution is not just programming... it also involves selecting correct sensor for the job and calibrating it correctly. i was using laser sensors to detect edges many times and on different products (including reflective surfaces like metal sheets). in one case measurement was done from considerable distance (some 700mm). in another, sheets were pretty thin (2.5mm) and possibly very long (up to 5m). considering cases like those, finding edges of some short and 8-12mm thick particle boards seem to be very straight forward.

    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

  • What I understood,

    You have a sensor for measuring the edges or length. You want to move to the edge and then without wasting time go to the next measurement. True?

    Well, as panic said, the solution is through using Resume but test your program in slow speed 100 times!

    Before movement, you should enable the interrupt and in the interrupt function you should use the command Resume. You don't need to define the green pathes, because they really don't exist. The resume takes the robot to the next start point.

    you should get confidence that the path in between is clear for the robot to go without any obstacle.

    If the dead measurement time is not that much, I would avoid using Resume command.

Advertising from our partners