How can I speed up simulation of my PEAK USB CAN simulink Library on Raspberry Pi in External Mode?

조회 수: 4 (최근 30일)
I have implemented PEAK USB CAN simulink Library which will work on raspberry pi in External Model. The Library contains PCAN Initialization and PCAN Read simulink blocks which will work as hardware support packages. when i run the simulation on Raspberry Pi to read CAN data from PCAN Channels(PCAN_USBBUS1 to 6). There is a delay in simulation. CAN data is updating after some time. i observed 2 to 3 min delay. The simulink Library depends on PCANBASIC library which is installed on raspberry pi.
How can i speed up the simulation?
  댓글 수: 1
srikanth balla
srikanth balla 2018년 9월 6일
편집: srikanth balla 2018년 9월 12일
I have changed the sampling time in C-Mex Code. Now the Library is working fine for Normal mode but in external mode it is giving 6sec delay

댓글을 달려면 로그인하십시오.

답변 (1개)

srikanth balla
srikanth balla 2018년 9월 12일
  댓글 수: 3
srikanth balla
srikanth balla 2018년 11월 1일
편집: srikanth balla 2018년 11월 1일
i have enabled Detect Overrun in model configuration parameters.
The following message is captured in log file of model
"Overrun detected: The sample time for the rate 0 is too short."
after some time of execution PCAN Library is not receiving CAN messages.
robert youth
robert youth 2020년 12월 24일
Hi @ srikanth balla, This is such a wonderful project, good job! I wonder why no one has ever interested in using PCAN on Rpi or has been able to provide any assistance on this topic.
However I had no luck in running external mode, the progress stuck in the compilation phase. It would be super if there is any document provided.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Run on Target Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by