How to get PiCan2 raspberry pi shield to work with Simulink?
2 views (last 30 days)
Show older comments
The PiCan2 hardware is confirmed to be working properly with the Raspberry Pi, but I get the following error when attempting to use the CAN Recieve Pi block in simulink:
- For output port 2 of 'test_CAN/CAN Receive', the 'stepImpl' method of the System object 'codertarget.raspi.internal.CANReceive' returned a value that has data type 'double', which does not match the data type 'uint8' returned by the 'getOutputDataTypeImpl' method. Either change the data type of the value returned by 'stepImpl', or change the data type returned by 'getOutputDataTypeImpl'.
I have seen previous threads https://www.mathworks.com/matlabcentral/answers/513083-how-to-receive-data-with-raspberry-pi-can-receive-block and https://www.mathworks.com/matlabcentral/answers/518213-why-does-the-can-receive-block-from-raspberry-pi-support-package-not-work-with-pican-2-shield in which there seemingly wasn't a proper solution to the issue. I am wondering if it has been figured out by this point.
Thanks
1 Comment
Reeno Joseph
on 18 Feb 2021
Hi Matthew,
This issue is fixed in the latest update of the support package.
Please update your support package to the latest version and try.
-Reeno
Answers (0)
See Also
Categories
Find more on Raspberry Pi Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!