How to receive data with Raspberry PI CAN receive block?

1 回表示 (過去 30 日間)
Raphael Chacon
Raphael Chacon 2020 年 3 月 26 日
回答済み: Reeno Joseph 2020 年 4 月 30 日
Hello
I am trying to connect a Raspberry Pi 3B model via a PICAN 2 shield to my simulink model.
Through testing with the 'raspi_CAN_SendReceive' library I know the hardware is working fine.
I now want to receice data with the raspberrypi receive block from version 2019b on.
Unfortunately I do not receive anything, neither with rawdata output (zeros) nor with CAN Msg output (throwing error:
  • 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'.
).
Basically I really only insert the receive block and display or scope as sink.
CAn anyone help me or tell me what I should consider?
Thanks and best regards

回答 (1 件)

Reeno Joseph
Reeno Joseph 2020 年 4 月 30 日
Hi Raphael,
Please check the solution described here.
Thansk,
Reeno Joseph

カテゴリ

Help Center および File ExchangeInstallation Setup and Configuration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by