<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Bus Signals in the Generated Code</title>
	<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/</link>
	<description>This blog is about Simulink.</description>
	<pubDate>Mon, 23 Nov 2009 00:07:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Angelo</title>
		<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-805</link>
		<dc:creator>Angelo</dc:creator>
		<pubDate>Fri, 17 Jul 2009 15:55:27 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-805</guid>
		<description>Hi wei,

thanks for yous suggestion, but maybe I found something more general to my problem. My primitive problem was to read the signal names flowing on lines and it seems that more people have these issues:

http://www.mathworks.de/support/solutions/data/1-2JW10T.html?product=SL&#38;solution=1-2JW10T

I encountered some more problem with masked blocks but I think it could be a good way to go.

Cheers

angelo</description>
		<content:encoded><![CDATA[<p>Hi wei,</p>
<p>thanks for yous suggestion, but maybe I found something more general to my problem. My primitive problem was to read the signal names flowing on lines and it seems that more people have these issues:</p>
<p><a href="http://www.mathworks.de/support/solutions/data/1-2JW10T.html?product=SL&amp;solution=1-2JW10T" rel="nofollow">http://www.mathworks.de/support/solutions/data/1-2JW10T.html?product=SL&amp;solution=1-2JW10T</a></p>
<p>I encountered some more problem with masked blocks but I think it could be a good way to go.</p>
<p>Cheers</p>
<p>angelo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wei</title>
		<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-802</link>
		<dc:creator>wei</dc:creator>
		<pubDate>Thu, 16 Jul 2009 17:47:50 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-802</guid>
		<description>@angelo, what you had is a port handle. port of Inport type can't propagate signal. Your command will work for outport.

Alternatively if line handle is available, you can always do
&lt;pre&gt;
set(lineH,'signalPropagation','on')
&lt;/pre&gt;

@seth,
Block parameter is fairly documented. But not line, prot etc. Maybe worth an entry here?</description>
		<content:encoded><![CDATA[<p>@angelo, what you had is a port handle. port of Inport type can&#8217;t propagate signal. Your command will work for outport.</p>
<p>Alternatively if line handle is available, you can always do</p>
<pre>
set(lineH,'signalPropagation','on')
</pre>
<p>@seth,<br />
Block parameter is fairly documented. But not line, prot etc. Maybe worth an entry here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Angelo</title>
		<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-801</link>
		<dc:creator>Angelo</dc:creator>
		<pubDate>Thu, 16 Jul 2009 11:35:59 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-801</guid>
		<description>Hi Seth,

I'm looking for a way to transmit names of signals from Simulink to Matlab (in a structure?) but I encountered some problem. One way should be showing the propagated signals (from the Signal Properties...) but I need switching with a command (e.g. with a set_param command: something like &lt;pre&gt;
set_param(ln_sn_hand.Inport(j),'ShowPropagatedSignals','all');
&lt;/pre&gt;) this line parameter from 'off' to 'on' (or to 'all') and it seems to me this is not a enabled parameter of the line. 

Could you give some input about that?

Thanks

angelo</description>
		<content:encoded><![CDATA[<p>Hi Seth,</p>
<p>I&#8217;m looking for a way to transmit names of signals from Simulink to Matlab (in a structure?) but I encountered some problem. One way should be showing the propagated signals (from the Signal Properties&#8230;) but I need switching with a command (e.g. with a set_param command: something like
<pre>
set_param(ln_sn_hand.Inport(j),'ShowPropagatedSignals','all');
</pre>
</p><p>) this line parameter from &#8216;off&#8217; to &#8216;on&#8217; (or to &#8216;all&#8217;) and it seems to me this is not a enabled parameter of the line. </p>
<p>Could you give some input about that?</p>
<p>Thanks</p>
<p>angelo</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-219</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Thu, 15 May 2008 16:04:54 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-219</guid>
		<description>@Bob - I chose to specify the name because I wanted to shorten things up for the blog post.  When I used the Auto or Subsystem Name option I got this:

&lt;code&gt;
   19   /* Output and update for atomic system: '&#60;Root&#62;/ReusableFcn' */
   20   void simplebusdemo_nv_ReusableFcn(const main_bus *rtu_0,
   21     rtB_ReusableFcn_simplebusdemo_n *localB)
   22   {
&lt;/code&gt;

I was just trying to avoid the line wrap.

Regarding parameterization using bus signals, this is a limitation of the current behavior of bus signals.  Currently, bus signals can not inherit the Inf sample time, so they end up in the step function even if the inputs are constant.  It should be possible to use a custom storage class to control the generation of the code for the bus and put the code into the initialization section.</description>
		<content:encoded><![CDATA[<p>@Bob - I chose to specify the name because I wanted to shorten things up for the blog post.  When I used the Auto or Subsystem Name option I got this:</p>
<p><code><br />
   19   /* Output and update for atomic system: &#8216;&lt;Root&gt;/ReusableFcn&#8217; */<br />
   20   void simplebusdemo_nv_ReusableFcn(const main_bus *rtu_0,<br />
   21     rtB_ReusableFcn_simplebusdemo_n *localB)<br />
   22   {<br />
</code></p>
<p>I was just trying to avoid the line wrap.</p>
<p>Regarding parameterization using bus signals, this is a limitation of the current behavior of bus signals.  Currently, bus signals can not inherit the Inf sample time, so they end up in the step function even if the inputs are constant.  It should be possible to use a custom storage class to control the generation of the code for the bus and put the code into the initialization section.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-213</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Thu, 08 May 2008 13:00:38 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-213</guid>
		<description>Occasionally we've used busses to parameterize a model.  To cut down on function interface overhead, the non-virtual bus makes sense.  But if you use a set of Constant blocks to feed a Bus Creator outputting a non-virtual bus, the generated code looks like:
rtb_bus.bus1.Parameter1 = 7;
rtb_bus.bus1.Parameter2 = FRED;
rtb_bus.bus2.Parameter3 = 8;
instead of:
rtb_bus = { {7, FRED}, {8} };
And this usually appears in the step, not the initialize.

Is there a way to get the preferred output?</description>
		<content:encoded><![CDATA[<p>Occasionally we&#8217;ve used busses to parameterize a model.  To cut down on function interface overhead, the non-virtual bus makes sense.  But if you use a set of Constant blocks to feed a Bus Creator outputting a non-virtual bus, the generated code looks like:<br />
rtb_bus.bus1.Parameter1 = 7;<br />
rtb_bus.bus1.Parameter2 = FRED;<br />
rtb_bus.bus2.Parameter3 = 8;<br />
instead of:<br />
rtb_bus = { {7, FRED}, {8} };<br />
And this usually appears in the step, not the initialize.</p>
<p>Is there a way to get the preferred output?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-212</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Thu, 08 May 2008 12:56:13 +0000</pubDate>
		<guid>http://blogs.mathworks.com/seth/2008/05/07/bus-signals-in-the-generated-code/#comment-212</guid>
		<description>Any particular reason you chose to specify the name of the atomic subsystem?  I try to avoid that in case I've used the block twice with different I/O data types, and usually find the name in the generated code comes close enough to the subsystem name to make traceability possible.</description>
		<content:encoded><![CDATA[<p>Any particular reason you chose to specify the name of the atomic subsystem?  I try to avoid that in case I&#8217;ve used the block twice with different I/O data types, and usually find the name in the generated code comes close enough to the subsystem name to make traceability possible.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
