The data in CAN FD protocol doesn’t sent correctly in SLDRT for PCI Express Peak card

4 views (last 30 days)
I want to buy CAN FD cards that work well in Simulink Desktop Real-Time (SLDRT). I barrowed a PCAN-PCI Express card from Peak Company.
I tested CAN and CAN FD protocol with 2 ports in SLDRT with MATLAB version R2020b & R2024a in Windows 10.
I connected port1 to port2 with 120-ohm resistance termination in both ends.
When the settings in SLDRT for two ports are CAN protocol, sending & receiving data with packet input & packet output blocks are ok.
But when the settings in SLDRT for two ports are CAN FD protocol, the packet input block doesn’t receive any data.
I checked each packet input & packet output blocks separately with other applications such as PCAN-View from PEAK Company and CAN FD Explorer APP in MATLAB.
With the use of both applications for sending data, packet input block receives CAN FD protocol data correctly.
But when the packet output block sends CAN FD protocol data, both applications in the receiving data section shows CAN protocol instead of CAN FD & length of data is limited to 8 bytes when the length of data is more than 8 bytes.
I think that it may be a bug of SLDRT for CAN FD in packet output block for cards of PEAK Company.
I hope someone help me to resolve this challenging problem for this card.
On the other hand, if someone has successful related with CAN FD cars from Kvaser or Vector company in SLDRT, please tell me the part number of card.
Best regards

Answers (1)

Jan Houska
Jan Houska on 25 Nov 2024
Hi Mojtaba,
the CAN FD mode must be enabled in the Board Setup dialog by checking the Use CAN FD checkbox. Have you checked this checkbox? If yes, could you please post your model so I can verify your other settings? Or you may want to contact MathWorks technical support with your question.
Best Regards, Jan
  1 Comment
mojtaba gheibi
mojtaba gheibi on 12 Dec 2024
Edited: mojtaba gheibi on 12 Dec 2024
Hi Jan
Thank you so much for your response. I have read most of your answers regarding of SLDRT questions and I hope you help me.
The CAN FD mode enabled in the Board Setup, and the other settings are left as default.
I was able to receive data using CAN FD in SLDRT, so I believe my settings for CAN FD in the Simulink model are correct. However, the sent data seems to be in standard CAN format instead of CAN FD.
I have shared the model and kindly request you to verify it for me.
Best Regards, Mojtaba

Sign in to comment.

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!