program stop on a line ,cannot come out ; May be is the "Continue" and "Wait sec 0" impact

  • KRC4 KR300 R 2700

    KSS 8.6.9


    The program executes a jog movement, working on external automatic mode .Displays that the replacement brake interrupt(KSS 160) is activated when an exception occurs;

    The program stays on one line and does not continue;

    KRCDiag information was done when the problem appeared;



    First ,maybe the $vel is too small resulting in;but the VEl_min is 1,pos_Rel max is 2; That is not the reason;

    Second ,May be is the "Continue" and "Wait sec 0" impact; But ,no evidence;

    Third, Interrupt Reason;also ,no evidence;




    SkyeFire panic mode





  • ISR :

    DEF STOP_FAST();Stop Interrupt


    INTERRUPT OFF 21


    INTERRUPT OFF 22


    fsdstop()


    FLAG_ISR = TRUE


    $ov_pro = 0


    wait sec 0


    BRAKE


    Irq_Fun()


    RESUME


    END

  • I think that code has way too many continues and that command is being abused to hide any errors that could occur. Which, I suspect, is also what happened here. My guess is that Pos_rel is either undefined or uninitialized and the motion planner is told to create a motion to relative position with an offset of null. But it cannot scream in protest, being silenced by continue.

  • I think that code has way too many continues and that command is being abused to hide any errors that could occur. Which, I suspect, is also what happened here. My guess is that Pos_rel is either undefined or uninitialized and the motion planner is told to create a motion to relative position with an offset of null. But it cannot scream in protest, being silenced by continue.

    First,Thank you!

    But the log file does not see any error message;

    The only exception is that the program cannot continue to run;


    The Pos_Rel is defined and initialized at other files;

    Return to normal after reset

  • First get rid of all those useless Continue commands. You clearly do not get whats causing advance run stops and what not. I do not see any advance run stopping commands apart wait sec 0 and maybe dmg_in if in means input. The continues should be useless anyway because you seem to have a blank line after each continue. Continue if really needed only refers to the direct next line.


    To keep the advance run pointer inside the interrupt move the wait sec to the end of the interrupt.


    Why do you set spline options but do not use spline.


    In general your program needs some cleaning up. If you do it like this its no wonder that its difficult to get whats happening. Strip it down to the absolute necessary and restart from there.


    Fubini

  • holly moly... that is a lot of CONTINUEs... pretty sure that is more than I used in my entire career.


    and they are used incorrectly. pretty awesome display of quantity vs. quality.


    as stated in the the documentation, CONTINUE has an effect only on the very next line of code. and that very next line is actually an empty line in most places. talk about brute force approach, typing something million times rather than reading or testing what the instruction really does... :face_with_open_mouth:


    programs are built incrementally and tested along the way (while the added code and changes are still small).


    as already mentioned, try removing all the continues, cleanup things, shorten the code, read documentation and consider using $STOPNOAPROX to find where advance run stops. those would be the only places where CONTINUE may be added.

    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

  • no idea where those interrupts are declared, but e.g. calling moiton_XYZ() in succession will most likely fail as it only has one motion in it. And if you want to not stop the ARP it will at the very least complain when it loops back on the main run pointer

Advertising from our partners