1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Interrupt in Motion

  • daxter
  • September 29, 2017 at 9:08 AM
  • Thread is Resolved
  • daxter
    Trophies
    3
    Posts
    1
    • September 29, 2017 at 9:08 AM
    • #1

    Hello to all, sorry for my bad english...

    I have a problem using an interrupt.
    On the robot I have a system of anti-collision, if It intervene, I must stop and go backward.
    This is the function:

    Code
    INTERRUPT DECL 4 WHEN $IN[27]==TRUE DO ROADAFTERCOLLISION()
    
    
    INTERRUPT ON 4
    FOR contaPunti=1 TO (totalLandingPos)         
    CRASH_POINT=contaPunti
    XAUX_GOING_PTP=landAxisPos[contaPunti]
       ;FOLD PTP AUX_GOING_PTP Vel=100 % AUX_GOING_PTP;%{PE}%R 8.2.20,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:AUX_GOING_PTP, 3:, 5:100, 7:AUX_GOING_PTP
       $BWDSTART=FALSE
       PDAT_ACT=PAUX_GOING_PTP
       FDAT_ACT=FAUX_GOING_PTP
       BAS(#PTP_PARAMS,100)
       PTP XAUX_GOING_PTP C_PTP 
       ;ENDFOLD
    ENDFOR
    
    
    INTERRUPT OFF 4
    Display More

    So i have an other function, in another file .src:

    Code
    DEF RoadAfterCollision()
    
    
    INT ContaPunti
    
    
    ;----- TEST
    ;XAUX_POINT_PTP = $AXIS_INT
    ;BRAKE
    ;WAIT SEC 0.5
    ;RESUME
    ;----- TEST
    
    
    ;FOLD INI;%{PE}
      ;FOLD BASISTECH INI
        GLOBAL INTERRUPT DECL 3 WHEN $STOPMESS==TRUE DO IR_STOPM ( )
        INTERRUPT ON 3 
        BAS (#INITMOV,0 )
      ;ENDFOLD (BASISTECH INI)
      ;FOLD USER INI
        ;Make your modifications here
    
    
      ;ENDFOLD (USER INI)
    ;ENDFOLD (INI)
    
    
    ;=================================
    ;===== ROAD AFTER COLLISION ======
    ;=================================
    
    
    
    
    TEST_IT=TRUE
    
    
    FOR ContaPunti=1 TO (CRASH_POINT-1)        
    XAUX_POINT_PTP=departAxisPos[CRASH_POINT-ContaPunti]
    ;FOLD PTP AUX_POINT_PTP Vel=100 % AUX_POINT_PTP;%{PE}%R 8.2.20,%MKUKATPBASIS,%CMOVE,%VPTP,%P 1:PTP, 2:AUX_POINT_PTP, 3:, 5:100, 7:AUX_POINT_PTP
    $BWDSTART=FALSE
    PDAT_ACT=PAUX_POINT_PTP
    FDAT_ACT=FAUX_POINT_PTP
    BAS(#PTP_PARAMS,100)
    PTP XAUX_POINT_PTP C_PTP 
    ;ENDFOLD
    ENDFOR
    
    
    WAIT SEC 5
    
    
    RETURN
    
    
    END
    Display More

    When my input 27 goes to 1 then the robot goes wrong and tells me that there is a programming error. I release the interrupt while the robot is moving, I tried to add the BRAKE and RESUME instructions, but without success.

    Do you have any idea?

    Thanks a lot in advance and if there are some unclear points tell me as well. Thanks again

  • Online
    SkyeFire
    Reactions Received
    1,039
    Trophies
    12
    Posts
    9,375
    • September 29, 2017 at 7:15 PM
    • #2

    Programming error? WHAT programming error, SPECIFICALLY? Does the error occur during compilation, or execution?

    First thing to do, is remove everything from RoadAfterCollision() from the ;FOLD INI to ;ENDFOLD (INI). You don't want that stuff in an interrupt-called program.

    Interrupt routines cannot end with RETURN.

    BRAKE and INTERRUPT OFF 4 should be at the top of the interrupt routine. RESUME should be at the end.

  • hermann
    Reactions Received
    404
    Trophies
    9
    Posts
    2,595
    • September 30, 2017 at 12:04 PM
    • #3

    You should start a search in the forum for "RESUME" and You will find many examples.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download