Hello,
I have a simple SFunction with 3 inputs, 2 outputs and 11 parameters (p1 to p11). I generate this SFunction with the S-function builder block.
I need to initiliaze parameters p10 and p11 in mdlstart so for this I do the following:
real_T *p10 = (real_T*)mxGetData(PARAM_DEF9(S));real_T *p11 = (real_T*)mxGetData(PARAM_DEF10(S));p10[0] = 1234;p11[0] = 5678;
Then I want to connect these parameters to my output in the Outputs_wrapper function. To do this I try the following:
y0[0] = p10[0];y1[0] = p11[0];
This is function in Simulink but not when I compil my model and set it into VeriStand, but if I try to do this with my two first parameters this is work (change p10 by p1 and p11 by p2 and PARAM_DEF9 by PARAM_DEF0 et PARAM_DEF10 by PARAM_DEF1).
Best Answer