Specifications
5 CAN I/O Support for FIFO
5-16
The first element returns the current value of the lost messages counter. The
receive FIFO can store up to 255 events. If the receive FIFO is not regularly
accessed for reading events, the FIFO gets filled and the lost messages counter
starts to count up. This is an indicator that events (messages) will be
unavoidably lost. The second element returns the current bus state. Possible
values are:
0 Error active
1 Error passive
2 Bus off
Sample time — The fourth control (edit field) defines the sample time at which
the FIFO Read block is executed during a model (target application) run.
It is strongly recommended that you only use one instance of this block per
physical CAN board in your model. Otherwise you may get the unwanted
behavior that one instance would read events while they have to be processed
by blocks connected to the other, second instance.
FIFO Read Filter Block
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.