Some tunable variables are missing in generated S-function mask
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Titus Edelhofer
2015 年 6 月 15 日
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 件のコメント
Titus Edelhofer
2015 年 6 月 17 日
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
参考
カテゴリ
Help Center および File Exchange で Classical Control Design についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!