C++ to Simulink S function block
2 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
New matlab user here.
I am currently working on a Arduino project which requires interfacing controller with multiple input and output devices. There already a vast C++ library available in Arduino IDE for all these devices and i'd like to convert them to Simulink S block so i can program / monitor / control them directly from Simulink. There's a way to use standard Arduino simulink peripheral library to interface with these devices and then implement math/logic to convert incoming data to appropriate format however I'd prefer to focus on devloping good control algorithm rather then on creating new peripheral libraries from scratch. So my question is - Is there a comprehensive guide that explains in detail on how to convert existing C++ libraries into s blocks ? Below is link to probably the best video i could find on internet on this subject however coming from non-oops background I'd appreciate if someone can point me to a more structured guide on this.
Note - I have already installed Arduino hadrware support and try to convert adafruit library for MAX6675 into s block. Following the guide above I can "build" the S block however I dont see any data coming in. If i add the inbuilt SPI block then i do see data coming in so i assume there is no issue with the hardware.
0 件のコメント
採用された回答
Arun Kumar
2020 年 7 月 23 日
Hi Prash,
To create a device driver for Arduino, you can use the following gude:
And the detailed steps to use 3rd party library with Simulink support package are metioned in the following file exchange submission:
Hope This Helps!!
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!