Change and save parameter / variable for next startup on an arduino target using simulink
1 次查看(过去 30 天)
显示 更早的评论
Hi guys!
I have an Arduino Mega and want to deploy my Simulink Model on this target so the Model can run on its own without a PC, Matlab etc. In my Model i want to able to change the some settings and save theses changes permanently. The thing is i dont want to save this settings just for the actual runtime but for the next start after the Arduino is shutdown / restarted. What i want to achieve is just to save some values for my model for the next startup, like in a settings menu.
If i am correct i need to change the variables / parameters in the Model workspace. A already tried using the Data Store blocks but, as expected i am loosing the values for the next Start of the Arduino. I also tried to use "Simulink.Paramter" to change the Variables in the Workspace but i did something wrong resulting in:
The 'Simulink.Parameter' class does not support code generation
So my question is: Is it possible to change and save values in my model for the next start of the arduino? And if so how?
Thanks in advance!
Denis
0 个评论
回答(1 个)
Arun Kumar
2020-4-29
Hi Denis,
What I understood from your question is that you want to store some data during runtime and read that data during the next/subsequent runs. On mega, this can be achieved by using the onboard EEPROM:
There's no block for EEPROM read/write in the support package, but you can create your own block by following this simple guide:
Hope this helps!
Arun
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!