Interrupt in Motion

  • 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:



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



    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

  • Place your Ad here!
  • 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.

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

Advertising from our partners