Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g31g2000vbr.googlegroups.com!not-for-mail
From: Praetorian <ashish.sadanandan@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Activate/deactivate, enable/disable Simulink Blocks
Date: Wed, 4 Nov 2009 14:36:01 -0800 (PST)
Organization: http://groups.google.com
Lines: 29
Message-ID: <f55ae5e6-b0b3-4d9c-bda6-981bfd06b2ea@g31g2000vbr.googlegroups.com>
References: <hcssur$ag0$1@fred.mathworks.com>
NNTP-Posting-Host: 63.238.229.186
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1257374161 27039 127.0.0.1 (4 Nov 2009 22:36:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 4 Nov 2009 22:36:01 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g31g2000vbr.googlegroups.com; posting-host=63.238.229.186; 
	posting-account=uxNuEQoAAABwxsrGxAKeLxAj2hdO1tck
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) 
	Gecko/20091016 Firefox/3.5.4,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:582547


On Nov 4, 2:50 pm, "James Pau" <the_manti...@hotmail.com> wrote:
> Hi there, I have tried looking online but there doesn't seem to be a solution or workaround for this that is readily available. What I want to do is disable or deactivate a simulink block that is causing an error when trying to run a simulation. This is because i have a model that can either take an input from a file or from an external device that is connected to the PC. Which input is determined by a manual switch block. When the device is not connected it's corresponding input block brings up an error that says the device is not connected and the model does not run - even if I am trying to read from a file and do not need the external device to be connected. Is there a way for me to suppress this error?  I want to maintain all of this in a single model and the only workaround i can see is to duplicate it and have one with input from file and the other with input from external device.
>
> Thanks for your help!
> James

Take a look at the help documentation for "Configurable
Subsystem" (under the Simlink -> Ports & Subsystems library). You
should be able to create a masked block on which you select which
version of your block you want to use (reading from file or from the
device) and the configurable subsystem will select the appropriate
subsystem that contains your choice. I realize that my explanation
sucks, but read the help and examples for that block and it'll make
more sense.

HTH,
Ashish.