Some tunable variables are missing in generated S-function mask
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Titus Edelhofer
am 15 Jun. 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 Kommentare
Titus Edelhofer
am 17 Jun. 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
Siehe auch
Kategorien
Mehr zu Classical Control Design 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!