User`s guide
5 Interrupt Support
xPC Target Interrupts
In this section...
“Introduction” on page 5-2
“Interrupt Processing in the x PC Target Environment” on page 5-2
Introduction
If your device supports interrupts, you can use the procedures in this chapter
to add your custom interrupt functions to the xPC Target framework.
Your users can use interrupts in x PC Target applications in one of the
following ways:
• Use the interrupt with the xPC Target Async IRQ Source block to execute a
function-call subsystem when an interrupt occurs.
• Use the interrupt to run the model in place of the timer interrupt, available
through the model Configuration Parameters dialog box in the Real-Time
Workshop > xPC Target options pane.
Note Although users can use interrupts inoneoftwoways,youprogramfor
these interrupts using the same procedure, as described in “Adding Interrupt
Support” o n page 5-7. However, before you start programming the interrupts,
see “Interrupt Processing in the xP C Target Environment” on page 5-2 for a
description of the flow of xPC T arget interrupt processing.
Interrupt Processing in the xPC Targ et Environment
When a model executes, it executes in the following order:
1 Call all mdlSt art routines in block execution order.
2 Call the Start function, if one exists.
3 All
ow background graphics and network tasks to run until an interrupt
oc
curs.
5-2