CAN message fault in Simulink

3 visualizzazioni (ultimi 30 giorni)
nafiseh nabavi
nafiseh nabavi il 2 Apr 2024
Risposto: Ayush il 5 Ago 2024
Hi
how can I check if data corruption and loss message of CAN bus have happened? I've been designing some algorithms in Simulink then I will convert it to a piece of code and upload it to a hardware.

Risposte (1)

Ayush
Ayush il 5 Ago 2024
Hello Nafiseh,
To check for data corruption and loss of CAN message you can utilize the several CAN blocks that Simulink provides. For more information on the "CAN" blocks, you can refer to the following documentation:
Furthermore, for your particular use case specifically, you can try leveraging the following "CAN" blocks:
1. CAN Log block to log the CAN messages being sent from the network to be saved and further analysed for data corruption or loss. You can also use the CAN Replay block to stream the logged data and visualise them to debug effectively. For more information on blocks you can refer to the following documentation:
2. CAN Unpack block to unpack the CAN messages into signal outputs to see the type of data or parameters being used to generate a signal and compare it with the desired data type to check for corruption or losses. For more information on this block, you can refer to the following documentation:
Hope it helps!

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by