xPC Target |
 |
CAN-AC2 (ISA)
The CAN-AC2 is an ISA-board, and the hardware interrupt line is set by means of hardware jumpers on the board. Refer to the Softing user manual of the board on how to set a certain interrupt line. Select an interrupt line, which is not used by any other hardware device in the xPC Target system (for example by the Ethernet card).
- In the Simulink window, and from the Tools menu, point to Real-Time Workshop, and then click Options. Select the category "xPC Target code generations options" in the displayed dialog box. In the "Real-Time Interrupt Source" pop-up menu select the interrupt line number which you have set by the jumpers on the board. Close the dialog box and save the model.
- Open the dialog box of the CAN Receive block in the model which defines the CAN message (identifier) to be used to fire the interrupt. Check the Generate interrupts check box. Checking this box will declare all CAN-messages defined in this Receive block instance through their identifiers as messages, which will fire an interrupt. Or in other words it is not possible to define a single CAN message within the set of defined identifiers to be the only one to fire an interrupt. In most cases only the reception of one specific message is used to drive the application execution. Therefore use at least two instances of the Receive block. One to receive the CAN message, which drives the execution (Generate Interrupts checked) and the other for all other "normal" CAN-messages to be received (Generate Interrupts unchecked).
| Model Execution Driven by CAN-Messages (Interrupt Capability of CAN Receive Blocks) | | CAN-AC2-PCI |  |