How can I make sure that the Simulink CAN Replay block replays messages with correct timing?

조회 수: 4 (최근 30일)
I want to replay a CAN-log on a PEAK CAN-USB converter. Therefore I use the Simulink CAN-Replay block. It seems like it is working, but I'm not sure wether the messages are replayed with the correct timing.
The documentation says, that the CAN-Replay block uses the timestamp from the Vector .asc file where the messages are stored. But there is a "Sample Time" which can't be set to -1 (as inheritet from the file). If I adjust the sample time, the messages are replayed in a shorter time.
How can I make sure, that the messages are replayed following the original timestamp?
Thanks and regards,
Dietrich

답변 (1개)

Prashant Arora
Prashant Arora 2017년 4월 27일
Hi Dietrich,
The block does use the timestamp from original file. However, when you replay to a network, the timestamps correlate to real time, and when you replay to the output port it correlates to simulation time. Using the Sample Time, Simulink decides on block execution rate during simulation. If you are playing messages in Simulink, you can force your model to "pace" like real-time using something like a Simulation Pace block.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Vehicle Network Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by