xPC Target | ![]() ![]() |
Example 6
The next example shows the use of the CAN acceptance filters. First the Read depth parameter of the FIFO Read block is set back to a value of 2. Then the identifier of the second standard message is changed from 114 to 188. The goal is to filter any CAN messages with an identifier larger than 127 what would mean that the receive FIFO would never contain the CAN message with identifier 188. Additionally the FIFO Filter block, filtering CAN message with identifier 114 is changed to filter the message with identifier 188.
For this the Acceptance Filters parameter of CAN port 2 in the FIFO Setup block has to be set accordingly:
By rebuilding and re-executing the target application the following can be observed:
You can display the model by typing, in the MATLAB command window, either is xpccanpcififo6.mdl
or xpccan104fifo6.mdl
.
![]() | Example 5 | UDP I/O Support | ![]() |