S-Function Block- Create Mask Error

조회 수: 2 (최근 30일)
Sam
Sam 2012년 3월 16일
I drag and drop the "S-Function" block in a new Simulink library, and then right click on the block and choose Create Mask.
A Mask Editor windows is displayed, in the Icon Drawing commands, I would like to have two input ports, for example below.
port_label('input', 1, 'Time'); port_label('input', 2, 'Event');
the block shows three question signs, it only allow me to have one port.
I am using MATLAB 2011b.

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 3월 16일
Which S-function did you select for the block? There needs to be a C-MEX or MATLAB-file S-function associated with it. That S-function needs to be configured to accept two ports. In C-MEX S-functions, you can use ssSetNumInputPorts in mdlInitializeSizes and in MATLAB S-functions, you can use block.NumInputPorts in the setup function.

카테고리

Help CenterFile Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by