invalid data type 'linuxCANMsg' with CAN Receive RPi block and Matlab r2022a

9 views (last 30 days)
Hello,
I am trying to use a Raspberry Pi 4 with Simulink with a physical CAN interface (using the Simulink Rpi CAN Receive block), and with its output type set to 'CAN Msg' so I can then use the CAN Unpack from the vehicle tool box.
This has worked before (r2021b I think) but we have updated to r2022a it appears to be broken - I don't have the previous version of Matlab installed anymore to double check if its me, or a Matlab issue, but am wondering if anyonelse has the same issue / knows of a fix.
I have commented everything out in the project, so even with just the 'CAN Receive' block present and its output set to CAN Msg type it fails.
This is the error when attenpting to build of update the model:
MATLAB System block 'CANtoUDPrpi/CAN Receive1' error occurred when invoking 'getOutputDataTypeImpl' method of 'codertarget.raspi.internal.CANReceive'.
....
Caused by: Reported by CANtoUDPrpi/CAN Receive1: 'getOutputDataTypeImpl' method of the System object 'codertarget.raspi.internal.CANReceive' for 'CANtoUDPrpi/CAN Receive1' returned invalid data type 'linuxCANMsg' for output port 1. The return value must be a character vector of: built-in data type, name of embedded.numerictype object, name of Simulink.enumeration class, name of Simulink.Bus object, name of Simulink.NumericType object or name of Simulink.AliasType object.
Component:Simulink | Category:Block error
Many thanks, Sean.
  5 Comments
Henry Rake
Henry Rake on 29 Aug 2022
Hello Sean,
were you able to fix the Problem? I have the exact same problem!
Kind regards
Henry
Sean Murray
Sean Murray on 31 Aug 2022
Yes - it was resolved by clicking 'help' in RESOURCES on the main Matlab window, and then checking for updates and installing the latest updates for the RPI.
Hope this also works for you..
Sean.

Sign in to comment.

Answers (0)

Categories

Find more on Raspberry Pi Hardware in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!