xPC Target    

Example 2

When looking at the time behavior of the model, you can observe that at each millisecond 2 CAN messages are sent out via the FIFO Write block, while the FIFO Read block reads each millisecond three events out of the receive FIFO. This implies that one of the three events leaving the FIFO Read block will be of type "No new event". This can be visually shown, by attaching another FIFO Filter block in parallel, which filters "No new events", and then by displaying the second output port, which reports the number of matching events. You can display the model by typing, in the MATLAB command window, either xpccanpcififo2.mdl or xpccan104fifo2.mdl.

Having observed this, we could then reduce the Read depth of the FIFO Read block from 3 to 2. This would not change anything of the overall behavior of the model. As a positive side effect, the latency time of the FIFO Read block gets smaller and therefore the model's cycle time as well.


  Example 1 Example 3