How to pass mask parameters to the an underlying S-Function in Simulink?
21 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to create an animation based on the built-in 'saeroanim' 6DoF Animation block in Simulink for R2020a. I'm using a mask to pass defined parameters to the modified S-Function block (I'm implementing a moving target), but I get this error message:
For S-function 'saeroanim_movingtarget', the number of defined parameters, 0, does not match the number of parameters on the dialog of 'Config_3_Missile/6DoF Animation Moving Target/Animation S-Function', 1. These two values must be identical.
In the initialization tab, I have this:
s_funcConfig.axes = axes;
s_funcConfig.update = update;
s_funcConfig.missile = missile;
s_funcConfig.target = target;
s_funcConfig.camera_pos = camera_pos;
s_funcConfig.view = view;
s_funcConfig.Animenable = animenable;
s_funcConfig.Model = bdroot(gcb);
"s_funcConfig" is the struct that I want to define for the S-Function inside the mask. Why is the mask not defining s_funcConfig as a "defined parameter" and then passing it to the dialog of the internal S-Function?
Some pictures:
Mask Edit Window
Internal portion of the mask
Underlying S-Function parameters dialog box
0 Kommentare
Antworten (1)
Aiswarya
am 18 Okt. 2023
Hi,
The error you are getting indicates that the number of parameters in the compiled S-function is different than the number of parameters in the block dialog box. This means you have not defined any parameters in the S-function code but the dialog has a parameter s_funcConfig . The mask is not responsible to define a parameter for the S-function. You may need to check the S-function code and make sure you have defined that parameter. Refer to this link on more information on setting parameters for S-function:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Block and Blockset Authoring finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!