Not-Aus

  • Ich betreibe meinen Roboter im Automatik-Extern und möchte eigentlich nur erreichen, das nach (bei) einem Not-Aus (Leistung wieder eingeschaltet, MOVE_ENABLE wieder da, usw.) das aktuelle Programm abgebrochen wird und keinerlei Bewegung stattfindet (auch kein Rückpositionieren). Leider habe ich es bis jetzt nicht hinbekommen. Zur Zeit ist im Cell der Interrupt für das Abbruchprogramm deklariert.
    Vielleicht hat von Euch jemand eine Lösung.

  • Schritt für Schritt zum Roboterprofi!
  • Zitat

    Ich ... möchte eigentlich nur erreichen, das nach ... einem Not-Aus ... das aktuelle Programm abgebrochen wird ...


    Was meinst du mit "abgebrochen"? :nocheck:

    Kontrolle ist eine Illusion, denn niemand weiss was als nächstes passiert.

  • Hallo,
    fuege doch in ir_stopm.src einen resume ein, und schau dass der Interrupt 3 bloss im cell.src deklariert ist.
    Gruss elias

    IF ROBOTER_STEHT AND SPS_VORHANDEN THEN<br />&nbsp; WHILE NOT ROBOTER_LAEUFT<br />&nbsp; &nbsp; &nbsp; $LOOP_MSG[]=&quot;SPS IST SCHULD!&quot;<br />&nbsp; ENDWHILE<br />&nbsp; $LOOP_MSG[]=&quot;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<br />ENDIF<br /><br />Geld ohne Arbeit! Keine Arbeit ohne Geld!

  • I do like so:


    ;FOLD USER INI
    ;abort_program is an eingang from PLC
    INTERRUPT DECL 1 WHEN abort_programG == TRUE DO ABORT( )
    ;ENDFOLD (USER INI)


    DEF pack( )
    ;in loop to facilitate aborting, it should never really loop
    WHILE part_countG < target_countG


    IF abort_programG == TRUE THEN;put this IF block between each of your moves
    EXIT
    ENDIF


    PTP XP1;1st move


    IF abort_programG == TRUE THEN
    EXIT
    ENDIF


    PTP XP2;2nd move


    IF abort_programG == TRUE THEN
    EXIT
    ENDIF


    PTP etc.....


    IF abort_programG == TRUE THEN
    EXIT
    ENDIF


    part_countG = part_countG + 1; so it is = target_countG and does not loop


    ENDWHILE
    END


    ;abort current program;
    DEF ABORT ( )
    BRAKE F ;as fast as possible
    RESUME
    END; of abort_


    viel Glueck
    JimT

  • Wenn du das Programm komplett zurücksetzen möchtest, also wie im Menü "Bearbeiten"-"Programm zurücksetzen" kannst du folgenden Code in der SPS.SUB verwenden.


    Code
    CWRITE($CMD,STAT,MODE,"STOP 1")  ; Stoppt das laufende Programm im Roboterinterpreter
    CWRITE($CMD,STAT,MODE,"RESET 1")  ; Setzt das Programm im Roboterinterpreter zurück (nur wenn Programm gestoppt ist)

    Kontrolle ist eine Illusion, denn niemand weiss was als nächstes passiert.

  • Hallo alle,
    ich wuerde als Einzigem dem Vorschlag von Elias folgen. Auf genau die selbe Weise stoppt Kuka den Programminterpreter bei Notaus - und die Sache funktioniert.
    Warum muss man das rad neu erfinden???


    Gruss Stefan

  • noch was - der Interrupt muss natürlich global deklariert sein.
    Der interrupt muss eine Ebene tiefer als Cell eingeschaltet werden (Da resume dafuer sorgt, dass der Programmlaufzeiger in die Ebene zurückspringt, in der der Interrupt declariert wurde). In der Interreuptroutine sollte als erstes ein Vorlaufstop ausgeloesst werden (Wait sec 0 oder $Advance=0) - sollte aber bei IR_StopM.SRC der Fall sein. dann sollte der Interrupt abgeschaltet werden (wgn. Entprellen).


    Viel Erfolg Stefan

  • Mit dem Resume im ir_stopm.src habe ich aber immer noch nicht verhindert, das er auf das Rückpositionieren besteht. Das bedeudet für mich, wenn er Rückpositionieren will muß ich in den Handetrieb gehen und das Programm abwählen und neu starten.

  • Das Rückpositionieren wird in der ir_stopm.src gemacht.
    Dort musst du nur den Befehl: PTP $AXIS_RET im Fold "BASIS RESTART" auskommentieren.

    Kontrolle ist eine Illusion, denn niemand weiss was als nächstes passiert.

  • Wie ich das Rückpositionieren unterdrücken kann, ist mir schon klar. Nur dummerweise kommt trotzdem im Meldungsfester Rückpositionieren und der Roboter läßt sich nicht weiter im Automatik-Modus bewegen.

  • Hallo Alle,
    I have been trying to do Elias' stop method to my program, I would like to be able to do it as it is a much more elegant way to achieve a stop.
    But I am too much of a neuling to Kuka to get it to work. :nocheck:
    Could someone please explain it in more detail?
    thanks in anticipation
    Jim

  • Hey Jim,


    take a closer look at the ir_stopm.src file:


    In there is a USER STOP Fold for your application to come to a controlled stop, followed by a BASIS STOP section handling the KUKA needs and waiting for a restart. After that you see the BASIS RESTART with repositioning and all that stuff, so the robot ist ready to proceed. In the next section, called USER RESTART you can set the parameters to start your application again.


    Now keep in mind: this all happens only in case of an emergency stop and/or $STOPMESS changing to TRUE.


    If you are monitoring an other condition, you have to use your own interrupt routine, like you do.
    Except that you should be able to get ride of the "nasty" IF statements.
    Now here comes the trick: declare the interrupt in the main program that calls your (example-) sub routine and the resume statement exits your subprogram automatically! But beware! Your program will continue with the point in the main program that follows your subroutine call! danger of crash!


    Hope that helps a bit :dadr:

Erstelle ein Benutzerkonto oder melde dich an um zu kommentieren

Du musst ein Benutzerkonto haben um einen Kommentar hinterlassen zu können

Benutzerkonto erstellen
Neues Benutzerkonto für unsere Community erstellen. Geht einfach!
Neues Benutzerkonto erstellen
Anmelden
Du hast bereits ein Benutzerkonto? Melde dich hier an.
Jetzt anmelden