Updating Simulink Block on the fly?

981 views Asked by At

Is there any way to change the parameters of a block in Simulink on the fly? The model is compiled and running on a xPC-Target. I do have a subsystem (actually a lot of subsystems) and would like to load the params from several xml files and populate the model (after external triggering).

Wiring those values instead of using mask parameters is the current state, but the model is getting bulky and hard to maintain.

1

There are 1 answers

0
Andrew Walker On

I know that for stand alone models you can do this by calling your simulink model from MATLAB using the sim function ( http://www.mathworks.com.au/help/simulink/slref/sim.html) I assume that this would be the same for the xPC-Target, I've certainly seen similar things with RTW.

The simulink blog has a good explanation at http://blogs.mathworks.com/seth/2008/02/26/welcome/