RobotStudio event

Interrupt Priority

Hello everyone,



Is it possible to have interrupts of different priorities? If the program is currently executing an interrupt I am wanting to allow a higher priority interrupt to override the first(lower) interrupt. If it is possible, could someone please post a short bit of code demonstrating this.

Else is there another work-around for this situation?



Many Thanks,

Ben

Comments

  • Hi Ben,
     

    I've tried this in RS, but a interrupt wil always be handled first, after finishing the trap it will continue with a later interrupt. However, if you have some multitasking on the robot, you might have the possibilily to build your own interrupt. Depends also what you will like to do with the higher priority interrupt.
  • There are some instructions like IDisable and ISleep and Single and Safe switches that offer some control of interrupt behavior, but at the user level all interrupts are of the same priority, they are placed in a queue and handled in the order that  they are added, FIFO. I don't think there is any way at the user level to flush the interrupt queue, but certain actions of the system like moving PP to main, change from manual to auto, will do that. Usually this is not desirable behavior.
    Russell Drown
  • Thank-you both for your replies. This is what I thought.

    I've since managed a work-around for this particular robot, but will have multi tasking on my next project which would help tidy this up.



    Thanks again,



    Ben