How can I create a table to organize S-function block mask parameters?

I'd like to create a table in my S-function block mask similar to the one used to enter signals in the MathWorks 'CAN Pack' block:
Does anyone know how to do this?

Answers (1)

You can do most of those types of mask through user interface. Select a subsystem block, right click, select "mask subsystem ...", then select the "Parameters" tab. For each parameter, you could make it "edit", "checkbox", "popup",etc, depending on your Simulink version. It should be sufficient for most of need to set up parameters.
If you really want to know how those CAN blocks are masked, you can drag one of those blocks, find out its 'OpenFcn' callback function name, and then look at the .m file for that function, for example:
edit can_frame_constructor_mask

2 Comments

I am specifically asking about how to create a table for S-function parameter inputs (not an edit box or popup).
To see what I'm talking about, follow the link above and scroll down about a quarter of the way down the page. An example S-function block mask is shown for the CAN Pack block. Under the heading 'Signals", there is a table with multiple columns and rows.
Start with can_frame_constructor_mask.m. That is the function executed when you double-click the block.

Sign in to comment.

Categories

Products

Asked:

on 27 Sep 2011

Community Treasure Hunt

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

Start Hunting!