Changing Simulink Parameter in embedded platform

1 view (last 30 days)
I am using an embedded platform that I flash a Simulink model to. This platform has basic CAN and XCP support on it, which is nice because Simulink interfaces those via Parameters and Signal types. The platform does not implement anyway to alter the saved Parameter value on boot up, but it has an internal EEPROM. I would like to implement something in Simulink such that when the user alters the Simulink.Parameter via XCP, they can then send a signal that will make it save that value to EEPROM. This is easy enough to do in Simulink already. The hard part is making it so you can reload that EEPROM value into the EEPROM at a later point. The embedded platform has Simulink blocks for reading/writing the EEPROM, but I am unable to read the value with a block and then overwrite the value of the Parameter with it.
A solution I have considered is having both a Parameter and Signal for each one, and the Signal initially loads its value from the Parameter, but can later be set to load it from EEPROM via a triggered subsystem, but this is not great for the user as it makes it more complicated to see what the actual current value is when changing it from XCP.

Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!