Simulink CAN communication not restoring after disconnecting
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have an infinitely long simmulation running in Simulink where I use CAN communication with a Peak USB PCAN device.
To read the CAN I use the simulink CAN Receive block together with the CAN Unpack block.
Now I saw that when I disconnect the CAN line from the PCAN while my simmulation is running the received CAN values obviously stopped working and were frozen to the last received value.
When I reconnect the CAN line (still while my simmulation is running) the CAN values are not restoring.
The CAN communication is only restoring when I stop my simmulation and start it again.
Is there a way to have the CAN communication in simulink working again without stopping and starting the simmulation again?
0 Kommentare
Antworten (1)
Divyanshu
am 12 Dez. 2023
Hi Damien,
I understand that you are using CAN communication with some USB PCAN device, and are looking for ways to reconnect the CAN Line without restarting the simulation, after disconnecting the CAN line.
There is no such direct way to get the CAN line connected without restarting the simulation.
However, you can try using 'ModelOperatingPoints' where you can store the states of model and can restore them. Please refer the following documentation for better understanding:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Sources finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!