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.
Not-Aus
- BIM
- Erledigt
-
-
Zitat
Ich ... möchte eigentlich nur erreichen, das nach ... einem Not-Aus ... das aktuelle Programm abgebrochen wird ...
Was meinst du mit "abgebrochen"?
-
Das ich wieder im Cell() bin.
-
Hallo,
fuege doch in ir_stopm.src einen resume ein, und schau dass der Interrupt 3 bloss im cell.src deklariert ist.
Gruss elias -
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_countGIF abort_programG == TRUE THEN;put this IF block between each of your moves
EXIT
ENDIFPTP XP1;1st move
IF abort_programG == TRUE THEN
EXIT
ENDIFPTP XP2;2nd move
IF abort_programG == TRUE THEN
EXIT
ENDIFPTP etc.....
IF abort_programG == TRUE THEN
EXIT
ENDIFpart_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.
-
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. -
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.
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
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