S-function Builder - Run Only Once
이전 댓글 표시
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
Jim Riggs
2018년 8월 7일
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.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
