Simulink model deployed on Raspberry Pi

1 回表示 (過去 30 日間)
sebbesen
sebbesen 2015 年 9 月 8 日
回答済み: Jun 2015 年 10 月 6 日
I have a Raspberry Pi B+ (RPi) with a CAN-bus interface. I want to send a message to the RPi from an external device through the CAN interface. On the RPi I want to have a Simulink model running which reads the incoming message and (depending on the message) returns another message to the external device over CAN.
Does anyone have an idea how to do this? At this point, I'm able to receive and send messages on the CAN bus from the Linux terminal (e.g. cansend, cansniffer, etc) by means of the tools "can-utils".
I reckon the process involves compiling the Simulink model to C code or some sort of stand-alone executable which takes the incoming CAN message as an input argument and broadcasts the appropriate message back on the CAN bus. Anyway, I'm a bit stuck at this point, and I'd be happy if anyone has some ideas to get me started.
Your comments are appreciated!

回答 (1 件)

Jun
Jun 2015 年 10 月 6 日
you can write code use socket can in Linux.

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by