Specifications

Model execution driven by CAN-messages (Interrupt capability of CAN Receive blocks)
4-51
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).
CAN-AC2-PCI
The CAN-AC2 is a PCI-board, and the hardware interrupt line is automatically
assigned by the PCI BIOS during the boot-up of the target system. Use the xPC
Target function ‘getxpcpci’ (see ‘help getxpcpci’) at the MATLAB command
prompt to query the target system for installed PCI devices and the assigned
resources. Write down the interrupt line number assigned to the
CAN-AC2-PCI board.
1 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” popup menu select the interrupt line number which you
have retrieved by calling ‘getxpcpci’. Close the dialog box and save the
model.
2 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).