Why am I unable to perform CAN FD transmission to Vector hardware from MATLAB/Simulink without using CANalyzer?

18 views (last 30 days)

I am trying to perform CAN FD transmissions to the Vector hardware in a Simulink model using Vehicle Network Toolbox in MATLAB R2024b.
When trying to transmit a message, although no errors are shown in MATLAB/Simulink, the channel enters an error state and the communication stops working with a red light blinking on the Vector hardware.
However, the model works fine when I start the connection with the CANalyzer software first before running the Simulink model.
Why is this happening and how can I resolve this issue?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 12 Dec 2024 at 0:00
In a CAN FD network, initialization access is granted to the first vendor or device that accesses the CAN channel. This ensures that the network is properly configured and ready for communication. This scenario typically involves a master device or a primary node taking control of the network initialization.
The first device sets key parameters such as:
  • Nominal and Data Bit Rates: Establishes the communication speeds for arbitration and data phases.
  • Bit Timing Settings: Configures timing segments to ensure proper synchronization.
  • Feature Activation: Enables CAN FD-specific features like Bit Rate Switching (BRS) and Extended Data Length (EDL).
In this situation, CANalyzer has set these parameters such that they were different from Simulink and therefore causing the error condition.
Examining the parameters set by CANalyzer and then applying the same to the CAN FD Transmit block would resolve the issue.

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!