Saving and Restoring Simulation States in an External Application from a Code-Generated Simulink Model with Custom S-Functions
I have a fixed-step Simulink model that includes a referenced model with a custom S-function. This S-function is built with the legacy code tool using a DLL that was compiled from Ada and C code. I plan to autocode this entire Simulink model into a library, which I intend to use in an external non-Matlab real time environment with optional man-in-the-loop inputs. In this external environment, we want to be able to save the simulation’s state at a certain point and then load it back later to continue the simulation repeatably.
We’re in a planning phase and I need to determine whether this is feasible. I’ve looked through some of the documentation and other questions but this use case seems a little out of the ordinary, and it’s not clear to me that the RestoreOperatingPoint etc will work in this case. Will RestoreOperatingPoint work in this scenario, or is there another approach?I have a fixed-step Simulink model that includes a referenced model with a custom S-function. This S-function is built with the legacy code tool using a DLL that was compiled from Ada and C code. I plan to autocode this entire Simulink model into a library, which I intend to use in an external non-Matlab real time environment with optional man-in-the-loop inputs. In this external environment, we want to be able to save the simulation’s state at a certain point and then load it back later to continue the simulation repeatably.
We’re in a planning phase and I need to determine whether this is feasible. I’ve looked through some of the documentation and other questions but this use case seems a little out of the ordinary, and it’s not clear to me that the RestoreOperatingPoint etc will work in this case. Will RestoreOperatingPoint work in this scenario, or is there another approach? I have a fixed-step Simulink model that includes a referenced model with a custom S-function. This S-function is built with the legacy code tool using a DLL that was compiled from Ada and C code. I plan to autocode this entire Simulink model into a library, which I intend to use in an external non-Matlab real time environment with optional man-in-the-loop inputs. In this external environment, we want to be able to save the simulation’s state at a certain point and then load it back later to continue the simulation repeatably.
We’re in a planning phase and I need to determine whether this is feasible. I’ve looked through some of the documentation and other questions but this use case seems a little out of the ordinary, and it’s not clear to me that the RestoreOperatingPoint etc will work in this case. Will RestoreOperatingPoint work in this scenario, or is there another approach? simulink, code generation, s-function, operating point, ada, c++ MATLAB Answers — New Questions