Stopping a tool , if a programme stops -

  • Hi all ,


    I have a problem with stopping a tool (extruder ) controlled by IOs . I use my KUKA as a 3d printer . we have a issue where if the robot stops itself because of an issue (like it crashed because the print has moved ) the robot stop , this is good but the extruder will keep pushing out plastic like nothing has happened . this is a big problem (i can show you the picture but its not pretty )


    Can anyone please help , i have tried the below but it did not work : SPS.sub


    IF NOT $ALARM_STOP THEN


          IF NOT haspulsed THEN


    haspulsed = TRUE


           PULSE (STOP_KILL, TRUE,2) ***stop the motor (not in the real code)****


           PULSE ($OUT[3], TRUE,2) **** (Stops the heater) *****


          ENDIF


       ELSE


    haspulsed = FALSE


       ENDIF

  • Full SPS :


  • First of all, which controller and robot are you using?

    One solution could be to edit the interrupt 3 program which is always run when there is $ALARM_STOP = 1. Inside WorkVisual just find any program, probably the main running one should have it (the first one the sub calls). Then find the Global Interrupt declaration with priority 3. Inside that program you can always just put that it resets the $OUT[]'s which control the extruder and temperature.

    Another solution would be to put something like this inside the SPS.sub:
    IF $ALARM_STOP THEN
    $OUT[] = FALSE
    ...
    ENDIF
    but that depends on sub interpreter then, I prefer to use the interrupts and keep the SPS clean and with as little code as I possibly can, as the SPS.sub file's runtime depends even on the empty lines inside of it.

  • Hardware : KRC4 8.3

    KR22 R1610


    Can seem to find :


    Quote

    interrupt 3 program


    if the ( IF $ALARM_STOP THEN $OUT[] = FALSE ) is used correctly should this send a signal if anything makes the robot stop due to an error ?

  • No..... Read the documentation.


    $alarm_stop tells if emergency stop is ok.... That is one of many things that could be stopping program.

    If you want to know if program is stopped, check if - program is stopped.


    Edit - hermann beat me to it

    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

  • Can seem to find :

    The interrupt program declaration should be a line as follows, located in every .src file, namely in CELL.src, which for me is the main program running the robot movement commands

    Code
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3 

    You might be able to edit the IR_STOPM() program in order to make it stop your extruder by running whatever stopping instruction you have.

    if the ( IF $ALARM_STOP THEN $OUT[] = FALSE ) is used correctly should this send a signal if anything makes the robot stop due to an error ?

    In my examples above I just assumed that $OUT[] == TRUE means that your extruder is ON, and the corresponding output being FALSE means that the extruder is OFF. That is logical to me, but however your extruder works you can simply replace the $OUT[]=FALSE (what I called resetting the output) with your stopping instruction for the extruder and anything else you want stopped. Also, my above post was wrong, it should read IF $ALARM_STOP==FALSE THEN ... (since the $ALARM_STOP==TRUE means that there is no alarm stop)


    Also this:

    I wouldn't use $alarm_stop but $pro_act to trigger the pulses. That works always when program stops, even with no alarm but a 'normal' stop.

  • btw using EStop to stop program is brutal. it is like driving a car into a wall because you needed to stop.

    also when posting code, please use code tag. this makes thing much cleaner and allows us to comment on code by referring to line number.

    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 all ,


    I added a CELL.SRC file as suggested . Please see my coded I added :


    Code
      GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
      INTERRUPT ON 3 
      BAS (#INITMOV,0 )
      
      IF $pro_act THEN 
         PULSE (STOP_KILL, TRUE,2)
         PULSE ($OUT[3], TRUE,2)
         
         Endif



    I as understood even if I cancelled/ stopped the programme $pro_act would run . After testing I could not get it to stop extrusion . Note is there a way to simulate a error ?



    Thanks guys I'm sure I'm missing something simple .

  • I see you have not understood me properly. I was talking about two different options for you:


    1. Edit the interrupt program IR_STOPM() (or whichever name it is on your machine, the 'it' being the interrupt program declared as global with priority 3, your main .src file, whichever its name be, must have such an interrupt, so go find it, and you yourself cannot declare interrupts with priority 3, that is not allowed). The edit would be to include the following lines of code for you (if I understand those are the lines of code which stop the heater and the extruder):

    Code
    PULSE (STOP_KILL, TRUE,2)
    PULSE ($OUT[3], TRUE,2)

    This way whenever there is a stop message on the robot, that is, an error, the extruder and the heater will stop.


    2. The second option is to add the lines of code which you have added (with a twist for adding NOT or ==FALSE) to the .sub program:


    Code
    IF $PRO_ACT==FALSE THEN
        PULSE (STOP_KILL, TRUE,2)
        PULSE ($OUT[3], TRUE,2)
    ENDIF

    This way whenever a process is not active on the robot, regardless of if there is an error, the extruder and the heater will receive your stop commands.


    These two options (1. and 2.) can be used at the same time, but that is not needed.

Advertising from our partners