CAN Message Replay Issue

2 次查看(过去 30 天)
Boyang Xia
Boyang Xia 2022-2-14
编辑: Aditya 2024-1-18
Dear all,
The issue I encountered is when replaying the same CAN message (using the same DBC file) via Matlab and CANoe respectively, it was found that there was an offset between the two outputs.
Could you please kindly help me with this issue?

回答(1 个)

Aditya
Aditya 2024-1-18
编辑:Aditya 2024-1-18
When you encounter an offset between CAN messages replayed using MATLAB and CANoe, there are several potential factors to consider. Here are some steps you can take to troubleshoot and resolve the issue:
1. Timestamps: Check the timestamps of the messages being replayed in both MATLAB and CANoe. Ensure that both applications are configured to use the same time base and that there are no timestamp conversion issues.
2. Bit Timing: Verify that the bit timing settings (i.e., baud rate, sample point, synchronization jump width) are consistent between MATLAB and CANoe. Any discrepancy in these settings could lead to differences in how messages are sent and interpreted.
3. DBC File Consistency: Ensure that the same DBC file is being used in both MATLAB and CANoe. Any differences in the DBC file could lead to different interpretations of the message data.
4. Signal Encoding: Check that the signals within the CAN messages are being encoded correctly according to the DBC file specifications. Differences in how signals are packed into the message frames can cause offsets in the output.
5. Message Order and Timing: Make sure that the order and timing of message transmission are the same in both MATLAB and CANoe. Differences in message order or delays between messages can result in apparent offsets.
If after checking these factors you still experience an offset, you may need to perform a more detailed analysis of the messages using a CAN analyzer tool to compare the raw data being transmitted on the bus by MATLAB and CANoe.

Community Treasure Hunt

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

Start Hunting!

Translated by