Why set up interrupt for IR_STOPM in every module?

  • When I create a module in WorkVisual (KSS 8.2), the software generates these lines in the INI section:


    ;FOLD BASISTECH INI
    GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
    INTERRUPT ON 3
    BAS (#INITMOV,0 )
    ;ENDFOLD (BASISTECH INI)


    I see from other posts on this forum that IR_STOPM is called when the robot faults during a move.
    And I understand from the manual that the first two lines in the snippet above declare and activate the interrupt.


    What I don't understand is why the interrupt would be declared and activated in every module.
    The same code snippet is in cell.src. So the interrupt routine (IR_STOPM) should already be declared and activated by the time any motion is commanded in some other module.


    I thought perhaps the interrupt must be "reloaded" after each triggering event. But I didn't see anything to that effect in the manual.


    I also see in the ir_stopm source that I can add instructions to be executed as the robot stops in response to the fault. I found nothing in the Programming for Integrators manual to indicate that I should even be aware of the stop routine. Same with the P00 and BAS routines: they are used in many places in the Kuka code, yet I cannot find one word about them in the integrator's manual. (I only know about ir_stopm.src because I saw a reference to it in another post.)


    Is there some other place I should be looking for an overview of how the system works? Or am I missing something obvious in the Programming for Integrator's manual? Or does Kuka let us figure this stuff out by accident?

  • AD
  • It's legacy stuff, like Windows 7 still supporting DOS commands in the command line window.


    KRL started as a real "programmer's language," for people who understood FORTRAN, C, etc. The original intent was that programmers would write complex code offline, then import it to the robot and then fill in the motions using the teach pendant. It was, dare I say, a very German take on programming.


    But when KUKAbots began selling into markets who wanted their robots programmed by people with no real education or training, changes had to be made. KUKA was loathe to change their established system, so they added a layer to the user interface to allow people with minimal training to create modules and edit them using menu-driven controls on the pendant.
    But in order to guarantee that all possible failure conditions were covered, creating a User type module always generated an INI folder at the top which contained, among other things, a fresh Declaration of Interrupt 3. Since re-declaring an Interrupt is harmless in KRL, there was no real motivation to try and eliminate the redundancy.


    In WorkVisual now, I assume it's a carryover to maintain compatibility with pre-8.x KRL being imported into KRC4s.

  • The attempt to cater to programmers who do not know high level languages probably explains the removal of a bunch of information from the manuals. But in that case, why allow program edits in WorkVisual? If one is going to allow "expert programming", then one ought to provide "expert documentation".

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now