Issues with using global interrupt properly in Auto External mode

  • Hi guys,

    I am using KSS 8.6 END V6



    I am trying to create a global interrupt that will initiate a recovery.src in my cell( interrupt 20). it should be always running.

    i have a few questions regarding it.



    1) I am trying to replicate and have placed my own interrupt below it, at first.

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

    INTERRUPT ON 3

    but my global interrupt does not seem to work,


    2) if it is global interrupt, why is this line declared, being written in every .src file that is created.


    3) would a .sub be better suited for this?

    if so, i tried calling the file but get $ACC-AXIS variable write-protected in module BAS, line 411.

    I tried searching in the forum to find a solution but i do not understand it fully.


    Thanks for your help.

  • If the Interrupt is DECL'd in CELL.SRC, it gets "inherited" by every routine that CELL calls, and every routine those routines call. GLOBAL is not required for that.


    The reason that Interrupt 3 is DECL'd in the INI Fold of every module created using the default template, is because KUKA was trying to make a simple template that would work for all use cases. And re-DECLing an Interrupt doesn't do any harm.


    3) would a .sub be better suited for this?

    if so, i tried calling the file but get $ACC-AXIS variable write-protected in module BAS, line 411.

    I tried searching in the forum to find a solution but i do not understand it fully.

    It would help if we had any idea what you're trying to do with $ACC_AXIS. As a general rule, motion-controlling variables cannot be modified from inside the SPS, as those variables are "owned" by the Level 1 Interpreter (the Interpreter that the robot motion programs are executed in).

  • If the Interrupt is DECL'd in CELL.SRC, it gets "inherited" by every routine that CELL calls, and every routine those routines call. GLOBAL is not required for that.


    The reason that Interrupt 3 is DECL'd in the INI Fold of every module created using the default template, is because KUKA was trying to make a simple template that would work for all use cases. And re-DECLing an Interrupt doesn't do any harm.


    It would help if we had any idea what you're trying to do with $ACC_AXIS. As a general rule, motion-controlling variables cannot be modified from inside the SPS, as those variables are "owned" by the Level 1 Interpreter (the Interpreter that the robot motion programs are executed in).

    Hi Skyefire,


    I made positioning monitoring (SPS) that will record the robots positions to text file.


    I am trying to get the INTERRUPT to initiate the recovery.SRC to get it back home after IN[18] is true.

    my recovery.SRC has following:

    $AXIS_ACT: to PTP to itself before homing(to prevent BCO to home)

    SPTP P[i] WITH $VEL_AXIS[1] = SVEL_JOINT(10.0) C_Spl

  • If the Interrupt is DECL'd in CELL.SRC, it gets "inherited" by every routine that CELL calls, and every routine those routines call. GLOBAL is not required for that.


    The reason that Interrupt 3 is DECL'd in the INI Fold of every module created using the default template, is because KUKA was trying to make a simple template that would work for all use cases. And re-DECLing an Interrupt doesn't do any harm.


    It would help if we had any idea what you're trying to do with $ACC_AXIS. As a general rule, motion-controlling variables cannot be modified from inside the SPS, as those variables are "owned" by the Level 1 Interpreter (the Interpreter that the robot motion programs are executed in).

    Below is my declaration of interrupt 20 in my CELL. i checked in my INPUT/OUTPUTS -> DIGITAL OUTPUTS and my di_bInitRecoveryfrmPLC is being switched ON correctly.

    Interrupt_test ( ) just has the following:

  • you cannot do that... it is not how interrupts work. there are limitations.

    your ISR routine cannot contain things like INI fold. so you need to remove lines 2-13 from Interrupt_Test()

    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

  • you cannot do that... it is not how interrupts work. there are limitations.

    your ISR routine cannot contain things like INI fold. so you need to remove lines 2-13 from Interrupt_Test()

    have deleted as you said and tried again

    Code
    &ACCESS RV
    DEF  Interrupt_test ( )
    
    MsgNotify("In read_CSV file",,)
    END

    I still am not able to see MsgNotify turn up.


    Could my interrupt is triggered by IN[18] which is ON when i press ESTOP and then Press RESET in my PLC. Could ESTOP interfere with the interrupt?

  • interrupts are not level sensitive, they are edge sensitive. so if condition is already true, interrupt will not be triggered.

    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

Advertising from our partners