From: Long Nguyen on
Hello Seniors,
I want to create a subsystem to provide it to another user. The subsystem block should NOT be accessed by "Look under Mask" option. In the other word, it appears to be a black box to user that he could only change the parameters but could not see what is under the Mask.
Does anybody know how to do this?
Feedbacks are appreciated.
From: Arnaud Miege on

"Long Nguyen" <phuclong79(a)yahoo.com> wrote in message
news:hk9cri$hae$1(a)fred.mathworks.com...
> Hello Seniors,
> I want to create a subsystem to provide it to another user. The subsystem
> block should NOT be accessed by "Look under Mask" option. In the other
> word, it appears to be a black box to user that he could only change the
> parameters but could not see what is under the Mask.
> Does anybody know how to do this?
> Feedbacks are appreciated.

You can generate an S-function with Real-Time Workshop and pass them the
compiled S-function (which is essentially a DLL):
http://www.mathworks.com/access/helpdesk/help/toolbox/rtw/ug/f4879.html

They'll be able to include the S-function subsystem in a model and run it,
but not look underneath it.I think the S-functions are platform dependent,
so the end user needs to be on the same platform as the one the S-function
was generated on (e.g. if you have Windows 32-bit, they'll need Windows
32-bit). If the parameters have been defined as tunable they'll also be able
to change those parameters. They won't be able to generate some code from
the model that includes the S-function if they don't also have the source
code (generated *.c and *.h files), at least not easily.

If you have the latest release R2009b, you can also use the njew proetcted
reference model functionality:
http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/ug/br6xrii.html

The same restrictions as with S-functions apply (I think).

HTH,

Arnaud