xPC Target | ![]() ![]() |
This is a utility block for the CAN FIFO driver block set, but does not actually access the CAN board or any other hardware device. This block is usually connected to the first output port of the FIFO Read driver block and allows filtering events out of the event matrix which is the signal leaving the FIFO Read driver block.
The block code walks through the rows of the incoming event matrix signal and looks out for matching events according to the criteria defined in the block dialog box. If it matches, the entire event information (row) is written to the block first output port. If more than one row matches the criteria, the later event overwrites the earlier event.
The block has one input port and two output ports. The input port is of type double and accepts a matrix signal of size m*6. The two output ports are of type double as well. The first outputs is a row vector (1*6), the filtered event and the second outputs a scalar value which reports the number of matching events the filter block has processed.
The dialog box of the block lets you define the following settings.
CAN port -- Defines the filter criterion for the CAN port. From the list, select Any
, 1
, or 2
.
Message type command -- Defines the filter criterion for the event types. This entry can consist of a concatenation of space delimited keywords which are:
SDF Standard data frame SRF Standard remote frame EDF Extended data frame ERF Extended remote frame EF Error frame NE No new event CBS Change of bus state
Message type selection mode -- Defines how the event type (message type) entered in the control above is treated. If you select Include
, the event type criterion is the sum of the concatenated keywords. If you select Exclude
, the event type criterion is equal to all event types minus the sum of the concatenated keywords.
Identifier(s) -- Defines the filter criterion for the CAN message identifiers. A set of identifiers can be provided as a row vector.
Identifier selection mode -- Defines how the identifier criterion entered in the control above is treated. If you select Include, the identifier criterion is the sum of all specified identifiers. If you select Exclude, the identifier criterion is equal to all identifiers minus the specified identifiers.
You can use as many instances of this block in your model as needed. Usually, you connect several instances in parallel to the output of the FIFO Read driver block in order to filter out particular messages or events. For more information on how to do this, see Examples.
![]() | FIFO Read Driver Block | FIFO Read XMT Level Driver Block | ![]() |