Nested interrupts

dragolollo
dragolollo Italy
edited April 22 in RAPID Programming
Hello,
Is it possible to have nested interrupts? I would like to be able to detect an interrupt inside another interrupt (I've tried and looks like it's not possible but myabe I'm doing something wrong).
Thank you.
Tagged:

Comments

  • Micky
    Micky Germany ✭✭✭
    Hello,
    Interrupts are queued in the interrupt queue and processed one after the other.
    That means, as long as a TRAP routine is processed, the other routines in the queue remain untouched. Only when the TRAP routine is finished, the next interrupt routine is processed.

    For this reason, you should avoid wait-instructions or long-running trap routines, since these may also interfere with the normal program flow.

    Furthermore, the size of the interrupt queue is limited, so that the error message "Interrupt queue full" appears, if always new interrupts occur but the queue is not emptied.

    Based on the above summary, I would say nested interrupts are not possible in RAPID. Maybe you should use multitasking.

  • dragolollo
    dragolollo Italy
    Thank you for your answer! I think you are right; furthermore, I've noticed that if a trap routine is running and another interrupt occurs in the meanwhile, at the end of the trap execution the trap related to the new interrupt will not be executed.
  • Micky
    Micky Germany ✭✭✭
    Hello,
    there seems to be something wrong with your program because new interrupts are always queued, and as soon as a TRAP routine is finished the next TRAP routine should be executed.
Sign In or Register to comment.