<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: My First Debugging Steps</title>
	<atom:link href="http://blogs.mathworks.com/seth/2012/07/11/my-first-debugging-steps/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/seth/2012/07/11/my-first-debugging-steps/</link>
	<description>This blog is about Simulink.</description>
	<lastBuildDate>Wed, 22 May 2013 17:23:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Guy Rouleau</title>
		<link>http://blogs.mathworks.com/seth/2012/07/11/my-first-debugging-steps/#comment-1928</link>
		<dc:creator>Guy Rouleau</dc:creator>
		<pubDate>Tue, 11 Sep 2012 17:40:01 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=1099#comment-1928</guid>
		<description><![CDATA[@KMR: Thank you for the comment. I apologize for the long delay before replying.

I never used SystemBuild, but what you describe seems close to the behavior of Atomic Subsystems in Simulink.

Atomic Subsystems have a &quot;Sample Time&quot; property, which is by default set to -1. The value of -1 does not impose any constraints on the sample time of the blocks inside the Atomic Subsystem. As you describe, this gives you the possibility to shoot yourself in the foot.

If your application requires strict usage of sample times, you can specify a positive value for the sample time of the Atomic Subsystem. When a positive value is specified, all the blocks  inside the Atomic Subsystem will run at this rate. You will receive an error if blocks inside the Atomic Subsystem are configured to run at a different rate.


There are also ways to enforce models to be single-rate.

In the solver section of the model configuration, by default the &quot;Periodic sample time constraint&quot; is set to &#039;Unconstrained&#039; to allow more flexibility. If your model needs to contain only specific rates, you can change it to &quot;specified&quot; and specify the allowed rates. You can find information on this topic here:

http://www.mathworks.com/help/toolbox/simulink/gui/bq7cmsp-1.html#bq99059-1

http://www.mathworks.com/help/toolbox/simulink/gui/bq7cmsp-1.html#bq99059-1]]></description>
		<content:encoded><![CDATA[<p>@KMR: Thank you for the comment. I apologize for the long delay before replying.</p>
<p>I never used SystemBuild, but what you describe seems close to the behavior of Atomic Subsystems in Simulink.</p>
<p>Atomic Subsystems have a &#8220;Sample Time&#8221; property, which is by default set to -1. The value of -1 does not impose any constraints on the sample time of the blocks inside the Atomic Subsystem. As you describe, this gives you the possibility to shoot yourself in the foot.</p>
<p>If your application requires strict usage of sample times, you can specify a positive value for the sample time of the Atomic Subsystem. When a positive value is specified, all the blocks  inside the Atomic Subsystem will run at this rate. You will receive an error if blocks inside the Atomic Subsystem are configured to run at a different rate.</p>
<p>There are also ways to enforce models to be single-rate.</p>
<p>In the solver section of the model configuration, by default the &#8220;Periodic sample time constraint&#8221; is set to &#8216;Unconstrained&#8217; to allow more flexibility. If your model needs to contain only specific rates, you can change it to &#8220;specified&#8221; and specify the allowed rates. You can find information on this topic here:</p>
<p><a href="http://www.mathworks.com/help/toolbox/simulink/gui/bq7cmsp-1.html#bq99059-1" rel="nofollow">http://www.mathworks.com/help/toolbox/simulink/gui/bq7cmsp-1.html#bq99059-1</a></p>
<p><a href="http://www.mathworks.com/help/toolbox/simulink/gui/bq7cmsp-1.html#bq99059-1" rel="nofollow">http://www.mathworks.com/help/toolbox/simulink/gui/bq7cmsp-1.html#bq99059-1</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KMR</title>
		<link>http://blogs.mathworks.com/seth/2012/07/11/my-first-debugging-steps/#comment-1885</link>
		<dc:creator>KMR</dc:creator>
		<pubDate>Wed, 25 Jul 2012 19:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=1099#comment-1885</guid>
		<description><![CDATA[(I don&#039;t check this very often, so apologies to the long time between question and response.)

In Simulink, you typically handle sample times by specifying the sample time of an individual block (say, an integrator) and then having the sample time propagate to individual blocks.  The problem is that if you mess up the sample time on one block, it can affect lots of blocks, which is what Guy is showing.  Simulink&#039;s design makes it relatively easy to shoot yourself in the foot, sample-time-wise.

In the almost-extinct SystemBuild (part of MATRIXx, which was actually the leader in graphical modeling and code generation until about 2001 or so; that&#039;s a whole &#039;nother story), timing attributes were specified at the SuperBlock level (a SuperBlock is similar to Simulink&#039;s Subsystem block, except somewhat less virtual).  So every non-SuperBlock inside a given SuperBlock would share the same timing attributes.  This greater level of structure to timing attributes makes it substantially more difficult to mess up timing in a SystemBuild model.

I don&#039;t know if this architecture was covered by patent or not, but since AFAIK the Mathworks kept the rights to all patents covering MATRIXx/SystemBuild when they were forced to divest themselves of their purchase of that tool (that&#039;s part of the story alluded to above), there should be no legal problem with allowing the SystemBuild-style timing attributes in Simulink.  I am assuming that the Mathworks prefers their design; I do not in this case.  My preference would be to allow (not enforce) a Model block to act like a SystemBuild-style SuperBlock and specify timing attributes for the entire contents of the Model block (including inheriting them from a higher-level Model block, for the case of nested Model blocks).  Maybe I&#039;m unusual, but for all of my use cases, I always design my Model blocks to be single-rate; that&#039;s what is required to integrate my generated code into an existing real-time framework.]]></description>
		<content:encoded><![CDATA[<p>(I don&#8217;t check this very often, so apologies to the long time between question and response.)</p>
<p>In Simulink, you typically handle sample times by specifying the sample time of an individual block (say, an integrator) and then having the sample time propagate to individual blocks.  The problem is that if you mess up the sample time on one block, it can affect lots of blocks, which is what Guy is showing.  Simulink&#8217;s design makes it relatively easy to shoot yourself in the foot, sample-time-wise.</p>
<p>In the almost-extinct SystemBuild (part of MATRIXx, which was actually the leader in graphical modeling and code generation until about 2001 or so; that&#8217;s a whole &#8216;nother story), timing attributes were specified at the SuperBlock level (a SuperBlock is similar to Simulink&#8217;s Subsystem block, except somewhat less virtual).  So every non-SuperBlock inside a given SuperBlock would share the same timing attributes.  This greater level of structure to timing attributes makes it substantially more difficult to mess up timing in a SystemBuild model.</p>
<p>I don&#8217;t know if this architecture was covered by patent or not, but since AFAIK the Mathworks kept the rights to all patents covering MATRIXx/SystemBuild when they were forced to divest themselves of their purchase of that tool (that&#8217;s part of the story alluded to above), there should be no legal problem with allowing the SystemBuild-style timing attributes in Simulink.  I am assuming that the Mathworks prefers their design; I do not in this case.  My preference would be to allow (not enforce) a Model block to act like a SystemBuild-style SuperBlock and specify timing attributes for the entire contents of the Model block (including inheriting them from a higher-level Model block, for the case of nested Model blocks).  Maybe I&#8217;m unusual, but for all of my use cases, I always design my Model blocks to be single-rate; that&#8217;s what is required to integrate my generated code into an existing real-time framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul J.</title>
		<link>http://blogs.mathworks.com/seth/2012/07/11/my-first-debugging-steps/#comment-1878</link>
		<dc:creator>Paul J.</dc:creator>
		<pubDate>Thu, 12 Jul 2012 23:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=1099#comment-1878</guid>
		<description><![CDATA[KMR,

Can you expand on your concerns with how Simulink handles sample times?]]></description>
		<content:encoded><![CDATA[<p>KMR,</p>
<p>Can you expand on your concerns with how Simulink handles sample times?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KMR</title>
		<link>http://blogs.mathworks.com/seth/2012/07/11/my-first-debugging-steps/#comment-1876</link>
		<dc:creator>KMR</dc:creator>
		<pubDate>Wed, 11 Jul 2012 22:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/?p=1099#comment-1876</guid>
		<description><![CDATA[Related to sample time:  I continue to contend that Simulink&#039;s model for sample time is inferior to the SystemBuild model for sample time; it is much easier to make these kind of sample time errors with Simulink.  This remains one of the three or four areas where the Mathworks stubbornly refuses to learn from what SystemBuild did 15 years ago.

Not saying that I want to go back to SystemBuild, but it is frustrating that there are still these places where Simulink makes it easy to shoot yourself in the foot.]]></description>
		<content:encoded><![CDATA[<p>Related to sample time:  I continue to contend that Simulink&#8217;s model for sample time is inferior to the SystemBuild model for sample time; it is much easier to make these kind of sample time errors with Simulink.  This remains one of the three or four areas where the Mathworks stubbornly refuses to learn from what SystemBuild did 15 years ago.</p>
<p>Not saying that I want to go back to SystemBuild, but it is frustrating that there are still these places where Simulink makes it easy to shoot yourself in the foot.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
