CAN Bus Timeout C2000

조회 수: 4 (최근 30일)
Kyriakos Sampatakakis
Kyriakos Sampatakakis 2017년 11월 9일
댓글: Marek Laszlo 2018년 3월 26일
Hi all,
I am trying to add a "Timeout" on the receive side of the CAN bus, so that when a specific amount of time is pass and there is no reception of a new CAN message, a default value will be present in the transmission side. Is that possible? Bellow there is a link with the Simulink Model: https://www.dropbox.com/s/rk1ipb45e6pc2aj/test_can_TO.slx?dl=0
Any answer will be appreciated!

답변 (1개)

Venkatesh Chilapur
Venkatesh Chilapur 2017년 11월 9일
Hi,
You can create a counter and reset it when you get a CAN message (from the function call of the CAN block or an interrupt). If the counter reaches the timeout value before a CAN message is received, than we can trigger a specific subsystem. Regards,
Venkatesh Chilapur
  댓글 수: 2
Kyriakos Sampatakakis
Kyriakos Sampatakakis 2017년 11월 13일
Hi,
Thank you for responding so quickly. I have tried many things using the Counter block(DSP Toolbox), but I can't figure it out how to reset it. The function-call "signal", can't reset or set any of these kind of blocks. Additionaly, I tried to use a Stateflow chart to achieve that, but nothing solid came out. Is there a direct way to convert this function call event into something that can reset a counter?
Best regards
Kyriakos Sampatakakis
Marek Laszlo
Marek Laszlo 2018년 3월 26일
Hello, have you solved this timeout?
Best Regards, Marek Laszlo

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

카테고리

Help CenterFile Exchange에서 Signal Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by