Model call functions from wrapper (GET/SET) from microcontroller

1 vue (au cours des 30 derniers jours)
Vinicius Rodrigues de Oliveira
Hello everyone,
I'm creating this concept for new project, the idea is to make all algorithms with MATLAB(simulink,stateflow) and generate code with embedder encoder.
But this Matlab model need to access information from microcontroller (low level side), to do this we are going to have wrapper with GET and SET functions. For example, the High-Level application needs current value, it will sent GET command through wrapper, to access Low-Level side, which is going to read the register from NXP MC33771 using SPI, and return through wrapper a SET command to High-Level application.
Is it possible to call external C funtion from the model? Which blocks I should use (Simulink Function/Function Caller)? For example GET(current).
Untitled.png

Réponses (0)

Produits


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by