S-function Builder - Run Only Once
Show older comments
I am working with a simulink model in 2013b, where I need the S-function builder to call a function in a dll once. This function is an initialize statement, is there a way I can run all the other commands in the dll at each time step while running the initialize statement just once? I did not make the dll by the way, it is a black box to me other than the C method inputs and outputs.
dll:
%
extern void params(const alpha[]);
extern void init_Func(void);
extern void inputs(const double inp[]);
extern void outputs(double Out1[], double Out2[]);
I would like the init_Func and params to be run only at the start of the simulation. alpha in params is a parameter that is defined in the s-funciton builder.
1 Comment
Jim Riggs
on 7 Aug 2018
There is probably a way to do what you want, but you will need to give some more information about how to use the dll. What is the interface, inputs and return value, etc.
Accepted Answer
More Answers (0)
Categories
Find more on Block and Blockset Authoring in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!