Get rid of "S-Fuction" block inputs

4 ビュー (過去 30 日間)
Isaac Silva
Isaac Silva 2015 年 5 月 31 日
コメント済み: Isaac Silva 2015 年 6 月 3 日
How can I get rid of the input and output ports of the S-Function block? The block the I wanna create does not need it since it is an initialization block the only inputs are entered using mask parameters.

採用された回答

Abhishek GS
Abhishek GS 2015 年 6 月 3 日
Hi Isaac,
I have a couple of questions. Are you using MATLAB S-Function or C S-Function block? Could you be more clear on what kind of initialization you intend to do? I am afraid S-Function blocks are not required for this purpose.
Thanks, Abhishek
  1 件のコメント
Isaac Silva
Isaac Silva 2015 年 6 月 3 日
Hi Abhishek,
I already got my answer. I'm trying to develop a Simulink blockset for a PIC microcontroller, and the first block I was trying to create was a block to initialize the ports (to define the direction of the pins).
To remove the input and output ports I had to use the functions "ssSetNumInputPorts(S, 0);" and "ssSetNumOutputPorts(S, 0);" on the "void mdlInitializeSizes(SimStruct *S)" function of the C S-function code.
I got that answer from MATLAB's support team. I tried and it works just fine.
Appreciate your help,
Isaac

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by