Hi,
To ensure I capture the latest CAN data from a fast and busy datastream, I am setting the Mask to check all bits (2047) and Filter for a specific single ID,
Then progmaticaly changing the filter value and stepping through the three message ID's I require.
It seems a bit cumbersome but I cleanly get all messages updated.
(I can already see that with my method if one messge stopped being transmitted the system would brick, but i can add a work around for this)
Question: When I set the RX Filter (SetRxFilter 0), does this clear the RX buffer of old data?
Or should I also check the Rx Buffer first, as I believe this will clear the RX buffer.
CAN Macro is attached.
Thansk, j.
CAN Filter Changes on the Fly.
-
- Posts: 164
- http://meble-kuchenne.info.pl
- Joined: Sun Dec 20, 2020 6:06 pm
- Has thanked: 63 times
- Been thanked: 46 times
-
- Matrix Staff
- Posts: 1909
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 494 times
- Been thanked: 672 times
Re: CAN Filter Changes on the Fly.
Hello,
Sorry for the delay in getting back to you.
Changing the RxFilter will not remove any already received messages from the buffer.
Sorry for the delay in getting back to you.
Changing the RxFilter will not remove any already received messages from the buffer.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: CAN Filter Changes on the Fly.
Thanks Ben,
Are you aware of any command that will flush the buffer?
Does the Check RX buffer command? I have no real idea but I thought it may read the hardware buffer (MCP2515/ECAN) into a local FC macro software buffer?
J.
Are you aware of any command that will flush the buffer?
Does the Check RX buffer command? I have no real idea but I thought it may read the hardware buffer (MCP2515/ECAN) into a local FC macro software buffer?
J.