Some tunable variables are missing in generated S-function mask
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
in Matlab Simulink 2013a 64bit, I generate an S-function with compilator Microsoft SDK 7.1 from a function block through Right Click > C/C++ Code > Generate S-function.
I select the parameter I want to be tunables (all of the 12) and build the S-function. But the generated S-function allows me to set only 6 of the 12 variables. On another block, all 3 variables remain tunables, and on a third block, 1 of 3 variables wished as tunable is missing in S-function mask.
All variables (present or missing) are constant values for a given simulation (like friction coefficient, gear reduction ratio, motor constant [N.m/A], detent torque, ...).
All variables have been parametrized in the mask before compilation (name instead of the value) and have an assigned value in the workspace. Missing variable names are already missing in files blockname_sf_private.h, blockname_sf.h, and blockname_sf_data.c .
Any tip or idea ? Thank you.
0 commentaires
Réponses (1)
Titus Edelhofer
le 15 Juin 2015
Hi Benjamin,
note, that there are blocks in Simulink that don't allow the value to be tunable (all sample time related parameters for example). Which block parameters are you missing in the generated S-Function (which parameter from which block type)?
Titus
2 commentaires
Benjamin CHANEL
le 16 Juin 2015
Modifié(e) : Benjamin CHANEL
le 16 Juin 2015
Titus Edelhofer
le 17 Juin 2015
Hi Benjamin,
for the line above, do you use the MATLAB function block? This will not work, although the "Generate S-function" asks you to decide if the parameters are tunable or not. You will need to use blocks (a gain block with param_2, feed into Trigonometric function block etc). Then it should work ...
Titus
Voir également
Catégories
En savoir plus sur Classical Control Design dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!