フィルターのクリア

Simulink CAN communication not restoring after disconnecting

1 回表示 (過去 30 日間)
Damien Pecher
Damien Pecher 2023 年 12 月 1 日
回答済み: Divyanshu 2023 年 12 月 12 日
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?

回答 (1 件)

Divyanshu
Divyanshu 2023 年 12 月 12 日
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:

カテゴリ

Help Center および File ExchangeRF Blockset Models for Transceivers についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by