<?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: S-functions, Bus Signals, and Missing Documentation</title>
	<atom:link href="http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/</link>
	<description>This blog is about Simulink.</description>
	<lastBuildDate>Tue, 14 Feb 2012 17:41:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: martin</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-1351</link>
		<dc:creator>martin</dc:creator>
		<pubDate>Wed, 23 Feb 2011 19:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-1351</guid>
		<description>Does this work with a bus which is defined with bus elements?

In such a case, when I use the s-function builder, I get:
&lt;pre&gt;
typedef struct {
} Bus: testbus2;

typedef struct {
  Bus: testbus2 a;
  uint8_T b;
} testbus;
&lt;/pre&gt;

This is not what I wanted - I was looking for:
&lt;pre&gt;
typedef struct {
  real_T p;
  int32_T q;
}testbus2;

typedef struct {
  Bus: testbus2 a;
  uint8_T b;
} testbus;
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Does this work with a bus which is defined with bus elements?</p>
<p>In such a case, when I use the s-function builder, I get:</p>
<pre>
typedef struct {
} Bus: testbus2;

typedef struct {
  Bus: testbus2 a;
  uint8_T b;
} testbus;
</pre>
<p>This is not what I wanted &#8211; I was looking for:</p>
<pre>
typedef struct {
  real_T p;
  int32_T q;
}testbus2;

typedef struct {
  Bus: testbus2 a;
  uint8_T b;
} testbus;
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Divya</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-1320</link>
		<dc:creator>Divya</dc:creator>
		<pubDate>Fri, 24 Dec 2010 05:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-1320</guid>
		<description>Hi Seth, 

i am very new to Simulink. I want to work with Video and image processing simulink blocks. I read an image, converted into Y plane using Color conversion block. Now I need to use the Y plane to further process the image. 
I would like to add my own matlab code to the Simulink blocks. I thought Level-2 MATLAB functions in user-defined block sets will help me in the same. But i have no idea, how i can give input to the M file and can i write it as a fucntion inside M file? How i can connect my simulink blocks to my matlab code?

Please help me. 
Thanks, 
Divya</description>
		<content:encoded><![CDATA[<p>Hi Seth, </p>
<p>i am very new to Simulink. I want to work with Video and image processing simulink blocks. I read an image, converted into Y plane using Color conversion block. Now I need to use the Y plane to further process the image.<br />
I would like to add my own matlab code to the Simulink blocks. I thought Level-2 MATLAB functions in user-defined block sets will help me in the same. But i have no idea, how i can give input to the M file and can i write it as a fucntion inside M file? How i can connect my simulink blocks to my matlab code?</p>
<p>Please help me.<br />
Thanks,<br />
Divya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ksreddy</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-819</link>
		<dc:creator>ksreddy</dc:creator>
		<pubDate>Tue, 04 Aug 2009 16:42:36 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-819</guid>
		<description>Hi, I am new to MATLAB, As a part of my assignment work I have been asked to integrate a program of 2k lines with simulink.This program has been written in fortran.The code also consists of many functions,just one input and many output variables.
I dont know as to how to call the functions within an s-function. I want to stick to level 1 as that is a little beginners level and easy to understand.
But due to too many outputs I dont know how we can assign it in s-function.
But there is one main function, can that be called in s-function. and what do I assign x and u in level 1 s-function,as input is directly given in through an include file.
So please can you help me out., because I am getting a runtime error forrtl sever(29):file not found although there are no compilation errors.
Hoping for a favourable reply. 
thank you and regards,
ksreddy</description>
		<content:encoded><![CDATA[<p>Hi, I am new to MATLAB, As a part of my assignment work I have been asked to integrate a program of 2k lines with simulink.This program has been written in fortran.The code also consists of many functions,just one input and many output variables.<br />
I dont know as to how to call the functions within an s-function. I want to stick to level 1 as that is a little beginners level and easy to understand.<br />
But due to too many outputs I dont know how we can assign it in s-function.<br />
But there is one main function, can that be called in s-function. and what do I assign x and u in level 1 s-function,as input is directly given in through an include file.<br />
So please can you help me out., because I am getting a runtime error forrtl sever(29):file not found although there are no compilation errors.<br />
Hoping for a favourable reply.<br />
thank you and regards,<br />
ksreddy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wei</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-799</link>
		<dc:creator>wei</dc:creator>
		<pubDate>Wed, 08 Jul 2009 02:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-799</guid>
		<description>@Seth(#10), Virtual bus block is very useful for large model. If as object bus can only be non-virtual, then either object, block, or both need be extended to support virtual and non-virtual buses.</description>
		<content:encoded><![CDATA[<p>@Seth(#10), Virtual bus block is very useful for large model. If as object bus can only be non-virtual, then either object, block, or both need be extended to support virtual and non-virtual buses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pat</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-798</link>
		<dc:creator>Pat</dc:creator>
		<pubDate>Tue, 07 Jul 2009 08:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-798</guid>
		<description>@Seth--nice post on Bus
I am having a problem with Bus and embedded Maltab, I need non virtual bus as I a defining interfaces. I have replicated the example of the online Documentation-&gt;Simulink-&gt;Using the embedded Matlab Function Blocks--&gt; Working with structures and Bus signals.

It just does not work and I am wondering what the problem might be, This is an excerpt of message I am getting from Matlab, 


Warning: &#039;testDescription/Bus Selector2&#039; must be connected to a Bus Creator, Bus
Selector or a bus capable block.
 A possible cause of this error is the use of a bus-capable block (such as Merge or
 Unit Delay) that in this current situation is unable to propagate the bus
 downstream to the block reported in this error. Please see Simulink documentation
 for further information on composite (i.e. bus) signals and their proper usage. 
&gt; In busSelectorddg_cb at 37
  In busSelectorddg_cb at 111

&quot;
As I cant attached my model file, please accept my apology for adding the content of my mdl file here.

/**************************************************/
Model {
  Name			  &quot;testDescription&quot;
  Version		  7.3
  MdlSubVersion		  0
  GraphicalInterface {
    NumRootInports	    0
    NumRootOutports	    0
    ParameterArgumentNames  &quot;&quot;
    ComputedModelVersion    &quot;1.87&quot;
    NumModelReferences	    0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  &quot;ibm-5348_P100-1997&quot;
  SaveDefaultBlockParams  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  DataTypeOverride	  &quot;UseLocalSettings&quot;
  MinMaxOverflowLogging	  &quot;UseLocalSettings&quot;
  MinMaxOverflowArchiveMode &quot;Overwrite&quot;
  Created		  &quot;Sat Jul 04 08:00:35 2009&quot;
  Creator		  &quot;Admin&quot;
  UpdateHistory		  &quot;UpdateHistoryNever&quot;
  ModifiedByFormat	  &quot;%&quot;
  LastModifiedBy	  &quot;Admin&quot;
  ModifiedDateFormat	  &quot;%&quot;
  LastModifiedDate	  &quot;Mon Jul 06 22:54:24 2009&quot;
  RTWModifiedTimeStamp	  0
  ModelVersionFormat	  &quot;1.%&quot;
  ConfigurationManager	  &quot;None&quot;
  SampleTimeColors	  on
  SampleTimeAnnotations	  off
  LibraryLinkDisplay	  &quot;none&quot;
  WideLines		  on
  ShowLineDimensions	  on
  ShowPortDataTypes	  on
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  on
  ShowTestPointIcons	  on
  ShowSignalResolutionIcons on
  ShowViewerIcons	  on
  SortedOrder		  off
  ExecutionContextIcon	  off
  ShowLinearizationAnnotations on
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  SimulationMode	  &quot;normal&quot;
  LinearizationMsg	  &quot;none&quot;
  Profile		  off
  ParamWorkspaceSource	  &quot;MATLABWorkspace&quot;
  AccelSystemTargetFile	  &quot;accel.tlc&quot;
  AccelTemplateMakefile	  &quot;accel_default_tmf&quot;
  AccelMakeCommand	  &quot;make_rtw&quot;
  TryForcingSFcnDF	  off
  RecordCoverage	  off
  CovPath		  &quot;/&quot;
  CovSaveName		  &quot;covdata&quot;
  CovMetricSettings	  &quot;dw&quot;
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  &quot;covCumulativeData&quot;
  CovCumulativeReport	  off
  CovReportOnPause	  on
  CovModelRefEnable	  &quot;Off&quot;
  CovExternalEMLEnable	  off
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  &quot;manual&quot;
  ExtModeTrigMode	  &quot;normal&quot;
  ExtModeTrigPort	  &quot;1&quot;
  ExtModeTrigElement	  &quot;any&quot;
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating &quot;auto&quot;
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  &quot;rising&quot;
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  &quot;off&quot;
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  BufferReuse		  off
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  Array {
    Type		    &quot;Handle&quot;
    Dimension		    1
    Simulink.ConfigSet {
      $ObjectID		      1
      Version		      &quot;1.6.0&quot;
      Array {
	Type			&quot;Handle&quot;
	Dimension		8
	Simulink.SolverCC {
	  $ObjectID		  2
	  Version		  &quot;1.6.0&quot;
	  StartTime		  &quot;0.0&quot;
	  StopTime		  &quot;10.0&quot;
	  AbsTol		  &quot;auto&quot;
	  FixedStep		  &quot;0.1&quot;
	  InitialStep		  &quot;auto&quot;
	  MaxNumMinSteps	  &quot;-1&quot;
	  MaxOrder		  5
	  ZcThreshold		  &quot;auto&quot;
	  ConsecutiveZCsStepRelTol &quot;10*128*eps&quot;
	  MaxConsecutiveZCs	  &quot;1000&quot;
	  ExtrapolationOrder	  4
	  NumberNewtonIterations  1
	  MaxStep		  &quot;auto&quot;
	  MinStep		  &quot;auto&quot;
	  MaxConsecutiveMinStep	  &quot;1&quot;
	  RelTol		  &quot;1e-3&quot;
	  SolverMode		  &quot;Auto&quot;
	  Solver		  &quot;FixedStepDiscrete&quot;
	  SolverName		  &quot;FixedStepDiscrete&quot;
	  ShapePreserveControl	  &quot;DisableAll&quot;
	  ZeroCrossControl	  &quot;UseLocalSettings&quot;
	  ZeroCrossAlgorithm	  &quot;Nonadaptive&quot;
	  AlgebraicLoopSolver	  &quot;TrustRegion&quot;
	  SolverResetMethod	  &quot;Fast&quot;
	  PositivePriorityOrder	  off
	  AutoInsertRateTranBlk	  off
	  SampleTimeConstraint	  &quot;Unconstrained&quot;
	  InsertRTBMode		  &quot;Whenever possible&quot;
	  SignalSizeVariationType &quot;Allow only fixed size&quot;
	}
	Simulink.DataIOCC {
	  $ObjectID		  3
	  Version		  &quot;1.6.0&quot;
	  Decimation		  &quot;1&quot;
	  ExternalInput		  &quot;[t, u]&quot;
	  FinalStateName	  &quot;xFinal&quot;
	  InitialState		  &quot;xInitial&quot;
	  LimitDataPoints	  on
	  MaxDataPoints		  &quot;1000&quot;
	  LoadExternalInput	  off
	  LoadInitialState	  off
	  SaveFinalState	  off
	  SaveCompleteFinalSimState off
	  SaveFormat		  &quot;Array&quot;
	  SaveOutput		  on
	  SaveState		  off
	  SignalLogging		  on
	  InspectSignalLogs	  off
	  SaveTime		  on
	  StateSaveName		  &quot;xout&quot;
	  TimeSaveName		  &quot;tout&quot;
	  OutputSaveName	  &quot;yout&quot;
	  SignalLoggingName	  &quot;logsout&quot;
	  OutputOption		  &quot;RefineOutputTimes&quot;
	  OutputTimes		  &quot;[]&quot;
	  Refine		  &quot;1&quot;
	}
	Simulink.OptimizationCC {
	  $ObjectID		  4
	  Version		  &quot;1.6.0&quot;
	  Array {
	    Type		    &quot;Cell&quot;
	    Dimension		    4
	    Cell		    &quot;ZeroExternalMemoryAtStartup&quot;
	    Cell		    &quot;ZeroInternalMemoryAtStartup&quot;
	    Cell		    &quot;NoFixptDivByZeroProtection&quot;
	    Cell		    &quot;OptimizeModelRefInitCode&quot;
	    PropName		    &quot;DisabledProps&quot;
	  }
	  BlockReduction	  off
	  BooleanDataType	  on
	  ConditionallyExecuteInputs on
	  InlineParams		  off
	  InlineInvariantSignals  on
	  OptimizeBlockIOStorage  off
	  BufferReuse		  off
	  EnhancedBackFolding	  off
	  StrengthReduction	  off
	  EnforceIntegerDowncast  on
	  ExpressionFolding	  off
	  EnableMemcpy		  on
	  MemcpyThreshold	  64
	  PassReuseOutputArgsAs	  &quot;Structure reference&quot;
	  ExpressionDepthLimit	  2147483647
	  FoldNonRolledExpr	  on
	  LocalBlockOutputs	  off
	  RollThreshold		  5
	  SystemCodeInlineAuto	  off
	  StateBitsets		  off
	  DataBitsets		  off
	  UseTempVars		  off
	  ZeroExternalMemoryAtStartup on
	  ZeroInternalMemoryAtStartup on
	  InitFltsAndDblsToZero	  on
	  NoFixptDivByZeroProtection off
	  EfficientFloat2IntCast  off
	  EfficientMapNaN2IntZero on
	  OptimizeModelRefInitCode off
	  LifeSpan		  &quot;inf&quot;
	  BufferReusableBoundary  on
	  SimCompilerOptimization &quot;Off&quot;
	  AccelVerboseBuild	  off
	}
	Simulink.DebuggingCC {
	  $ObjectID		  5
	  Version		  &quot;1.6.0&quot;
	  RTPrefix		  &quot;error&quot;
	  ConsistencyChecking	  &quot;none&quot;
	  ArrayBoundsChecking	  &quot;none&quot;
	  SignalInfNanChecking	  &quot;none&quot;
	  SignalRangeChecking	  &quot;none&quot;
	  ReadBeforeWriteMsg	  &quot;UseLocalSettings&quot;
	  WriteAfterWriteMsg	  &quot;UseLocalSettings&quot;
	  WriteAfterReadMsg	  &quot;UseLocalSettings&quot;
	  AlgebraicLoopMsg	  &quot;warning&quot;
	  ArtificialAlgebraicLoopMsg &quot;warning&quot;
	  SaveWithDisabledLinksMsg &quot;warning&quot;
	  SaveWithParameterizedLinksMsg	&quot;none&quot;
	  CheckSSInitialOutputMsg on
	  UnderspecifiedInitializationDetection	&quot;Classic&quot;
	  MergeDetectMultiDrivingBlocksExec &quot;none&quot;
	  CheckExecutionContextPreStartOutputMsg off
	  CheckExecutionContextRuntimeOutputMsg	off
	  SignalResolutionControl &quot;TryResolveAllWithWarning&quot;
	  BlockPriorityViolationMsg &quot;warning&quot;
	  MinStepSizeMsg	  &quot;warning&quot;
	  TimeAdjustmentMsg	  &quot;none&quot;
	  MaxConsecutiveZCsMsg	  &quot;error&quot;
	  SolverPrmCheckMsg	  &quot;warning&quot;
	  InheritedTsInSrcMsg	  &quot;warning&quot;
	  DiscreteInheritContinuousMsg &quot;warning&quot;
	  MultiTaskDSMMsg	  &quot;warning&quot;
	  MultiTaskCondExecSysMsg &quot;none&quot;
	  MultiTaskRateTransMsg	  &quot;error&quot;
	  SingleTaskRateTransMsg  &quot;none&quot;
	  TasksWithSamePriorityMsg &quot;warning&quot;
	  SigSpecEnsureSampleTimeMsg &quot;warning&quot;
	  CheckMatrixSingularityMsg &quot;none&quot;
	  IntegerOverflowMsg	  &quot;warning&quot;
	  Int32ToFloatConvMsg	  &quot;warning&quot;
	  ParameterDowncastMsg	  &quot;error&quot;
	  ParameterOverflowMsg	  &quot;error&quot;
	  ParameterUnderflowMsg	  &quot;none&quot;
	  ParameterPrecisionLossMsg &quot;warning&quot;
	  ParameterTunabilityLossMsg &quot;warning&quot;
	  UnderSpecifiedDataTypeMsg &quot;none&quot;
	  UnnecessaryDatatypeConvMsg &quot;none&quot;
	  VectorMatrixConversionMsg &quot;none&quot;
	  InvalidFcnCallConnMsg	  &quot;error&quot;
	  FcnCallInpInsideContextMsg &quot;Use local settings&quot;
	  SignalLabelMismatchMsg  &quot;none&quot;
	  UnconnectedInputMsg	  &quot;warning&quot;
	  UnconnectedOutputMsg	  &quot;warning&quot;
	  UnconnectedLineMsg	  &quot;warning&quot;
	  SFcnCompatibilityMsg	  &quot;none&quot;
	  UniqueDataStoreMsg	  &quot;none&quot;
	  BusObjectLabelMismatch  &quot;warning&quot;
	  RootOutportRequireBusObject &quot;warning&quot;
	  AssertControl		  &quot;UseLocalSettings&quot;
	  EnableOverflowDetection off
	  ModelReferenceIOMsg	  &quot;none&quot;
	  ModelReferenceVersionMismatchMessage &quot;none&quot;
	  ModelReferenceIOMismatchMessage &quot;none&quot;
	  ModelReferenceCSMismatchMessage &quot;none&quot;
	  UnknownTsInhSupMsg	  &quot;warning&quot;
	  ModelReferenceDataLoggingMessage &quot;warning&quot;
	  ModelReferenceSymbolNameMessage &quot;warning&quot;
	  ModelReferenceExtraNoncontSigs &quot;error&quot;
	  StateNameClashWarn	  &quot;warning&quot;
	  StrictBusMsg		  &quot;ErrorOnBusTreatedAsVector&quot;
	  LoggingUnavailableSignals &quot;error&quot;
	  BlockIODiagnostic	  &quot;none&quot;
	}
	Simulink.HardwareCC {
	  $ObjectID		  6
	  Version		  &quot;1.6.0&quot;
	  ProdBitPerChar	  8
	  ProdBitPerShort	  16
	  ProdBitPerInt		  32
	  ProdBitPerLong	  32
	  ProdIntDivRoundTo	  &quot;Undefined&quot;
	  ProdEndianess		  &quot;Unspecified&quot;
	  ProdWordSize		  32
	  ProdShiftRightIntArith  on
	  ProdHWDeviceType	  &quot;32-bit Generic&quot;
	  TargetBitPerChar	  8
	  TargetBitPerShort	  16
	  TargetBitPerInt	  32
	  TargetBitPerLong	  32
	  TargetShiftRightIntArith on
	  TargetIntDivRoundTo	  &quot;Undefined&quot;
	  TargetEndianess	  &quot;Unspecified&quot;
	  TargetWordSize	  32
	  TargetTypeEmulationWarnSuppressLevel 0
	  TargetPreprocMaxBitsSint 32
	  TargetPreprocMaxBitsUint 32
	  TargetHWDeviceType	  &quot;Specified&quot;
	  TargetUnknown		  off
	  ProdEqTarget		  on
	}
	Simulink.ModelReferenceCC {
	  $ObjectID		  7
	  Version		  &quot;1.6.0&quot;
	  UpdateModelReferenceTargets &quot;IfOutOfDateOrStructuralChange&quot;
	  CheckModelReferenceTargetMessage &quot;error&quot;
	  ModelReferenceNumInstancesAllowed &quot;Multi&quot;
	  ModelReferencePassRootInputsByReference on
	  ModelReferenceMinAlgLoopOccurrences off
	}
	Simulink.SFSimCC {
	  $ObjectID		  8
	  Version		  &quot;1.6.0&quot;
	  SFSimEnableDebug	  on
	  SFSimOverflowDetection  on
	  SFSimEcho		  on
	  SimBlas		  on
	  SimUseLocalCustomCode	  off
	  SimBuildMode		  &quot;sf_incremental_build&quot;
	}
	Simulink.RTWCC {
	  $BackupClass		  &quot;Simulink.RTWCC&quot;
	  $ObjectID		  9
	  Version		  &quot;1.6.0&quot;
	  Array {
	    Type		    &quot;Cell&quot;
	    Dimension		    1
	    Cell		    &quot;IncludeHyperlinkInReport&quot;
	    PropName		    &quot;DisabledProps&quot;
	  }
	  SystemTargetFile	  &quot;grt.tlc&quot;
	  GenCodeOnly		  off
	  MakeCommand		  &quot;make_rtw&quot;
	  GenerateMakefile	  on
	  TemplateMakefile	  &quot;grt_default_tmf&quot;
	  GenerateReport	  off
	  SaveLog		  off
	  RTWVerbose		  on
	  RetainRTWFile		  off
	  ProfileTLC		  off
	  TLCDebug		  off
	  TLCCoverage		  off
	  TLCAssert		  off
	  ProcessScriptMode	  &quot;Default&quot;
	  ConfigurationMode	  &quot;Optimized&quot;
	  ConfigAtBuild		  off
	  RTWUseLocalCustomCode	  off
	  RTWUseSimCustomCode	  off
	  IncludeHyperlinkInReport off
	  LaunchReport		  off
	  TargetLang		  &quot;C&quot;
	  IncludeBusHierarchyInRTWFileBlockHierarchyMap	off
	  IncludeERTFirstTime	  on
	  GenerateTraceInfo	  off
	  GenerateTraceReport	  off
	  GenerateTraceReportSl	  off
	  GenerateTraceReportSf	  off
	  GenerateTraceReportEml  off
	  GenerateCodeInfo	  off
	  RTWCompilerOptimization &quot;Off&quot;
	  CheckMdlBeforeBuild	  &quot;Off&quot;
	  Array {
	    Type		    &quot;Handle&quot;
	    Dimension		    2
	    Simulink.CodeAppCC {
	      $ObjectID		      10
	      Version		      &quot;1.6.0&quot;
	      Array {
		Type			&quot;Cell&quot;
		Dimension		9
		Cell			&quot;IgnoreCustomStorageClasses&quot;
		Cell			&quot;InsertBlockDesc&quot;
		Cell			&quot;SFDataObjDesc&quot;
		Cell			&quot;SimulinkDataObjDesc&quot;
		Cell			&quot;DefineNamingRule&quot;
		Cell			&quot;SignalNamingRule&quot;
		Cell			&quot;ParamNamingRule&quot;
		Cell			&quot;InlinedPrmAccess&quot;
		Cell			&quot;CustomSymbolStr&quot;
		PropName		&quot;DisabledProps&quot;
	      }
	      ForceParamTrailComments off
	      GenerateComments	      on
	      IgnoreCustomStorageClasses on
	      IgnoreTestpoints	      off
	      IncHierarchyInIds	      off
	      MaxIdLength	      31
	      PreserveName	      off
	      PreserveNameWithParent  off
	      ShowEliminatedStatement off
	      IncAutoGenComments      off
	      SimulinkDataObjDesc     off
	      SFDataObjDesc	      off
	      IncDataTypeInIds	      off
	      MangleLength	      1
	      CustomSymbolStrGlobalVar &quot;$R$N$M&quot;
	      CustomSymbolStrType     &quot;$N$R$M&quot;
	      CustomSymbolStrField    &quot;$N$M&quot;
	      CustomSymbolStrFcn      &quot;$R$N$M$F&quot;
	      CustomSymbolStrBlkIO    &quot;rtb_$N$M&quot;
	      CustomSymbolStrTmpVar   &quot;$N$M&quot;
	      CustomSymbolStrMacro    &quot;$R$N$M&quot;
	      DefineNamingRule	      &quot;None&quot;
	      ParamNamingRule	      &quot;None&quot;
	      SignalNamingRule	      &quot;None&quot;
	      InsertBlockDesc	      off
	      SimulinkBlockComments   on
	      EnableCustomComments    off
	      InlinedPrmAccess	      &quot;Literals&quot;
	      ReqsInCode	      off
	      UseSimReservedNames     off
	    }
	    Simulink.GRTTargetCC {
	      $BackupClass	      &quot;Simulink.TargetCC&quot;
	      $ObjectID		      11
	      Version		      &quot;1.6.0&quot;
	      Array {
		Type			&quot;Cell&quot;
		Dimension		12
		Cell			&quot;IncludeMdlTerminateFcn&quot;
		Cell			&quot;CombineOutputUpdateFcns&quot;
		Cell			&quot;SuppressErrorStatus&quot;
		Cell			&quot;ERTCustomFileBanners&quot;
		Cell			&quot;GenerateSampleERTMain&quot;
		Cell			&quot;MultiInstanceERTCode&quot;
		Cell			&quot;PurelyIntegerCode&quot;
		Cell			&quot;SupportNonFinite&quot;
		Cell			&quot;SupportComplex&quot;
		Cell			&quot;SupportAbsoluteTime&quot;
		Cell			&quot;SupportContinuousTime&quot;
		Cell			&quot;SupportNonInlinedSFcns&quot;
		PropName		&quot;DisabledProps&quot;
	      }
	      TargetFcnLib	      &quot;ansi_tfl_tmw.mat&quot;
	      TargetLibSuffix	      &quot;&quot;
	      TargetPreCompLibLocation &quot;&quot;
	      TargetFunctionLibrary   &quot;ANSI_C&quot;
	      UtilityFuncGeneration   &quot;Auto&quot;
	      ERTMultiwordTypeDef     &quot;System defined&quot;
	      ERTMultiwordLength      256
	      MultiwordLength	      2048
	      GenerateFullHeader      on
	      GenerateSampleERTMain   off
	      GenerateTestInterfaces  off
	      IsPILTarget	      off
	      ModelReferenceCompliant on
	      ParMdlRefBuildCompliant on
	      CompOptLevelCompliant   on
	      IncludeMdlTerminateFcn  on
	      CombineOutputUpdateFcns off
	      SuppressErrorStatus     off
	      ERTFirstTimeCompliant   off
	      IncludeFileDelimiter    &quot;Auto&quot;
	      ERTCustomFileBanners    off
	      SupportAbsoluteTime     on
	      LogVarNameModifier      &quot;rt_&quot;
	      MatFileLogging	      on
	      MultiInstanceERTCode    off
	      SupportNonFinite	      on
	      SupportComplex	      on
	      PurelyIntegerCode	      off
	      SupportContinuousTime   on
	      SupportNonInlinedSFcns  on
	      EnableShiftOperators    on
	      ParenthesesLevel	      &quot;Nominal&quot;
	      PortableWordSizes	      off
	      ModelStepFunctionPrototypeControlCompliant off
	      CPPClassGenCompliant    off
	      AutosarCompliant	      off
	      UseMalloc		      off
	      ExtMode		      off
	      ExtModeStaticAlloc      off
	      ExtModeTesting	      off
	      ExtModeStaticAllocSize  1000000
	      ExtModeTransport	      0
	      ExtModeMexFile	      &quot;ext_comm&quot;
	      ExtModeIntrfLevel	      &quot;Level1&quot;
	      RTWCAPISignals	      off
	      RTWCAPIParams	      off
	      RTWCAPIStates	      off
	      GenerateASAP2	      off
	    }
	    PropName		    &quot;Components&quot;
	  }
	}
	PropName		&quot;Components&quot;
      }
      Name		      &quot;Configuration&quot;
      CurrentDlgPage	      &quot;Optimization&quot;
      ConfigPrmDlgPosition    &quot; [ 200, 85, 1080, 715 ] &quot;
    }
    PropName		    &quot;ConfigurationSets&quot;
  }
  Simulink.ConfigSet {
    $PropName		    &quot;ActiveConfigurationSet&quot;
    $ObjectID		    1
  }
  BlockDefaults {
    ForegroundColor	    &quot;black&quot;
    BackgroundColor	    &quot;white&quot;
    DropShadow		    off
    NamePlacement	    &quot;normal&quot;
    FontName		    &quot;Helvetica&quot;
    FontSize		    10
    FontWeight		    &quot;normal&quot;
    FontAngle		    &quot;normal&quot;
    ShowName		    on
    BlockRotation	    0
    BlockMirror		    off
  }
  AnnotationDefaults {
    HorizontalAlignment	    &quot;center&quot;
    VerticalAlignment	    &quot;middle&quot;
    ForegroundColor	    &quot;black&quot;
    BackgroundColor	    &quot;white&quot;
    DropShadow		    off
    FontName		    &quot;Helvetica&quot;
    FontSize		    10
    FontWeight		    &quot;normal&quot;
    FontAngle		    &quot;normal&quot;
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    &quot;Helvetica&quot;
    FontSize		    9
    FontWeight		    &quot;normal&quot;
    FontAngle		    &quot;normal&quot;
  }
  BlockParameterDefaults {
    Block {
      BlockType		      BusCreator
      Inputs		      &quot;4&quot;
      DisplayOption	      &quot;none&quot;
      UseBusObject	      off
      BusObject		      &quot;BusObject&quot;
      NonVirtualBus	      off
    }
    Block {
      BlockType		      BusSelector
      OutputAsBus	      off
    }
    Block {
      BlockType		      Constant
      Value		      &quot;1&quot;
      VectorParams1D	      on
      SamplingMode	      &quot;Sample based&quot;
      OutMin		      &quot;[]&quot;
      OutMax		      &quot;[]&quot;
      OutDataTypeMode	      &quot;Inherit from &#039;Constant value&#039;&quot;
      OutDataType	      &quot;fixdt(1,16,0)&quot;
      ConRadixGroup	      &quot;Use specified scaling&quot;
      OutScaling	      &quot;[]&quot;
      OutDataTypeStr	      &quot;Inherit: Inherit from &#039;Constant value&#039;&quot;
      LockScale		      off
      SampleTime	      &quot;inf&quot;
      FramePeriod	      &quot;inf&quot;
    }
    Block {
      BlockType		      Demux
      Outputs		      &quot;4&quot;
      DisplayOption	      &quot;none&quot;
      BusSelectionMode	      off
    }
    Block {
      BlockType		      Display
      Format		      &quot;short&quot;
      Decimation	      &quot;10&quot;
      Floating		      off
      SampleTime	      &quot;-1&quot;
    }
    Block {
      BlockType		      Inport
      Port		      &quot;1&quot;
      UseBusObject	      off
      BusObject		      &quot;BusObject&quot;
      BusOutputAsStruct	      off
      PortDimensions	      &quot;-1&quot;
      SampleTime	      &quot;-1&quot;
      OutMin		      &quot;[]&quot;
      OutMax		      &quot;[]&quot;
      DataType		      &quot;auto&quot;
      OutDataType	      &quot;fixdt(1,16,0)&quot;
      OutScaling	      &quot;[]&quot;
      OutDataTypeStr	      &quot;Inherit: auto&quot;
      LockScale		      off
      SignalType	      &quot;auto&quot;
      SamplingMode	      &quot;auto&quot;
      LatchByDelayingOutsideSignal off
      LatchByCopyingInsideSignal off
      Interpolate	      on
      DimensionsMode	      &quot;auto&quot;
    }
    Block {
      BlockType		      Outport
      Port		      &quot;1&quot;
      UseBusObject	      off
      BusObject		      &quot;BusObject&quot;
      BusOutputAsStruct	      off
      PortDimensions	      &quot;-1&quot;
      SampleTime	      &quot;-1&quot;
      OutMin		      &quot;[]&quot;
      OutMax		      &quot;[]&quot;
      DataType		      &quot;auto&quot;
      OutDataType	      &quot;fixdt(1,16,0)&quot;
      OutScaling	      &quot;[]&quot;
      OutDataTypeStr	      &quot;Inherit: auto&quot;
      LockScale		      off
      SignalType	      &quot;auto&quot;
      SamplingMode	      &quot;auto&quot;
      SourceOfInitialOutputValue &quot;Dialog&quot;
      OutputWhenDisabled      &quot;held&quot;
      InitialOutput	      &quot;[]&quot;
      DimensionsMode	      &quot;auto&quot;
    }
    Block {
      BlockType		      &quot;S-Function&quot;
      FunctionName	      &quot;system&quot;
      SFunctionModules	      &quot;&#039;&#039;&quot;
      PortCounts	      &quot;[]&quot;
      SFunctionDeploymentMode off
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      &quot;FromPortIcon&quot;
      Permissions	      &quot;ReadWrite&quot;
      PermitHierarchicalResolution &quot;All&quot;
      TreatAsAtomicUnit	      off
      CheckFcnCallInpInsideContextMsg off
      SystemSampleTime	      &quot;-1&quot;
      RTWFcnNameOpts	      &quot;Auto&quot;
      RTWFileNameOpts	      &quot;Auto&quot;
      RTWMemSecFuncInitTerm   &quot;Inherit from model&quot;
      RTWMemSecFuncExecute    &quot;Inherit from model&quot;
      RTWMemSecDataConstants  &quot;Inherit from model&quot;
      RTWMemSecDataInternal   &quot;Inherit from model&quot;
      RTWMemSecDataParameters &quot;Inherit from model&quot;
      SimViewingDevice	      off
      DataTypeOverride	      &quot;UseLocalSettings&quot;
      MinMaxOverflowLogging   &quot;UseLocalSettings&quot;
    }
    Block {
      BlockType		      Terminator
    }
  }
  System {
    Name		    &quot;testDescription&quot;
    Location		    [317, 358, 1148, 746]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    &quot;white&quot;
    PaperOrientation	    &quot;landscape&quot;
    PaperPositionMode	    &quot;auto&quot;
    PaperType		    &quot;A4&quot;
    PaperUnits		    &quot;centimeters&quot;
    TiledPaperMargins	    [1.270000, 1.270000, 1.270000, 1.270000]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    &quot;100&quot;
    ReportName		    &quot;simulink-default.rpt&quot;
    Block {
      BlockType		      BusCreator
      Name		      &quot;Bus\nCreator&quot;
      Ports		      [3, 1]
      Position		      [220, 55, 225, 135]
      ShowName		      off
      Inputs		      &quot;3&quot;
      DisplayOption	      &quot;bar&quot;
      UseBusObject	      on
      BusObject		      &quot;MainBus&quot;
      NonVirtualBus	      on
      Port {
	PortNumber		1
	PropagatedSignals	&quot;ele1, ele2, a1, a2&quot;
	ShowPropagatedSignals	&quot;all&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      BusCreator
      Name		      &quot;Bus\nCreator1&quot;
      Ports		      [2, 1]
      Position		      [175, 186, 180, 224]
      ShowName		      off
      Inputs		      &quot;2&quot;
      DisplayOption	      &quot;bar&quot;
      UseBusObject	      on
      BusObject		      &quot;SubBus&quot;
      NonVirtualBus	      on
      Port {
	PortNumber		1
	Name			&quot;ele3&quot;
	PropagatedSignals	&quot;a1, a2&quot;
	ShowPropagatedSignals	&quot;on&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      BusSelector
      Name		      &quot;Bus\nSelector1&quot;
      Ports		      [1, 2]
      Position		      [620, 56, 625, 94]
      ShowName		      off
      OutputSignals	      &quot;signal1,signal2&quot;
      Port {
	PortNumber		1
	Name			&quot;&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
      Port {
	PortNumber		2
	Name			&quot;&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      BusSelector
      Name		      &quot;Bus\nSelector2&quot;
      Ports		      [1, 2]
      Position		      [590, 221, 595, 259]
      ShowName		      off
      OutputSignals	      &quot;signal1,signal2&quot;
      Port {
	PortNumber		1
	Name			&quot;&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
      Port {
	PortNumber		2
	Name			&quot;&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      Constant
      Name		      &quot;Constant&quot;
      Position		      [95, 25, 125, 55]
      Value		      &quot;100&quot;
      OutDataTypeMode	      &quot;double&quot;
      OutDataType	      &quot;sfix(16)&quot;
      OutScaling	      &quot;2^0&quot;
      OutDataTypeStr	      &quot;double&quot;
      Port {
	PortNumber		1
	Name			&quot;ele1&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      Constant
      Name		      &quot;Constant1&quot;
      Position		      [95, 85, 125, 115]
      Value		      &quot;21&quot;
      OutDataTypeMode	      &quot;single&quot;
      OutDataType	      &quot;sfix(16)&quot;
      OutScaling	      &quot;2^0&quot;
      OutDataTypeStr	      &quot;single&quot;
      Port {
	PortNumber		1
	Name			&quot;ele2&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      Constant
      Name		      &quot;Constant2&quot;
      Position		      [90, 165, 120, 195]
      Value		      &quot;12&quot;
      OutDataTypeMode	      &quot;double&quot;
      OutDataType	      &quot;sfix(16)&quot;
      OutScaling	      &quot;2^0&quot;
      OutDataTypeStr	      &quot;double&quot;
      Port {
	PortNumber		1
	Name			&quot;a1&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      Constant
      Name		      &quot;Constant3&quot;
      Position		      [95, 240, 125, 270]
      Value		      &quot;13&quot;
      OutDataTypeMode	      &quot;double&quot;
      OutDataType	      &quot;sfix(16)&quot;
      OutScaling	      &quot;2^0&quot;
      OutDataTypeStr	      &quot;double&quot;
      Port {
	PortNumber		1
	Name			&quot;a2&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
    }
    Block {
      BlockType		      Display
      Name		      &quot;Display&quot;
      Ports		      [1]
      Position		      [715, 30, 805, 60]
      Decimation	      &quot;1&quot;
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      &quot;Display1&quot;
      Ports		      [1]
      Position		      [715, 75, 805, 105]
      Decimation	      &quot;1&quot;
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      &quot;Display2&quot;
      Ports		      [1]
      Position		      [715, 125, 805, 155]
      Decimation	      &quot;1&quot;
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      &quot;Display3&quot;
      Ports		      [1]
      Position		      [715, 170, 805, 200]
      Decimation	      &quot;1&quot;
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      &quot;Display4&quot;
      Ports		      [1]
      Position		      [720, 225, 810, 255]
      Decimation	      &quot;1&quot;
      Lockdown		      off
    }
    Block {
      BlockType		      Display
      Name		      &quot;Display5&quot;
      Ports		      [1]
      Position		      [720, 270, 810, 300]
      Decimation	      &quot;1&quot;
      Lockdown		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      &quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
      Ports		      [1, 2]
      Position		      [365, 90, 520, 190]
      PermitHierarchicalResolution &quot;ExplicitOnly&quot;
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      &quot;Auto&quot;
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      MaskType		      &quot;Stateflow&quot;
      MaskDescription	      &quot;Embedded MATLAB block&quot;
      MaskDisplay	      &quot;disp(&#039;cityBankBranch&#039;);&quot;
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      &quot;none&quot;
      MaskPortRotate	      &quot;default&quot;
      MaskIconUnits	      &quot;autoscale&quot;
      Port {
	PortNumber		1
	ShowPropagatedSignals	&quot;on&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
      Port {
	PortNumber		2
	ShowPropagatedSignals	&quot;on&quot;
	RTWStorageClass		&quot;Auto&quot;
	DataLoggingNameMode	&quot;SignalName&quot;
      }
      System {
	Name			&quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
	Location		[257, 457, 812, 717]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		&quot;white&quot;
	PaperOrientation	&quot;landscape&quot;
	PaperPositionMode	&quot;auto&quot;
	PaperType		&quot;A4&quot;
	PaperUnits		&quot;centimeters&quot;
	TiledPaperMargins	[1.270000, 1.270000, 1.270000, 1.270000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		&quot;100&quot;
	Block {
	  BlockType		  Inport
	  Name			  &quot;inbus&quot;
	  Position		  [20, 101, 40, 119]
	  IconDisplay		  &quot;Port number&quot;
	  OutDataType		  &quot;sfix(16)&quot;
	  OutScaling		  &quot;2^0&quot;
	}
	Block {
	  BlockType		  Demux
	  Name			  &quot; Demux &quot;
	  Ports			  [1, 1]
	  Position		  [270, 180, 320, 220]
	  Outputs		  &quot;1&quot;
	}
	Block {
	  BlockType		  &quot;S-Function&quot;
	  Name			  &quot; SFunction &quot;
	  Tag			  &quot;Stateflow S-Function testDescription 1&quot;
	  Ports			  [1, 3]
	  Position		  [180, 100, 230, 180]
	  FunctionName		  &quot;sf_sfun&quot;
	  PortCounts		  &quot;[1 3]&quot;
	  EnableBusSupport	  on
	  Port {
	    PortNumber		    2
	    Name		    &quot;outbus&quot;
	    RTWStorageClass	    &quot;Auto&quot;
	    DataLoggingNameMode	    &quot;SignalName&quot;
	  }
	  Port {
	    PortNumber		    3
	    Name		    &quot;outbus1&quot;
	    RTWStorageClass	    &quot;Auto&quot;
	    DataLoggingNameMode	    &quot;SignalName&quot;
	  }
	}
	Block {
	  BlockType		  Terminator
	  Name			  &quot; Terminator &quot;
	  Position		  [460, 191, 480, 209]
	}
	Block {
	  BlockType		  Outport
	  Name			  &quot;outbus&quot;
	  Position		  [460, 101, 480, 119]
	  IconDisplay		  &quot;Port number&quot;
	  OutDataType		  &quot;sfix(16)&quot;
	  OutScaling		  &quot;2^0&quot;
	}
	Block {
	  BlockType		  Outport
	  Name			  &quot;outbus1&quot;
	  Position		  [460, 136, 480, 154]
	  Port			  &quot;2&quot;
	  IconDisplay		  &quot;Port number&quot;
	  OutDataType		  &quot;sfix(16)&quot;
	  OutScaling		  &quot;2^0&quot;
	}
	Line {
	  SrcBlock		  &quot; SFunction &quot;
	  SrcPort		  1
	  DstBlock		  &quot; Demux &quot;
	  DstPort		  1
	}
	Line {
	  SrcBlock		  &quot;inbus&quot;
	  SrcPort		  1
	  DstBlock		  &quot; SFunction &quot;
	  DstPort		  1
	}
	Line {
	  Name			  &quot;outbus&quot;
	  Labels		  [0, 0]
	  SrcBlock		  &quot; SFunction &quot;
	  SrcPort		  2
	  DstBlock		  &quot;outbus&quot;
	  DstPort		  1
	}
	Line {
	  Name			  &quot;outbus1&quot;
	  Labels		  [0, 0]
	  SrcBlock		  &quot; SFunction &quot;
	  SrcPort		  3
	  DstBlock		  &quot;outbus1&quot;
	  DstPort		  1
	}
	Line {
	  SrcBlock		  &quot; Demux &quot;
	  SrcPort		  1
	  DstBlock		  &quot; Terminator &quot;
	  DstPort		  1
	}
      }
    }
    Line {
      Name		      &quot;ele1&quot;
      Labels		      [0, 0]
      SrcBlock		      &quot;Constant&quot;
      SrcPort		      1
      Points		      [35, 0; 0, 30]
      DstBlock		      &quot;Bus\nCreator&quot;
      DstPort		      1
    }
    Line {
      Name		      &quot;ele2&quot;
      Labels		      [0, 0]
      SrcBlock		      &quot;Constant1&quot;
      SrcPort		      1
      Points		      [75, 0]
      DstBlock		      &quot;Bus\nCreator&quot;
      DstPort		      2
    }
    Line {
      Name		      &quot;a1&quot;
      Labels		      [0, 0]
      SrcBlock		      &quot;Constant2&quot;
      SrcPort		      1
      Points		      [15, 0; 0, 15]
      DstBlock		      &quot;Bus\nCreator1&quot;
      DstPort		      1
    }
    Line {
      Name		      &quot;a2&quot;
      Labels		      [0, 0]
      SrcBlock		      &quot;Constant3&quot;
      SrcPort		      1
      Points		      [15, 0; 0, -40]
      DstBlock		      &quot;Bus\nCreator1&quot;
      DstPort		      2
    }
    Line {
      Name		      &quot;ele3&quot;
      Labels		      [0, 0]
      SrcBlock		      &quot;Bus\nCreator1&quot;
      SrcPort		      1
      Points		      [10, 0; 0, -85]
      DstBlock		      &quot;Bus\nCreator&quot;
      DstPort		      3
    }
    Line {
      Labels		      [2, 0]
      SrcBlock		      &quot;Bus\nCreator&quot;
      SrcPort		      1
      Points		      [45, 0; 0, 45]
      DstBlock		      &quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
      DstPort		      1
    }
    Line {
      Name		      &quot;&quot;
      Labels		      [3, 0]
      SrcBlock		      &quot;Bus\nSelector2&quot;
      SrcPort		      1
      Points		      [50, 0; 0, 10]
      DstBlock		      &quot;Display4&quot;
      DstPort		      1
    }
    Line {
      Name		      &quot;&quot;
      Labels		      [0, 0]
      SrcBlock		      &quot;Bus\nSelector2&quot;
      SrcPort		      2
      Points		      [50, 0; 0, 35]
      DstBlock		      &quot;Display5&quot;
      DstPort		      1
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      &quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
      SrcPort		      2
      Points		      [10, 0; 0, 75]
      DstBlock		      &quot;Bus\nSelector2&quot;
      DstPort		      1
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      &quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
      SrcPort		      1
      Points		      [5, 0; 0, -40]
      DstBlock		      &quot;Bus\nSelector1&quot;
      DstPort		      1
    }
    Annotation {
      Name		      &quot;MainBus&quot;
      Position		      [229, 149]
    }
    Annotation {
      Name		      &quot;SubBus&quot;
      Position		      [181, 237]
    }
  }
}
# Finite State Machines
#
#    Stateflow Version 7.1 (R2009a) dated Jan 28 2009, 05:16:58
#
#


Stateflow {
  machine {
    id			    1
    name		    &quot;testDescription&quot;
    created		    &quot;04-Jul-2009 08:00:42&quot;
    isLibrary		    0
    firstTarget		    10
    sfVersion		    71014000.000008
  }
  chart {
    id			    2
    name		    &quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
    windowPosition	    [311.813 325.875 200.25 189.75]
    viewLimits		    [0 156.75 0 153.75]
    screen		    [1 1 1280 800 1.333333333333333]
    treeNode		    [0 3 0 0]
    firstTransition	    5
    firstJunction	    4
    viewObj		    2
    machine		    1
    ssIdHighWaterMark	    6
    decomposition	    CLUSTER_CHART
    type		    EML_CHART
    firstData		    6
    chartFileNumber	    1
    disableImplicitCasting  1
    eml {
      name		      &quot;cityBankBranch&quot;
    }
  }
  state {
    id			    3
    labelString		    &quot;eML_blk_kernel()&quot;
    position		    [18 64.5 118 66]
    fontSize		    12
    chart		    2
    treeNode		    [2 0 0 0]
    superState		    SUBCHART
    subviewer		    2
    ssIdNumber		    1
    type		    FUNC_STATE
    decomposition	    CLUSTER_STATE
    eml {
      isEML		      1
      script		      &quot;function [outbus, outbus1] = cityBankBranch(inbus)\n%substruct.a1 = inbus.ele3.a1;\n%substruct.a2&quot;
      &quot; = int8([1 2; 3 4]);\n%substruct.a2 = 4;\nsubstruct = struct(&#039;a1&#039;,inbus.ele3.a1,&#039;a2&#039;,4);\nmystruct = struct(&#039;ele&quot;
      &quot;1&#039;,20.5,&#039;ele2&#039;,single(100),&#039;ele3&#039;,substruct);\n\noutbus = mystruct;\noutbus.ele3.a2 = 2*(substruct.a2);\n\noutbu&quot;
      &quot;s1 = inbus.ele3;\n\n\n% function s   = cityBankBranch(descriptionFlag)\n% \n%     s.nberOfMethod = 3;\n%     s.m&quot;
      &quot;ethod(1).name = &#039;deposit&#039;;\n%     s.method(2).name = &#039;withdraw&#039;;\n%     s.method(3).name = &#039;getBalance&#039;;\n% \n% &quot;
      &quot;    s.method(1).nberOfOutput = 2;\n%     s.method(1).output(1).name = &#039;double&#039;;\n%     s.method(1).output(2).nam&quot;
      &quot;e = &#039;int&#039;;\n%     s.method(1).nberOfInput = 1;\n%     s.method(1).input(1).name = &#039;double&#039;;\n% \n%     s.method(&quot;
      &quot;2).nberOfOutput = 1;\n%     s.method(2).output(1).name = &#039;int&#039;;\n%     s.method(2).nberOfInput = 2;\n%     s.met&quot;
      &quot;hod(2).input(1).name = &#039;double&#039;;\n%     s.method(2).input(2).name = &#039;double&#039;;\n% \n%     s.method(3).nberOfOutpu&quot;
      &quot;t = 1;\n%     s.method(3).output(1).name = &#039;int&#039;;\n%     s.method(3).nberOfInput = 1;\n%     s.method(3).input(1&quot;
      &quot;).name = &#039;int&#039;;\n\n&quot;
      editorLayout	      &quot;100 M4x1[215 17 977 420]&quot;
      fimathForFiConstructors FimathMatlabFactoryDefault
    }
  }
  junction {
    id			    4
    position		    [23.5747 49.5747 7]
    chart		    2
    linkNode		    [2 0 0]
    subviewer		    2
    ssIdNumber		    3
    type		    CONNECTIVE_JUNCTION
  }
  transition {
    id			    5
    labelString		    &quot;{eML_blk_kernel();}&quot;
    labelPosition	    [32.125 19.875 102.544 14.964]
    fontSize		    12
    src {
      intersection	      [0 0 1 0 23.5747 14.625 0 0]
    }
    dst {
      id		      4
      intersection	      [7 0 -1 -1 23.5747 42.5747 0 0]
    }
    midPoint		    [23.5747 24.9468]
    chart		    2
    linkNode		    [2 0 0]
    dataLimits		    [21.175 25.975 14.625 42.575]
    subviewer		    2
    drawStyle		    SMART
    executionOrder	    1
    ssIdNumber		    2
  }
  data {
    id			    6
    ssIdNumber		    4
    name		    &quot;inbus&quot;
    linkNode		    [2 0 7]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			&quot;-1&quot;
      }
      type {
	method			SF_SIMULINK_OBJECT_TYPE
	busObject		&quot;&quot;
	fixpt {
	  scalingMode		  SF_FIXPT_BINARY_POINT
	}
      }
    }
    dataType		    &quot;Bus: &quot;
  }
  data {
    id			    7
    ssIdNumber		    5
    name		    &quot;outbus&quot;
    linkNode		    [2 6 8]
    scope		    OUTPUT_DATA
    machine		    1
    props {
      array {
	size			&quot;-1&quot;
      }
      type {
	method			SF_SIMULINK_OBJECT_TYPE
	expression		&quot;MainBus&quot;
	busObject		&quot;&quot;
	fixpt {
	  scalingMode		  SF_FIXPT_BINARY_POINT
	}
      }
      frame		      SF_FRAME_NO
    }
    dataType		    &quot;Bus: &quot;
  }
  data {
    id			    8
    ssIdNumber		    6
    name		    &quot;outbus1&quot;
    linkNode		    [2 7 0]
    scope		    OUTPUT_DATA
    machine		    1
    props {
      array {
	size			&quot;-1&quot;
      }
      type {
	method			SF_SIMULINK_OBJECT_TYPE
	expression		&quot;SubBus&quot;
	busObject		&quot;&quot;
	fixpt {
	  scalingMode		  SF_FIXPT_BINARY_POINT
	}
      }
      frame		      SF_FRAME_NO
    }
    dataType		    &quot;Bus: &quot;
  }
  instance {
    id			    9
    name		    &quot;Embedded\nMATLAB Function\n--COMPUTATION UNIT--&quot;
    machine		    1
    chart		    2
  }
  target {
    id			    10
    name		    &quot;sfun&quot;
    codeFlags		    &quot;&quot;
    machine		    1
    linkNode		    [1 0 0]
  }
}

/**************************************************/</description>
		<content:encoded><![CDATA[<p>@Seth&#8211;nice post on Bus<br />
I am having a problem with Bus and embedded Maltab, I need non virtual bus as I a defining interfaces. I have replicated the example of the online Documentation-&gt;Simulink-&gt;Using the embedded Matlab Function Blocks&#8211;&gt; Working with structures and Bus signals.</p>
<p>It just does not work and I am wondering what the problem might be, This is an excerpt of message I am getting from Matlab, </p>
<p>Warning: &#8216;testDescription/Bus Selector2&#8242; must be connected to a Bus Creator, Bus<br />
Selector or a bus capable block.<br />
 A possible cause of this error is the use of a bus-capable block (such as Merge or<br />
 Unit Delay) that in this current situation is unable to propagate the bus<br />
 downstream to the block reported in this error. Please see Simulink documentation<br />
 for further information on composite (i.e. bus) signals and their proper usage.<br />
&gt; In busSelectorddg_cb at 37<br />
  In busSelectorddg_cb at 111</p>
<p>&#8220;<br />
As I cant attached my model file, please accept my apology for adding the content of my mdl file here.</p>
<p>/**************************************************/<br />
Model {<br />
  Name			  &#8220;testDescription&#8221;<br />
  Version		  7.3<br />
  MdlSubVersion		  0<br />
  GraphicalInterface {<br />
    NumRootInports	    0<br />
    NumRootOutports	    0<br />
    ParameterArgumentNames  &#8220;&#8221;<br />
    ComputedModelVersion    &#8220;1.87&#8243;<br />
    NumModelReferences	    0<br />
    NumTestPointedSignals   0<br />
  }<br />
  SavedCharacterEncoding  &#8220;ibm-5348_P100-1997&#8243;<br />
  SaveDefaultBlockParams  on<br />
  ScopeRefreshTime	  0.035000<br />
  OverrideScopeRefreshTime on<br />
  DisableAllScopes	  off<br />
  DataTypeOverride	  &#8220;UseLocalSettings&#8221;<br />
  MinMaxOverflowLogging	  &#8220;UseLocalSettings&#8221;<br />
  MinMaxOverflowArchiveMode &#8220;Overwrite&#8221;<br />
  Created		  &#8220;Sat Jul 04 08:00:35 2009&#8243;<br />
  Creator		  &#8220;Admin&#8221;<br />
  UpdateHistory		  &#8220;UpdateHistoryNever&#8221;<br />
  ModifiedByFormat	  &#8220;%&#8221;<br />
  LastModifiedBy	  &#8220;Admin&#8221;<br />
  ModifiedDateFormat	  &#8220;%&#8221;<br />
  LastModifiedDate	  &#8220;Mon Jul 06 22:54:24 2009&#8243;<br />
  RTWModifiedTimeStamp	  0<br />
  ModelVersionFormat	  &#8220;1.%&#8221;<br />
  ConfigurationManager	  &#8220;None&#8221;<br />
  SampleTimeColors	  on<br />
  SampleTimeAnnotations	  off<br />
  LibraryLinkDisplay	  &#8220;none&#8221;<br />
  WideLines		  on<br />
  ShowLineDimensions	  on<br />
  ShowPortDataTypes	  on<br />
  ShowLoopsOnError	  on<br />
  IgnoreBidirectionalLines off<br />
  ShowStorageClass	  on<br />
  ShowTestPointIcons	  on<br />
  ShowSignalResolutionIcons on<br />
  ShowViewerIcons	  on<br />
  SortedOrder		  off<br />
  ExecutionContextIcon	  off<br />
  ShowLinearizationAnnotations on<br />
  BlockNameDataTip	  off<br />
  BlockParametersDataTip  off<br />
  BlockDescriptionStringDataTip	off<br />
  ToolBar		  on<br />
  StatusBar		  on<br />
  BrowserShowLibraryLinks off<br />
  BrowserLookUnderMasks	  off<br />
  SimulationMode	  &#8220;normal&#8221;<br />
  LinearizationMsg	  &#8220;none&#8221;<br />
  Profile		  off<br />
  ParamWorkspaceSource	  &#8220;MATLABWorkspace&#8221;<br />
  AccelSystemTargetFile	  &#8220;accel.tlc&#8221;<br />
  AccelTemplateMakefile	  &#8220;accel_default_tmf&#8221;<br />
  AccelMakeCommand	  &#8220;make_rtw&#8221;<br />
  TryForcingSFcnDF	  off<br />
  RecordCoverage	  off<br />
  CovPath		  &#8220;/&#8221;<br />
  CovSaveName		  &#8220;covdata&#8221;<br />
  CovMetricSettings	  &#8220;dw&#8221;<br />
  CovNameIncrementing	  off<br />
  CovHtmlReporting	  on<br />
  covSaveCumulativeToWorkspaceVar on<br />
  CovSaveSingleToWorkspaceVar on<br />
  CovCumulativeVarName	  &#8220;covCumulativeData&#8221;<br />
  CovCumulativeReport	  off<br />
  CovReportOnPause	  on<br />
  CovModelRefEnable	  &#8220;Off&#8221;<br />
  CovExternalEMLEnable	  off<br />
  ExtModeBatchMode	  off<br />
  ExtModeEnableFloating	  on<br />
  ExtModeTrigType	  &#8220;manual&#8221;<br />
  ExtModeTrigMode	  &#8220;normal&#8221;<br />
  ExtModeTrigPort	  &#8220;1&#8243;<br />
  ExtModeTrigElement	  &#8220;any&#8221;<br />
  ExtModeTrigDuration	  1000<br />
  ExtModeTrigDurationFloating &#8220;auto&#8221;<br />
  ExtModeTrigHoldOff	  0<br />
  ExtModeTrigDelay	  0<br />
  ExtModeTrigDirection	  &#8220;rising&#8221;<br />
  ExtModeTrigLevel	  0<br />
  ExtModeArchiveMode	  &#8220;off&#8221;<br />
  ExtModeAutoIncOneShot	  off<br />
  ExtModeIncDirWhenArm	  off<br />
  ExtModeAddSuffixToVar	  off<br />
  ExtModeWriteAllDataToWs off<br />
  ExtModeArmWhenConnect	  on<br />
  ExtModeSkipDownloadWhenConnect off<br />
  ExtModeLogAll		  on<br />
  ExtModeAutoUpdateStatusClock on<br />
  BufferReuse		  off<br />
  ShowModelReferenceBlockVersion off<br />
  ShowModelReferenceBlockIO off<br />
  Array {<br />
    Type		    &#8220;Handle&#8221;<br />
    Dimension		    1<br />
    Simulink.ConfigSet {<br />
      $ObjectID		      1<br />
      Version		      &#8220;1.6.0&#8243;<br />
      Array {<br />
	Type			&#8220;Handle&#8221;<br />
	Dimension		8<br />
	Simulink.SolverCC {<br />
	  $ObjectID		  2<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  StartTime		  &#8220;0.0&#8243;<br />
	  StopTime		  &#8220;10.0&#8243;<br />
	  AbsTol		  &#8220;auto&#8221;<br />
	  FixedStep		  &#8220;0.1&#8243;<br />
	  InitialStep		  &#8220;auto&#8221;<br />
	  MaxNumMinSteps	  &#8220;-1&#8243;<br />
	  MaxOrder		  5<br />
	  ZcThreshold		  &#8220;auto&#8221;<br />
	  ConsecutiveZCsStepRelTol &#8220;10*128*eps&#8221;<br />
	  MaxConsecutiveZCs	  &#8220;1000&#8243;<br />
	  ExtrapolationOrder	  4<br />
	  NumberNewtonIterations  1<br />
	  MaxStep		  &#8220;auto&#8221;<br />
	  MinStep		  &#8220;auto&#8221;<br />
	  MaxConsecutiveMinStep	  &#8220;1&#8243;<br />
	  RelTol		  &#8220;1e-3&#8243;<br />
	  SolverMode		  &#8220;Auto&#8221;<br />
	  Solver		  &#8220;FixedStepDiscrete&#8221;<br />
	  SolverName		  &#8220;FixedStepDiscrete&#8221;<br />
	  ShapePreserveControl	  &#8220;DisableAll&#8221;<br />
	  ZeroCrossControl	  &#8220;UseLocalSettings&#8221;<br />
	  ZeroCrossAlgorithm	  &#8220;Nonadaptive&#8221;<br />
	  AlgebraicLoopSolver	  &#8220;TrustRegion&#8221;<br />
	  SolverResetMethod	  &#8220;Fast&#8221;<br />
	  PositivePriorityOrder	  off<br />
	  AutoInsertRateTranBlk	  off<br />
	  SampleTimeConstraint	  &#8220;Unconstrained&#8221;<br />
	  InsertRTBMode		  &#8220;Whenever possible&#8221;<br />
	  SignalSizeVariationType &#8220;Allow only fixed size&#8221;<br />
	}<br />
	Simulink.DataIOCC {<br />
	  $ObjectID		  3<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  Decimation		  &#8220;1&#8243;<br />
	  ExternalInput		  &#8220;[t, u]&#8220;<br />
	  FinalStateName	  &#8220;xFinal&#8221;<br />
	  InitialState		  &#8220;xInitial&#8221;<br />
	  LimitDataPoints	  on<br />
	  MaxDataPoints		  &#8220;1000&#8243;<br />
	  LoadExternalInput	  off<br />
	  LoadInitialState	  off<br />
	  SaveFinalState	  off<br />
	  SaveCompleteFinalSimState off<br />
	  SaveFormat		  &#8220;Array&#8221;<br />
	  SaveOutput		  on<br />
	  SaveState		  off<br />
	  SignalLogging		  on<br />
	  InspectSignalLogs	  off<br />
	  SaveTime		  on<br />
	  StateSaveName		  &#8220;xout&#8221;<br />
	  TimeSaveName		  &#8220;tout&#8221;<br />
	  OutputSaveName	  &#8220;yout&#8221;<br />
	  SignalLoggingName	  &#8220;logsout&#8221;<br />
	  OutputOption		  &#8220;RefineOutputTimes&#8221;<br />
	  OutputTimes		  &#8220;[]&#8220;<br />
	  Refine		  &#8220;1&#8243;<br />
	}<br />
	Simulink.OptimizationCC {<br />
	  $ObjectID		  4<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  Array {<br />
	    Type		    &#8220;Cell&#8221;<br />
	    Dimension		    4<br />
	    Cell		    &#8220;ZeroExternalMemoryAtStartup&#8221;<br />
	    Cell		    &#8220;ZeroInternalMemoryAtStartup&#8221;<br />
	    Cell		    &#8220;NoFixptDivByZeroProtection&#8221;<br />
	    Cell		    &#8220;OptimizeModelRefInitCode&#8221;<br />
	    PropName		    &#8220;DisabledProps&#8221;<br />
	  }<br />
	  BlockReduction	  off<br />
	  BooleanDataType	  on<br />
	  ConditionallyExecuteInputs on<br />
	  InlineParams		  off<br />
	  InlineInvariantSignals  on<br />
	  OptimizeBlockIOStorage  off<br />
	  BufferReuse		  off<br />
	  EnhancedBackFolding	  off<br />
	  StrengthReduction	  off<br />
	  EnforceIntegerDowncast  on<br />
	  ExpressionFolding	  off<br />
	  EnableMemcpy		  on<br />
	  MemcpyThreshold	  64<br />
	  PassReuseOutputArgsAs	  &#8220;Structure reference&#8221;<br />
	  ExpressionDepthLimit	  2147483647<br />
	  FoldNonRolledExpr	  on<br />
	  LocalBlockOutputs	  off<br />
	  RollThreshold		  5<br />
	  SystemCodeInlineAuto	  off<br />
	  StateBitsets		  off<br />
	  DataBitsets		  off<br />
	  UseTempVars		  off<br />
	  ZeroExternalMemoryAtStartup on<br />
	  ZeroInternalMemoryAtStartup on<br />
	  InitFltsAndDblsToZero	  on<br />
	  NoFixptDivByZeroProtection off<br />
	  EfficientFloat2IntCast  off<br />
	  EfficientMapNaN2IntZero on<br />
	  OptimizeModelRefInitCode off<br />
	  LifeSpan		  &#8220;inf&#8221;<br />
	  BufferReusableBoundary  on<br />
	  SimCompilerOptimization &#8220;Off&#8221;<br />
	  AccelVerboseBuild	  off<br />
	}<br />
	Simulink.DebuggingCC {<br />
	  $ObjectID		  5<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  RTPrefix		  &#8220;error&#8221;<br />
	  ConsistencyChecking	  &#8220;none&#8221;<br />
	  ArrayBoundsChecking	  &#8220;none&#8221;<br />
	  SignalInfNanChecking	  &#8220;none&#8221;<br />
	  SignalRangeChecking	  &#8220;none&#8221;<br />
	  ReadBeforeWriteMsg	  &#8220;UseLocalSettings&#8221;<br />
	  WriteAfterWriteMsg	  &#8220;UseLocalSettings&#8221;<br />
	  WriteAfterReadMsg	  &#8220;UseLocalSettings&#8221;<br />
	  AlgebraicLoopMsg	  &#8220;warning&#8221;<br />
	  ArtificialAlgebraicLoopMsg &#8220;warning&#8221;<br />
	  SaveWithDisabledLinksMsg &#8220;warning&#8221;<br />
	  SaveWithParameterizedLinksMsg	&#8220;none&#8221;<br />
	  CheckSSInitialOutputMsg on<br />
	  UnderspecifiedInitializationDetection	&#8220;Classic&#8221;<br />
	  MergeDetectMultiDrivingBlocksExec &#8220;none&#8221;<br />
	  CheckExecutionContextPreStartOutputMsg off<br />
	  CheckExecutionContextRuntimeOutputMsg	off<br />
	  SignalResolutionControl &#8220;TryResolveAllWithWarning&#8221;<br />
	  BlockPriorityViolationMsg &#8220;warning&#8221;<br />
	  MinStepSizeMsg	  &#8220;warning&#8221;<br />
	  TimeAdjustmentMsg	  &#8220;none&#8221;<br />
	  MaxConsecutiveZCsMsg	  &#8220;error&#8221;<br />
	  SolverPrmCheckMsg	  &#8220;warning&#8221;<br />
	  InheritedTsInSrcMsg	  &#8220;warning&#8221;<br />
	  DiscreteInheritContinuousMsg &#8220;warning&#8221;<br />
	  MultiTaskDSMMsg	  &#8220;warning&#8221;<br />
	  MultiTaskCondExecSysMsg &#8220;none&#8221;<br />
	  MultiTaskRateTransMsg	  &#8220;error&#8221;<br />
	  SingleTaskRateTransMsg  &#8220;none&#8221;<br />
	  TasksWithSamePriorityMsg &#8220;warning&#8221;<br />
	  SigSpecEnsureSampleTimeMsg &#8220;warning&#8221;<br />
	  CheckMatrixSingularityMsg &#8220;none&#8221;<br />
	  IntegerOverflowMsg	  &#8220;warning&#8221;<br />
	  Int32ToFloatConvMsg	  &#8220;warning&#8221;<br />
	  ParameterDowncastMsg	  &#8220;error&#8221;<br />
	  ParameterOverflowMsg	  &#8220;error&#8221;<br />
	  ParameterUnderflowMsg	  &#8220;none&#8221;<br />
	  ParameterPrecisionLossMsg &#8220;warning&#8221;<br />
	  ParameterTunabilityLossMsg &#8220;warning&#8221;<br />
	  UnderSpecifiedDataTypeMsg &#8220;none&#8221;<br />
	  UnnecessaryDatatypeConvMsg &#8220;none&#8221;<br />
	  VectorMatrixConversionMsg &#8220;none&#8221;<br />
	  InvalidFcnCallConnMsg	  &#8220;error&#8221;<br />
	  FcnCallInpInsideContextMsg &#8220;Use local settings&#8221;<br />
	  SignalLabelMismatchMsg  &#8220;none&#8221;<br />
	  UnconnectedInputMsg	  &#8220;warning&#8221;<br />
	  UnconnectedOutputMsg	  &#8220;warning&#8221;<br />
	  UnconnectedLineMsg	  &#8220;warning&#8221;<br />
	  SFcnCompatibilityMsg	  &#8220;none&#8221;<br />
	  UniqueDataStoreMsg	  &#8220;none&#8221;<br />
	  BusObjectLabelMismatch  &#8220;warning&#8221;<br />
	  RootOutportRequireBusObject &#8220;warning&#8221;<br />
	  AssertControl		  &#8220;UseLocalSettings&#8221;<br />
	  EnableOverflowDetection off<br />
	  ModelReferenceIOMsg	  &#8220;none&#8221;<br />
	  ModelReferenceVersionMismatchMessage &#8220;none&#8221;<br />
	  ModelReferenceIOMismatchMessage &#8220;none&#8221;<br />
	  ModelReferenceCSMismatchMessage &#8220;none&#8221;<br />
	  UnknownTsInhSupMsg	  &#8220;warning&#8221;<br />
	  ModelReferenceDataLoggingMessage &#8220;warning&#8221;<br />
	  ModelReferenceSymbolNameMessage &#8220;warning&#8221;<br />
	  ModelReferenceExtraNoncontSigs &#8220;error&#8221;<br />
	  StateNameClashWarn	  &#8220;warning&#8221;<br />
	  StrictBusMsg		  &#8220;ErrorOnBusTreatedAsVector&#8221;<br />
	  LoggingUnavailableSignals &#8220;error&#8221;<br />
	  BlockIODiagnostic	  &#8220;none&#8221;<br />
	}<br />
	Simulink.HardwareCC {<br />
	  $ObjectID		  6<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  ProdBitPerChar	  8<br />
	  ProdBitPerShort	  16<br />
	  ProdBitPerInt		  32<br />
	  ProdBitPerLong	  32<br />
	  ProdIntDivRoundTo	  &#8220;Undefined&#8221;<br />
	  ProdEndianess		  &#8220;Unspecified&#8221;<br />
	  ProdWordSize		  32<br />
	  ProdShiftRightIntArith  on<br />
	  ProdHWDeviceType	  &#8220;32-bit Generic&#8221;<br />
	  TargetBitPerChar	  8<br />
	  TargetBitPerShort	  16<br />
	  TargetBitPerInt	  32<br />
	  TargetBitPerLong	  32<br />
	  TargetShiftRightIntArith on<br />
	  TargetIntDivRoundTo	  &#8220;Undefined&#8221;<br />
	  TargetEndianess	  &#8220;Unspecified&#8221;<br />
	  TargetWordSize	  32<br />
	  TargetTypeEmulationWarnSuppressLevel 0<br />
	  TargetPreprocMaxBitsSint 32<br />
	  TargetPreprocMaxBitsUint 32<br />
	  TargetHWDeviceType	  &#8220;Specified&#8221;<br />
	  TargetUnknown		  off<br />
	  ProdEqTarget		  on<br />
	}<br />
	Simulink.ModelReferenceCC {<br />
	  $ObjectID		  7<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  UpdateModelReferenceTargets &#8220;IfOutOfDateOrStructuralChange&#8221;<br />
	  CheckModelReferenceTargetMessage &#8220;error&#8221;<br />
	  ModelReferenceNumInstancesAllowed &#8220;Multi&#8221;<br />
	  ModelReferencePassRootInputsByReference on<br />
	  ModelReferenceMinAlgLoopOccurrences off<br />
	}<br />
	Simulink.SFSimCC {<br />
	  $ObjectID		  8<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  SFSimEnableDebug	  on<br />
	  SFSimOverflowDetection  on<br />
	  SFSimEcho		  on<br />
	  SimBlas		  on<br />
	  SimUseLocalCustomCode	  off<br />
	  SimBuildMode		  &#8220;sf_incremental_build&#8221;<br />
	}<br />
	Simulink.RTWCC {<br />
	  $BackupClass		  &#8220;Simulink.RTWCC&#8221;<br />
	  $ObjectID		  9<br />
	  Version		  &#8220;1.6.0&#8243;<br />
	  Array {<br />
	    Type		    &#8220;Cell&#8221;<br />
	    Dimension		    1<br />
	    Cell		    &#8220;IncludeHyperlinkInReport&#8221;<br />
	    PropName		    &#8220;DisabledProps&#8221;<br />
	  }<br />
	  SystemTargetFile	  &#8220;grt.tlc&#8221;<br />
	  GenCodeOnly		  off<br />
	  MakeCommand		  &#8220;make_rtw&#8221;<br />
	  GenerateMakefile	  on<br />
	  TemplateMakefile	  &#8220;grt_default_tmf&#8221;<br />
	  GenerateReport	  off<br />
	  SaveLog		  off<br />
	  RTWVerbose		  on<br />
	  RetainRTWFile		  off<br />
	  ProfileTLC		  off<br />
	  TLCDebug		  off<br />
	  TLCCoverage		  off<br />
	  TLCAssert		  off<br />
	  ProcessScriptMode	  &#8220;Default&#8221;<br />
	  ConfigurationMode	  &#8220;Optimized&#8221;<br />
	  ConfigAtBuild		  off<br />
	  RTWUseLocalCustomCode	  off<br />
	  RTWUseSimCustomCode	  off<br />
	  IncludeHyperlinkInReport off<br />
	  LaunchReport		  off<br />
	  TargetLang		  &#8220;C&#8221;<br />
	  IncludeBusHierarchyInRTWFileBlockHierarchyMap	off<br />
	  IncludeERTFirstTime	  on<br />
	  GenerateTraceInfo	  off<br />
	  GenerateTraceReport	  off<br />
	  GenerateTraceReportSl	  off<br />
	  GenerateTraceReportSf	  off<br />
	  GenerateTraceReportEml  off<br />
	  GenerateCodeInfo	  off<br />
	  RTWCompilerOptimization &#8220;Off&#8221;<br />
	  CheckMdlBeforeBuild	  &#8220;Off&#8221;<br />
	  Array {<br />
	    Type		    &#8220;Handle&#8221;<br />
	    Dimension		    2<br />
	    Simulink.CodeAppCC {<br />
	      $ObjectID		      10<br />
	      Version		      &#8220;1.6.0&#8243;<br />
	      Array {<br />
		Type			&#8220;Cell&#8221;<br />
		Dimension		9<br />
		Cell			&#8220;IgnoreCustomStorageClasses&#8221;<br />
		Cell			&#8220;InsertBlockDesc&#8221;<br />
		Cell			&#8220;SFDataObjDesc&#8221;<br />
		Cell			&#8220;SimulinkDataObjDesc&#8221;<br />
		Cell			&#8220;DefineNamingRule&#8221;<br />
		Cell			&#8220;SignalNamingRule&#8221;<br />
		Cell			&#8220;ParamNamingRule&#8221;<br />
		Cell			&#8220;InlinedPrmAccess&#8221;<br />
		Cell			&#8220;CustomSymbolStr&#8221;<br />
		PropName		&#8220;DisabledProps&#8221;<br />
	      }<br />
	      ForceParamTrailComments off<br />
	      GenerateComments	      on<br />
	      IgnoreCustomStorageClasses on<br />
	      IgnoreTestpoints	      off<br />
	      IncHierarchyInIds	      off<br />
	      MaxIdLength	      31<br />
	      PreserveName	      off<br />
	      PreserveNameWithParent  off<br />
	      ShowEliminatedStatement off<br />
	      IncAutoGenComments      off<br />
	      SimulinkDataObjDesc     off<br />
	      SFDataObjDesc	      off<br />
	      IncDataTypeInIds	      off<br />
	      MangleLength	      1<br />
	      CustomSymbolStrGlobalVar &#8220;$R$N$M&#8221;<br />
	      CustomSymbolStrType     &#8220;$N$R$M&#8221;<br />
	      CustomSymbolStrField    &#8220;$N$M&#8221;<br />
	      CustomSymbolStrFcn      &#8220;$R$N$M$F&#8221;<br />
	      CustomSymbolStrBlkIO    &#8220;rtb_$N$M&#8221;<br />
	      CustomSymbolStrTmpVar   &#8220;$N$M&#8221;<br />
	      CustomSymbolStrMacro    &#8220;$R$N$M&#8221;<br />
	      DefineNamingRule	      &#8220;None&#8221;<br />
	      ParamNamingRule	      &#8220;None&#8221;<br />
	      SignalNamingRule	      &#8220;None&#8221;<br />
	      InsertBlockDesc	      off<br />
	      SimulinkBlockComments   on<br />
	      EnableCustomComments    off<br />
	      InlinedPrmAccess	      &#8220;Literals&#8221;<br />
	      ReqsInCode	      off<br />
	      UseSimReservedNames     off<br />
	    }<br />
	    Simulink.GRTTargetCC {<br />
	      $BackupClass	      &#8220;Simulink.TargetCC&#8221;<br />
	      $ObjectID		      11<br />
	      Version		      &#8220;1.6.0&#8243;<br />
	      Array {<br />
		Type			&#8220;Cell&#8221;<br />
		Dimension		12<br />
		Cell			&#8220;IncludeMdlTerminateFcn&#8221;<br />
		Cell			&#8220;CombineOutputUpdateFcns&#8221;<br />
		Cell			&#8220;SuppressErrorStatus&#8221;<br />
		Cell			&#8220;ERTCustomFileBanners&#8221;<br />
		Cell			&#8220;GenerateSampleERTMain&#8221;<br />
		Cell			&#8220;MultiInstanceERTCode&#8221;<br />
		Cell			&#8220;PurelyIntegerCode&#8221;<br />
		Cell			&#8220;SupportNonFinite&#8221;<br />
		Cell			&#8220;SupportComplex&#8221;<br />
		Cell			&#8220;SupportAbsoluteTime&#8221;<br />
		Cell			&#8220;SupportContinuousTime&#8221;<br />
		Cell			&#8220;SupportNonInlinedSFcns&#8221;<br />
		PropName		&#8220;DisabledProps&#8221;<br />
	      }<br />
	      TargetFcnLib	      &#8220;ansi_tfl_tmw.mat&#8221;<br />
	      TargetLibSuffix	      &#8220;&#8221;<br />
	      TargetPreCompLibLocation &#8220;&#8221;<br />
	      TargetFunctionLibrary   &#8220;ANSI_C&#8221;<br />
	      UtilityFuncGeneration   &#8220;Auto&#8221;<br />
	      ERTMultiwordTypeDef     &#8220;System defined&#8221;<br />
	      ERTMultiwordLength      256<br />
	      MultiwordLength	      2048<br />
	      GenerateFullHeader      on<br />
	      GenerateSampleERTMain   off<br />
	      GenerateTestInterfaces  off<br />
	      IsPILTarget	      off<br />
	      ModelReferenceCompliant on<br />
	      ParMdlRefBuildCompliant on<br />
	      CompOptLevelCompliant   on<br />
	      IncludeMdlTerminateFcn  on<br />
	      CombineOutputUpdateFcns off<br />
	      SuppressErrorStatus     off<br />
	      ERTFirstTimeCompliant   off<br />
	      IncludeFileDelimiter    &#8220;Auto&#8221;<br />
	      ERTCustomFileBanners    off<br />
	      SupportAbsoluteTime     on<br />
	      LogVarNameModifier      &#8220;rt_&#8221;<br />
	      MatFileLogging	      on<br />
	      MultiInstanceERTCode    off<br />
	      SupportNonFinite	      on<br />
	      SupportComplex	      on<br />
	      PurelyIntegerCode	      off<br />
	      SupportContinuousTime   on<br />
	      SupportNonInlinedSFcns  on<br />
	      EnableShiftOperators    on<br />
	      ParenthesesLevel	      &#8220;Nominal&#8221;<br />
	      PortableWordSizes	      off<br />
	      ModelStepFunctionPrototypeControlCompliant off<br />
	      CPPClassGenCompliant    off<br />
	      AutosarCompliant	      off<br />
	      UseMalloc		      off<br />
	      ExtMode		      off<br />
	      ExtModeStaticAlloc      off<br />
	      ExtModeTesting	      off<br />
	      ExtModeStaticAllocSize  1000000<br />
	      ExtModeTransport	      0<br />
	      ExtModeMexFile	      &#8220;ext_comm&#8221;<br />
	      ExtModeIntrfLevel	      &#8220;Level1&#8243;<br />
	      RTWCAPISignals	      off<br />
	      RTWCAPIParams	      off<br />
	      RTWCAPIStates	      off<br />
	      GenerateASAP2	      off<br />
	    }<br />
	    PropName		    &#8220;Components&#8221;<br />
	  }<br />
	}<br />
	PropName		&#8220;Components&#8221;<br />
      }<br />
      Name		      &#8220;Configuration&#8221;<br />
      CurrentDlgPage	      &#8220;Optimization&#8221;<br />
      ConfigPrmDlgPosition    &#8221; [ 200, 85, 1080, 715 ] &#8220;<br />
    }<br />
    PropName		    &#8220;ConfigurationSets&#8221;<br />
  }<br />
  Simulink.ConfigSet {<br />
    $PropName		    &#8220;ActiveConfigurationSet&#8221;<br />
    $ObjectID		    1<br />
  }<br />
  BlockDefaults {<br />
    ForegroundColor	    &#8220;black&#8221;<br />
    BackgroundColor	    &#8220;white&#8221;<br />
    DropShadow		    off<br />
    NamePlacement	    &#8220;normal&#8221;<br />
    FontName		    &#8220;Helvetica&#8221;<br />
    FontSize		    10<br />
    FontWeight		    &#8220;normal&#8221;<br />
    FontAngle		    &#8220;normal&#8221;<br />
    ShowName		    on<br />
    BlockRotation	    0<br />
    BlockMirror		    off<br />
  }<br />
  AnnotationDefaults {<br />
    HorizontalAlignment	    &#8220;center&#8221;<br />
    VerticalAlignment	    &#8220;middle&#8221;<br />
    ForegroundColor	    &#8220;black&#8221;<br />
    BackgroundColor	    &#8220;white&#8221;<br />
    DropShadow		    off<br />
    FontName		    &#8220;Helvetica&#8221;<br />
    FontSize		    10<br />
    FontWeight		    &#8220;normal&#8221;<br />
    FontAngle		    &#8220;normal&#8221;<br />
    UseDisplayTextAsClickCallback off<br />
  }<br />
  LineDefaults {<br />
    FontName		    &#8220;Helvetica&#8221;<br />
    FontSize		    9<br />
    FontWeight		    &#8220;normal&#8221;<br />
    FontAngle		    &#8220;normal&#8221;<br />
  }<br />
  BlockParameterDefaults {<br />
    Block {<br />
      BlockType		      BusCreator<br />
      Inputs		      &#8220;4&#8243;<br />
      DisplayOption	      &#8220;none&#8221;<br />
      UseBusObject	      off<br />
      BusObject		      &#8220;BusObject&#8221;<br />
      NonVirtualBus	      off<br />
    }<br />
    Block {<br />
      BlockType		      BusSelector<br />
      OutputAsBus	      off<br />
    }<br />
    Block {<br />
      BlockType		      Constant<br />
      Value		      &#8220;1&#8243;<br />
      VectorParams1D	      on<br />
      SamplingMode	      &#8220;Sample based&#8221;<br />
      OutMin		      &#8220;[]&#8220;<br />
      OutMax		      &#8220;[]&#8220;<br />
      OutDataTypeMode	      &#8220;Inherit from &#8216;Constant value&#8217;&#8221;<br />
      OutDataType	      &#8220;fixdt(1,16,0)&#8221;<br />
      ConRadixGroup	      &#8220;Use specified scaling&#8221;<br />
      OutScaling	      &#8220;[]&#8220;<br />
      OutDataTypeStr	      &#8220;Inherit: Inherit from &#8216;Constant value&#8217;&#8221;<br />
      LockScale		      off<br />
      SampleTime	      &#8220;inf&#8221;<br />
      FramePeriod	      &#8220;inf&#8221;<br />
    }<br />
    Block {<br />
      BlockType		      Demux<br />
      Outputs		      &#8220;4&#8243;<br />
      DisplayOption	      &#8220;none&#8221;<br />
      BusSelectionMode	      off<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Format		      &#8220;short&#8221;<br />
      Decimation	      &#8220;10&#8243;<br />
      Floating		      off<br />
      SampleTime	      &#8220;-1&#8243;<br />
    }<br />
    Block {<br />
      BlockType		      Inport<br />
      Port		      &#8220;1&#8243;<br />
      UseBusObject	      off<br />
      BusObject		      &#8220;BusObject&#8221;<br />
      BusOutputAsStruct	      off<br />
      PortDimensions	      &#8220;-1&#8243;<br />
      SampleTime	      &#8220;-1&#8243;<br />
      OutMin		      &#8220;[]&#8220;<br />
      OutMax		      &#8220;[]&#8220;<br />
      DataType		      &#8220;auto&#8221;<br />
      OutDataType	      &#8220;fixdt(1,16,0)&#8221;<br />
      OutScaling	      &#8220;[]&#8220;<br />
      OutDataTypeStr	      &#8220;Inherit: auto&#8221;<br />
      LockScale		      off<br />
      SignalType	      &#8220;auto&#8221;<br />
      SamplingMode	      &#8220;auto&#8221;<br />
      LatchByDelayingOutsideSignal off<br />
      LatchByCopyingInsideSignal off<br />
      Interpolate	      on<br />
      DimensionsMode	      &#8220;auto&#8221;<br />
    }<br />
    Block {<br />
      BlockType		      Outport<br />
      Port		      &#8220;1&#8243;<br />
      UseBusObject	      off<br />
      BusObject		      &#8220;BusObject&#8221;<br />
      BusOutputAsStruct	      off<br />
      PortDimensions	      &#8220;-1&#8243;<br />
      SampleTime	      &#8220;-1&#8243;<br />
      OutMin		      &#8220;[]&#8220;<br />
      OutMax		      &#8220;[]&#8220;<br />
      DataType		      &#8220;auto&#8221;<br />
      OutDataType	      &#8220;fixdt(1,16,0)&#8221;<br />
      OutScaling	      &#8220;[]&#8220;<br />
      OutDataTypeStr	      &#8220;Inherit: auto&#8221;<br />
      LockScale		      off<br />
      SignalType	      &#8220;auto&#8221;<br />
      SamplingMode	      &#8220;auto&#8221;<br />
      SourceOfInitialOutputValue &#8220;Dialog&#8221;<br />
      OutputWhenDisabled      &#8220;held&#8221;<br />
      InitialOutput	      &#8220;[]&#8220;<br />
      DimensionsMode	      &#8220;auto&#8221;<br />
    }<br />
    Block {<br />
      BlockType		      &#8220;S-Function&#8221;<br />
      FunctionName	      &#8220;system&#8221;<br />
      SFunctionModules	      &#8220;&#8221;&#8221;<br />
      PortCounts	      &#8220;[]&#8220;<br />
      SFunctionDeploymentMode off<br />
    }<br />
    Block {<br />
      BlockType		      SubSystem<br />
      ShowPortLabels	      &#8220;FromPortIcon&#8221;<br />
      Permissions	      &#8220;ReadWrite&#8221;<br />
      PermitHierarchicalResolution &#8220;All&#8221;<br />
      TreatAsAtomicUnit	      off<br />
      CheckFcnCallInpInsideContextMsg off<br />
      SystemSampleTime	      &#8220;-1&#8243;<br />
      RTWFcnNameOpts	      &#8220;Auto&#8221;<br />
      RTWFileNameOpts	      &#8220;Auto&#8221;<br />
      RTWMemSecFuncInitTerm   &#8220;Inherit from model&#8221;<br />
      RTWMemSecFuncExecute    &#8220;Inherit from model&#8221;<br />
      RTWMemSecDataConstants  &#8220;Inherit from model&#8221;<br />
      RTWMemSecDataInternal   &#8220;Inherit from model&#8221;<br />
      RTWMemSecDataParameters &#8220;Inherit from model&#8221;<br />
      SimViewingDevice	      off<br />
      DataTypeOverride	      &#8220;UseLocalSettings&#8221;<br />
      MinMaxOverflowLogging   &#8220;UseLocalSettings&#8221;<br />
    }<br />
    Block {<br />
      BlockType		      Terminator<br />
    }<br />
  }<br />
  System {<br />
    Name		    &#8220;testDescription&#8221;<br />
    Location		    [317, 358, 1148, 746]<br />
    Open		    on<br />
    ModelBrowserVisibility  off<br />
    ModelBrowserWidth	    200<br />
    ScreenColor		    &#8220;white&#8221;<br />
    PaperOrientation	    &#8220;landscape&#8221;<br />
    PaperPositionMode	    &#8220;auto&#8221;<br />
    PaperType		    &#8220;A4&#8243;<br />
    PaperUnits		    &#8220;centimeters&#8221;<br />
    TiledPaperMargins	    [1.270000, 1.270000, 1.270000, 1.270000]<br />
    TiledPageScale	    1<br />
    ShowPageBoundaries	    off<br />
    ZoomFactor		    &#8220;100&#8243;<br />
    ReportName		    &#8220;simulink-default.rpt&#8221;<br />
    Block {<br />
      BlockType		      BusCreator<br />
      Name		      &#8220;Bus\nCreator&#8221;<br />
      Ports		      [3, 1]<br />
      Position		      [220, 55, 225, 135]<br />
      ShowName		      off<br />
      Inputs		      &#8220;3&#8243;<br />
      DisplayOption	      &#8220;bar&#8221;<br />
      UseBusObject	      on<br />
      BusObject		      &#8220;MainBus&#8221;<br />
      NonVirtualBus	      on<br />
      Port {<br />
	PortNumber		1<br />
	PropagatedSignals	&#8220;ele1, ele2, a1, a2&#8243;<br />
	ShowPropagatedSignals	&#8220;all&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      BusCreator<br />
      Name		      &#8220;Bus\nCreator1&#8243;<br />
      Ports		      [2, 1]<br />
      Position		      [175, 186, 180, 224]<br />
      ShowName		      off<br />
      Inputs		      &#8220;2&#8243;<br />
      DisplayOption	      &#8220;bar&#8221;<br />
      UseBusObject	      on<br />
      BusObject		      &#8220;SubBus&#8221;<br />
      NonVirtualBus	      on<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;ele3&#8243;<br />
	PropagatedSignals	&#8220;a1, a2&#8243;<br />
	ShowPropagatedSignals	&#8220;on&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      BusSelector<br />
      Name		      &#8220;Bus\nSelector1&#8243;<br />
      Ports		      [1, 2]<br />
      Position		      [620, 56, 625, 94]<br />
      ShowName		      off<br />
      OutputSignals	      &#8220;signal1,signal2&#8243;<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
      Port {<br />
	PortNumber		2<br />
	Name			&#8220;&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      BusSelector<br />
      Name		      &#8220;Bus\nSelector2&#8243;<br />
      Ports		      [1, 2]<br />
      Position		      [590, 221, 595, 259]<br />
      ShowName		      off<br />
      OutputSignals	      &#8220;signal1,signal2&#8243;<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
      Port {<br />
	PortNumber		2<br />
	Name			&#8220;&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      Constant<br />
      Name		      &#8220;Constant&#8221;<br />
      Position		      [95, 25, 125, 55]<br />
      Value		      &#8220;100&#8243;<br />
      OutDataTypeMode	      &#8220;double&#8221;<br />
      OutDataType	      &#8220;sfix(16)&#8221;<br />
      OutScaling	      &#8220;2^0&#8243;<br />
      OutDataTypeStr	      &#8220;double&#8221;<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;ele1&#8243;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      Constant<br />
      Name		      &#8220;Constant1&#8243;<br />
      Position		      [95, 85, 125, 115]<br />
      Value		      &#8220;21&#8243;<br />
      OutDataTypeMode	      &#8220;single&#8221;<br />
      OutDataType	      &#8220;sfix(16)&#8221;<br />
      OutScaling	      &#8220;2^0&#8243;<br />
      OutDataTypeStr	      &#8220;single&#8221;<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;ele2&#8243;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      Constant<br />
      Name		      &#8220;Constant2&#8243;<br />
      Position		      [90, 165, 120, 195]<br />
      Value		      &#8220;12&#8243;<br />
      OutDataTypeMode	      &#8220;double&#8221;<br />
      OutDataType	      &#8220;sfix(16)&#8221;<br />
      OutScaling	      &#8220;2^0&#8243;<br />
      OutDataTypeStr	      &#8220;double&#8221;<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;a1&#8243;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      Constant<br />
      Name		      &#8220;Constant3&#8243;<br />
      Position		      [95, 240, 125, 270]<br />
      Value		      &#8220;13&#8243;<br />
      OutDataTypeMode	      &#8220;double&#8221;<br />
      OutDataType	      &#8220;sfix(16)&#8221;<br />
      OutScaling	      &#8220;2^0&#8243;<br />
      OutDataTypeStr	      &#8220;double&#8221;<br />
      Port {<br />
	PortNumber		1<br />
	Name			&#8220;a2&#8243;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Name		      &#8220;Display&#8221;<br />
      Ports		      [1]<br />
      Position		      [715, 30, 805, 60]<br />
      Decimation	      &#8220;1&#8243;<br />
      Lockdown		      off<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Name		      &#8220;Display1&#8243;<br />
      Ports		      [1]<br />
      Position		      [715, 75, 805, 105]<br />
      Decimation	      &#8220;1&#8243;<br />
      Lockdown		      off<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Name		      &#8220;Display2&#8243;<br />
      Ports		      [1]<br />
      Position		      [715, 125, 805, 155]<br />
      Decimation	      &#8220;1&#8243;<br />
      Lockdown		      off<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Name		      &#8220;Display3&#8243;<br />
      Ports		      [1]<br />
      Position		      [715, 170, 805, 200]<br />
      Decimation	      &#8220;1&#8243;<br />
      Lockdown		      off<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Name		      &#8220;Display4&#8243;<br />
      Ports		      [1]<br />
      Position		      [720, 225, 810, 255]<br />
      Decimation	      &#8220;1&#8243;<br />
      Lockdown		      off<br />
    }<br />
    Block {<br />
      BlockType		      Display<br />
      Name		      &#8220;Display5&#8243;<br />
      Ports		      [1]<br />
      Position		      [720, 270, 810, 300]<br />
      Decimation	      &#8220;1&#8243;<br />
      Lockdown		      off<br />
    }<br />
    Block {<br />
      BlockType		      SubSystem<br />
      Name		      &#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
      Ports		      [1, 2]<br />
      Position		      [365, 90, 520, 190]<br />
      PermitHierarchicalResolution &#8220;ExplicitOnly&#8221;<br />
      MinAlgLoopOccurrences   off<br />
      PropExecContextOutsideSubsystem off<br />
      RTWSystemCode	      &#8220;Auto&#8221;<br />
      FunctionWithSeparateData off<br />
      Opaque		      off<br />
      RequestExecContextInheritance off<br />
      MaskHideContents	      off<br />
      MaskType		      &#8220;Stateflow&#8221;<br />
      MaskDescription	      &#8220;Embedded MATLAB block&#8221;<br />
      MaskDisplay	      &#8220;disp(&#8216;cityBankBranch&#8217;);&#8221;<br />
      MaskSelfModifiable      on<br />
      MaskIconFrame	      on<br />
      MaskIconOpaque	      off<br />
      MaskIconRotate	      &#8220;none&#8221;<br />
      MaskPortRotate	      &#8220;default&#8221;<br />
      MaskIconUnits	      &#8220;autoscale&#8221;<br />
      Port {<br />
	PortNumber		1<br />
	ShowPropagatedSignals	&#8220;on&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
      Port {<br />
	PortNumber		2<br />
	ShowPropagatedSignals	&#8220;on&#8221;<br />
	RTWStorageClass		&#8220;Auto&#8221;<br />
	DataLoggingNameMode	&#8220;SignalName&#8221;<br />
      }<br />
      System {<br />
	Name			&#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
	Location		[257, 457, 812, 717]<br />
	Open			off<br />
	ModelBrowserVisibility	off<br />
	ModelBrowserWidth	200<br />
	ScreenColor		&#8220;white&#8221;<br />
	PaperOrientation	&#8220;landscape&#8221;<br />
	PaperPositionMode	&#8220;auto&#8221;<br />
	PaperType		&#8220;A4&#8243;<br />
	PaperUnits		&#8220;centimeters&#8221;<br />
	TiledPaperMargins	[1.270000, 1.270000, 1.270000, 1.270000]<br />
	TiledPageScale		1<br />
	ShowPageBoundaries	off<br />
	ZoomFactor		&#8220;100&#8243;<br />
	Block {<br />
	  BlockType		  Inport<br />
	  Name			  &#8220;inbus&#8221;<br />
	  Position		  [20, 101, 40, 119]<br />
	  IconDisplay		  &#8220;Port number&#8221;<br />
	  OutDataType		  &#8220;sfix(16)&#8221;<br />
	  OutScaling		  &#8220;2^0&#8243;<br />
	}<br />
	Block {<br />
	  BlockType		  Demux<br />
	  Name			  &#8221; Demux &#8220;<br />
	  Ports			  [1, 1]<br />
	  Position		  [270, 180, 320, 220]<br />
	  Outputs		  &#8220;1&#8243;<br />
	}<br />
	Block {<br />
	  BlockType		  &#8220;S-Function&#8221;<br />
	  Name			  &#8221; SFunction &#8220;<br />
	  Tag			  &#8220;Stateflow S-Function testDescription 1&#8243;<br />
	  Ports			  [1, 3]<br />
	  Position		  [180, 100, 230, 180]<br />
	  FunctionName		  &#8220;sf_sfun&#8221;<br />
	  PortCounts		  &#8220;[1 3]&#8220;<br />
	  EnableBusSupport	  on<br />
	  Port {<br />
	    PortNumber		    2<br />
	    Name		    &#8220;outbus&#8221;<br />
	    RTWStorageClass	    &#8220;Auto&#8221;<br />
	    DataLoggingNameMode	    &#8220;SignalName&#8221;<br />
	  }<br />
	  Port {<br />
	    PortNumber		    3<br />
	    Name		    &#8220;outbus1&#8243;<br />
	    RTWStorageClass	    &#8220;Auto&#8221;<br />
	    DataLoggingNameMode	    &#8220;SignalName&#8221;<br />
	  }<br />
	}<br />
	Block {<br />
	  BlockType		  Terminator<br />
	  Name			  &#8221; Terminator &#8220;<br />
	  Position		  [460, 191, 480, 209]<br />
	}<br />
	Block {<br />
	  BlockType		  Outport<br />
	  Name			  &#8220;outbus&#8221;<br />
	  Position		  [460, 101, 480, 119]<br />
	  IconDisplay		  &#8220;Port number&#8221;<br />
	  OutDataType		  &#8220;sfix(16)&#8221;<br />
	  OutScaling		  &#8220;2^0&#8243;<br />
	}<br />
	Block {<br />
	  BlockType		  Outport<br />
	  Name			  &#8220;outbus1&#8243;<br />
	  Position		  [460, 136, 480, 154]<br />
	  Port			  &#8220;2&#8243;<br />
	  IconDisplay		  &#8220;Port number&#8221;<br />
	  OutDataType		  &#8220;sfix(16)&#8221;<br />
	  OutScaling		  &#8220;2^0&#8243;<br />
	}<br />
	Line {<br />
	  SrcBlock		  &#8221; SFunction &#8220;<br />
	  SrcPort		  1<br />
	  DstBlock		  &#8221; Demux &#8220;<br />
	  DstPort		  1<br />
	}<br />
	Line {<br />
	  SrcBlock		  &#8220;inbus&#8221;<br />
	  SrcPort		  1<br />
	  DstBlock		  &#8221; SFunction &#8220;<br />
	  DstPort		  1<br />
	}<br />
	Line {<br />
	  Name			  &#8220;outbus&#8221;<br />
	  Labels		  [0, 0]<br />
	  SrcBlock		  &#8221; SFunction &#8220;<br />
	  SrcPort		  2<br />
	  DstBlock		  &#8220;outbus&#8221;<br />
	  DstPort		  1<br />
	}<br />
	Line {<br />
	  Name			  &#8220;outbus1&#8243;<br />
	  Labels		  [0, 0]<br />
	  SrcBlock		  &#8221; SFunction &#8220;<br />
	  SrcPort		  3<br />
	  DstBlock		  &#8220;outbus1&#8243;<br />
	  DstPort		  1<br />
	}<br />
	Line {<br />
	  SrcBlock		  &#8221; Demux &#8220;<br />
	  SrcPort		  1<br />
	  DstBlock		  &#8221; Terminator &#8220;<br />
	  DstPort		  1<br />
	}<br />
      }<br />
    }<br />
    Line {<br />
      Name		      &#8220;ele1&#8243;<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Constant&#8221;<br />
      SrcPort		      1<br />
      Points		      [35, 0; 0, 30]<br />
      DstBlock		      &#8220;Bus\nCreator&#8221;<br />
      DstPort		      1<br />
    }<br />
    Line {<br />
      Name		      &#8220;ele2&#8243;<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Constant1&#8243;<br />
      SrcPort		      1<br />
      Points		      [75, 0]<br />
      DstBlock		      &#8220;Bus\nCreator&#8221;<br />
      DstPort		      2<br />
    }<br />
    Line {<br />
      Name		      &#8220;a1&#8243;<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Constant2&#8243;<br />
      SrcPort		      1<br />
      Points		      [15, 0; 0, 15]<br />
      DstBlock		      &#8220;Bus\nCreator1&#8243;<br />
      DstPort		      1<br />
    }<br />
    Line {<br />
      Name		      &#8220;a2&#8243;<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Constant3&#8243;<br />
      SrcPort		      1<br />
      Points		      [15, 0; 0, -40]<br />
      DstBlock		      &#8220;Bus\nCreator1&#8243;<br />
      DstPort		      2<br />
    }<br />
    Line {<br />
      Name		      &#8220;ele3&#8243;<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Bus\nCreator1&#8243;<br />
      SrcPort		      1<br />
      Points		      [10, 0; 0, -85]<br />
      DstBlock		      &#8220;Bus\nCreator&#8221;<br />
      DstPort		      3<br />
    }<br />
    Line {<br />
      Labels		      [2, 0]<br />
      SrcBlock		      &#8220;Bus\nCreator&#8221;<br />
      SrcPort		      1<br />
      Points		      [45, 0; 0, 45]<br />
      DstBlock		      &#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
      DstPort		      1<br />
    }<br />
    Line {<br />
      Name		      &#8220;&#8221;<br />
      Labels		      [3, 0]<br />
      SrcBlock		      &#8220;Bus\nSelector2&#8243;<br />
      SrcPort		      1<br />
      Points		      [50, 0; 0, 10]<br />
      DstBlock		      &#8220;Display4&#8243;<br />
      DstPort		      1<br />
    }<br />
    Line {<br />
      Name		      &#8220;&#8221;<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Bus\nSelector2&#8243;<br />
      SrcPort		      2<br />
      Points		      [50, 0; 0, 35]<br />
      DstBlock		      &#8220;Display5&#8243;<br />
      DstPort		      1<br />
    }<br />
    Line {<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
      SrcPort		      2<br />
      Points		      [10, 0; 0, 75]<br />
      DstBlock		      &#8220;Bus\nSelector2&#8243;<br />
      DstPort		      1<br />
    }<br />
    Line {<br />
      Labels		      [0, 0]<br />
      SrcBlock		      &#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
      SrcPort		      1<br />
      Points		      [5, 0; 0, -40]<br />
      DstBlock		      &#8220;Bus\nSelector1&#8243;<br />
      DstPort		      1<br />
    }<br />
    Annotation {<br />
      Name		      &#8220;MainBus&#8221;<br />
      Position		      [229, 149]<br />
    }<br />
    Annotation {<br />
      Name		      &#8220;SubBus&#8221;<br />
      Position		      [181, 237]<br />
    }<br />
  }<br />
}<br />
# Finite State Machines<br />
#<br />
#    Stateflow Version 7.1 (R2009a) dated Jan 28 2009, 05:16:58<br />
#<br />
#</p>
<p>Stateflow {<br />
  machine {<br />
    id			    1<br />
    name		    &#8220;testDescription&#8221;<br />
    created		    &#8220;04-Jul-2009 08:00:42&#8243;<br />
    isLibrary		    0<br />
    firstTarget		    10<br />
    sfVersion		    71014000.000008<br />
  }<br />
  chart {<br />
    id			    2<br />
    name		    &#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
    windowPosition	    [311.813 325.875 200.25 189.75]<br />
    viewLimits		    [0 156.75 0 153.75]<br />
    screen		    [1 1 1280 800 1.333333333333333]<br />
    treeNode		    [0 3 0 0]<br />
    firstTransition	    5<br />
    firstJunction	    4<br />
    viewObj		    2<br />
    machine		    1<br />
    ssIdHighWaterMark	    6<br />
    decomposition	    CLUSTER_CHART<br />
    type		    EML_CHART<br />
    firstData		    6<br />
    chartFileNumber	    1<br />
    disableImplicitCasting  1<br />
    eml {<br />
      name		      &#8220;cityBankBranch&#8221;<br />
    }<br />
  }<br />
  state {<br />
    id			    3<br />
    labelString		    &#8220;eML_blk_kernel()&#8221;<br />
    position		    [18 64.5 118 66]<br />
    fontSize		    12<br />
    chart		    2<br />
    treeNode		    [2 0 0 0]<br />
    superState		    SUBCHART<br />
    subviewer		    2<br />
    ssIdNumber		    1<br />
    type		    FUNC_STATE<br />
    decomposition	    CLUSTER_STATE<br />
    eml {<br />
      isEML		      1<br />
      script		      &#8220;function [outbus, outbus1] = cityBankBranch(inbus)\n%substruct.a1 = inbus.ele3.a1;\n%substruct.a2&#8243;<br />
      &#8221; = int8([1 2; 3 4]);\n%substruct.a2 = 4;\nsubstruct = struct(&#8216;a1&#8242;,inbus.ele3.a1,&#8217;a2&#8242;,4);\nmystruct = struct(&#8216;ele&#8221;<br />
      &#8220;1&#8242;,20.5,&#8217;ele2&#8242;,single(100),&#8217;ele3&#8242;,substruct);\n\noutbus = mystruct;\noutbus.ele3.a2 = 2*(substruct.a2);\n\noutbu&#8221;<br />
      &#8220;s1 = inbus.ele3;\n\n\n% function s   = cityBankBranch(descriptionFlag)\n% \n%     s.nberOfMethod = 3;\n%     s.m&#8221;<br />
      &#8220;ethod(1).name = &#8216;deposit&#8217;;\n%     s.method(2).name = &#8216;withdraw&#8217;;\n%     s.method(3).name = &#8216;getBalance&#8217;;\n% \n% &#8220;<br />
      &#8221;    s.method(1).nberOfOutput = 2;\n%     s.method(1).output(1).name = &#8216;double&#8217;;\n%     s.method(1).output(2).nam&#8221;<br />
      &#8220;e = &#8216;int&#8217;;\n%     s.method(1).nberOfInput = 1;\n%     s.method(1).input(1).name = &#8216;double&#8217;;\n% \n%     s.method(&#8220;<br />
      &#8220;2).nberOfOutput = 1;\n%     s.method(2).output(1).name = &#8216;int&#8217;;\n%     s.method(2).nberOfInput = 2;\n%     s.met&#8221;<br />
      &#8220;hod(2).input(1).name = &#8216;double&#8217;;\n%     s.method(2).input(2).name = &#8216;double&#8217;;\n% \n%     s.method(3).nberOfOutpu&#8221;<br />
      &#8220;t = 1;\n%     s.method(3).output(1).name = &#8216;int&#8217;;\n%     s.method(3).nberOfInput = 1;\n%     s.method(3).input(1&#8243;<br />
      &#8220;).name = &#8216;int&#8217;;\n\n&#8221;<br />
      editorLayout	      &#8220;100 M4x1[215 17 977 420]&#8220;<br />
      fimathForFiConstructors FimathMatlabFactoryDefault<br />
    }<br />
  }<br />
  junction {<br />
    id			    4<br />
    position		    [23.5747 49.5747 7]<br />
    chart		    2<br />
    linkNode		    [2 0 0]<br />
    subviewer		    2<br />
    ssIdNumber		    3<br />
    type		    CONNECTIVE_JUNCTION<br />
  }<br />
  transition {<br />
    id			    5<br />
    labelString		    &#8220;{eML_blk_kernel();}&#8221;<br />
    labelPosition	    [32.125 19.875 102.544 14.964]<br />
    fontSize		    12<br />
    src {<br />
      intersection	      [0 0 1 0 23.5747 14.625 0 0]<br />
    }<br />
    dst {<br />
      id		      4<br />
      intersection	      [7 0 -1 -1 23.5747 42.5747 0 0]<br />
    }<br />
    midPoint		    [23.5747 24.9468]<br />
    chart		    2<br />
    linkNode		    [2 0 0]<br />
    dataLimits		    [21.175 25.975 14.625 42.575]<br />
    subviewer		    2<br />
    drawStyle		    SMART<br />
    executionOrder	    1<br />
    ssIdNumber		    2<br />
  }<br />
  data {<br />
    id			    6<br />
    ssIdNumber		    4<br />
    name		    &#8220;inbus&#8221;<br />
    linkNode		    [2 0 7]<br />
    scope		    INPUT_DATA<br />
    machine		    1<br />
    props {<br />
      array {<br />
	size			&#8220;-1&#8243;<br />
      }<br />
      type {<br />
	method			SF_SIMULINK_OBJECT_TYPE<br />
	busObject		&#8220;&#8221;<br />
	fixpt {<br />
	  scalingMode		  SF_FIXPT_BINARY_POINT<br />
	}<br />
      }<br />
    }<br />
    dataType		    &#8220;Bus: &#8220;<br />
  }<br />
  data {<br />
    id			    7<br />
    ssIdNumber		    5<br />
    name		    &#8220;outbus&#8221;<br />
    linkNode		    [2 6 8]<br />
    scope		    OUTPUT_DATA<br />
    machine		    1<br />
    props {<br />
      array {<br />
	size			&#8220;-1&#8243;<br />
      }<br />
      type {<br />
	method			SF_SIMULINK_OBJECT_TYPE<br />
	expression		&#8220;MainBus&#8221;<br />
	busObject		&#8220;&#8221;<br />
	fixpt {<br />
	  scalingMode		  SF_FIXPT_BINARY_POINT<br />
	}<br />
      }<br />
      frame		      SF_FRAME_NO<br />
    }<br />
    dataType		    &#8220;Bus: &#8220;<br />
  }<br />
  data {<br />
    id			    8<br />
    ssIdNumber		    6<br />
    name		    &#8220;outbus1&#8243;<br />
    linkNode		    [2 7 0]<br />
    scope		    OUTPUT_DATA<br />
    machine		    1<br />
    props {<br />
      array {<br />
	size			&#8220;-1&#8243;<br />
      }<br />
      type {<br />
	method			SF_SIMULINK_OBJECT_TYPE<br />
	expression		&#8220;SubBus&#8221;<br />
	busObject		&#8220;&#8221;<br />
	fixpt {<br />
	  scalingMode		  SF_FIXPT_BINARY_POINT<br />
	}<br />
      }<br />
      frame		      SF_FRAME_NO<br />
    }<br />
    dataType		    &#8220;Bus: &#8220;<br />
  }<br />
  instance {<br />
    id			    9<br />
    name		    &#8220;Embedded\nMATLAB Function\n&#8211;COMPUTATION UNIT&#8211;&#8221;<br />
    machine		    1<br />
    chart		    2<br />
  }<br />
  target {<br />
    id			    10<br />
    name		    &#8220;sfun&#8221;<br />
    codeFlags		    &#8220;&#8221;<br />
    machine		    1<br />
    linkNode		    [1 0 0]<br />
  }<br />
}</p>
<p>/**************************************************/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: isaiah</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-796</link>
		<dc:creator>isaiah</dc:creator>
		<pubDate>Mon, 06 Jul 2009 08:05:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-796</guid>
		<description>sorry about my previous posting. didnt wrap the code properly. here is the full code well wrapped
&lt;pre&gt;
function msfcn_varpulseizzy(block)
% Level-2 M-file S-function to implement a variable pulse width generator
%   Copyright 1990-2007 The MathWorks, Inc.

% This S-function takes a desired pulse width (in percentage
% of the period of a Pulse Generator block) and sets the PulseWidth
% property in a Pulse Generator block. The result is a variable-width
% pulse signal. The S-function assumes the model contains only one Pulse
% Generator block and modifies the PulseWidth of that block.

setup(block);

%endfunction


function setup(block)

% Register number of ports
 block.NumDialogPrms = 1;
block.NumInputPorts  = 1;
block.NumOutputPorts = 0;

% Setup port properties to be inherited or dynamic
block.SetPreCompInpPortInfoToDynamic;
block.SetPreCompOutPortInfoToDynamic;

% Override input port properties
block.InputPort(1).DatatypeID  = 0;  % double
block.InputPort(1).Complexity  = &#039;Real&#039;;

% Register sample times
block.SampleTimes = [0 0];

% Register methods
block.RegBlockMethod(&#039;PostPropagationSetup&#039;, @DoPostPropSetup);
block.RegBlockMethod(&#039;InitializeConditions&#039;, @InitializeConditions);
block.RegBlockMethod(&#039;Start&#039;, @Start);
block.RegBlockMethod(&#039;Outputs&#039;, @Outputs);
block.RegBlockMethod(&#039;Update&#039;, @Update);
block.RegBlockMethod(&#039;Terminate&#039;, @Terminate);

%endfunction


function DoPostPropSetup(block)

% Initialize the Dwork vector
block.NumDworks = 2;

% Dwork(1) stores the value of the next pulse width
block.Dwork(1).Name            = &#039;x1&#039;;
block.Dwork(1).Dimensions      = 1;
block.Dwork(1).DatatypeID      = 0;      % double
block.Dwork(1).Complexity      = &#039;Real&#039;; % real
block.Dwork(1).UsedAsDiscState = true;

% Dwork(2) stores the handle of the Pulse Geneator block
block.Dwork(2).Name            = &#039;BlockHandle&#039;;
block.Dwork(2).Dimensions      = 1;
block.Dwork(2).DatatypeID      = 0;      % double
block.Dwork(2).Complexity      = &#039;Real&#039;; % real
block.Dwork(2).UsedAsDiscState = false;

%endfunction


function Start(block)

% Populate the Dwork vector
block.Dwork(1).Data = 0;

% Obtain the Pulse Generator block handle
pulseGen = find_system(gcs,&#039;BlockType&#039;,&#039;DiscretePulseGenerator&#039;);
blockH = get_param(pulseGen{1},&#039;Handle&#039;);
block.Dwork(2).Data = blockH;

%endfunction


function InitializeConditions(block)

% Set the initial pulse width value
d=50;
set_param(block.Dwork(2).Data, &#039;PulseWidth&#039;, num2str(d));

%endfunction


function Outputs(block)
% Update the pulse width value
if block.InputPort(1).Data&gt;50
    d=d-2;  %reduce dutycycle by 2
else
    d=d+2; %increment dutycycle by 2
end
set_param(block.Dwork(2).Data, &#039;PulseWidth&#039;, num2str(d));


%endfunction


function Update(block)
d=50;
% Store the input value in the Dwork(1)
block.Dwork(1).Data = d;

%endfunction


function Terminate(block)

%endfunction

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>sorry about my previous posting. didnt wrap the code properly. here is the full code well wrapped</p>
<pre>
function msfcn_varpulseizzy(block)
% Level-2 M-file S-function to implement a variable pulse width generator
%   Copyright 1990-2007 The MathWorks, Inc.

% This S-function takes a desired pulse width (in percentage
% of the period of a Pulse Generator block) and sets the PulseWidth
% property in a Pulse Generator block. The result is a variable-width
% pulse signal. The S-function assumes the model contains only one Pulse
% Generator block and modifies the PulseWidth of that block.

setup(block);

%endfunction

function setup(block)

% Register number of ports
 block.NumDialogPrms = 1;
block.NumInputPorts  = 1;
block.NumOutputPorts = 0;

% Setup port properties to be inherited or dynamic
block.SetPreCompInpPortInfoToDynamic;
block.SetPreCompOutPortInfoToDynamic;

% Override input port properties
block.InputPort(1).DatatypeID  = 0;  % double
block.InputPort(1).Complexity  = 'Real';

% Register sample times
block.SampleTimes = [0 0];

% Register methods
block.RegBlockMethod('PostPropagationSetup', @DoPostPropSetup);
block.RegBlockMethod('InitializeConditions', @InitializeConditions);
block.RegBlockMethod('Start', @Start);
block.RegBlockMethod('Outputs', @Outputs);
block.RegBlockMethod('Update', @Update);
block.RegBlockMethod('Terminate', @Terminate);

%endfunction

function DoPostPropSetup(block)

% Initialize the Dwork vector
block.NumDworks = 2;

% Dwork(1) stores the value of the next pulse width
block.Dwork(1).Name            = 'x1';
block.Dwork(1).Dimensions      = 1;
block.Dwork(1).DatatypeID      = 0;      % double
block.Dwork(1).Complexity      = 'Real'; % real
block.Dwork(1).UsedAsDiscState = true;

% Dwork(2) stores the handle of the Pulse Geneator block
block.Dwork(2).Name            = 'BlockHandle';
block.Dwork(2).Dimensions      = 1;
block.Dwork(2).DatatypeID      = 0;      % double
block.Dwork(2).Complexity      = 'Real'; % real
block.Dwork(2).UsedAsDiscState = false;

%endfunction

function Start(block)

% Populate the Dwork vector
block.Dwork(1).Data = 0;

% Obtain the Pulse Generator block handle
pulseGen = find_system(gcs,'BlockType','DiscretePulseGenerator');
blockH = get_param(pulseGen{1},'Handle');
block.Dwork(2).Data = blockH;

%endfunction

function InitializeConditions(block)

% Set the initial pulse width value
d=50;
set_param(block.Dwork(2).Data, 'PulseWidth', num2str(d));

%endfunction

function Outputs(block)
% Update the pulse width value
if block.InputPort(1).Data&gt;50
    d=d-2;  %reduce dutycycle by 2
else
    d=d+2; %increment dutycycle by 2
end
set_param(block.Dwork(2).Data, 'PulseWidth', num2str(d));

%endfunction

function Update(block)
d=50;
% Store the input value in the Dwork(1)
block.Dwork(1).Data = d;

%endfunction

function Terminate(block)

%endfunction
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: isaiah</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-795</link>
		<dc:creator>isaiah</dc:creator>
		<pubDate>Mon, 06 Jul 2009 07:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-795</guid>
		<description>Hi, i tried modifying a level 2 s-funtion. however i keep getting an error.
please help. im new to simulink so i almost have no idea.
i am pasting the code here. please advise on what to...

50
    d=d-2;  %reduce dutycycle by 2
else
    d=d+2; %increment dutycycle by 2
end
set_param(block.Dwork(2).Data, &#039;PulseWidth&#039;, num2str(d));


%endfunction


function Update(block)
d=50;
% Store the input value in the Dwork(1)
block.Dwork(1).Data = d;

%endfunction


function Terminate(block)

%endfunction
&gt;</description>
		<content:encoded><![CDATA[<p>Hi, i tried modifying a level 2 s-funtion. however i keep getting an error.<br />
please help. im new to simulink so i almost have no idea.<br />
i am pasting the code here. please advise on what to&#8230;</p>
<p>50<br />
    d=d-2;  %reduce dutycycle by 2<br />
else<br />
    d=d+2; %increment dutycycle by 2<br />
end<br />
set_param(block.Dwork(2).Data, &#8216;PulseWidth&#8217;, num2str(d));</p>
<p>%endfunction</p>
<p>function Update(block)<br />
d=50;<br />
% Store the input value in the Dwork(1)<br />
block.Dwork(1).Data = d;</p>
<p>%endfunction</p>
<p>function Terminate(block)</p>
<p>%endfunction<br />
&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-791</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Tue, 30 Jun 2009 20:57:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-791</guid>
		<description>Hi Seth,

Thanks for the feedback. I actually decided to go with the second option since it made more sense for me to have an initialization step and subsequent output steps.

Have you played around with the dynamic port dimensions in the latest prerelease (2009b)? I&#039;m looking at having a bus with elements of varying dimensions, but I haven&#039;t found any documentation on the updates to the bus editor. I take it prereleases don&#039;t come with documentation?

P.S. Glad y&#039;all spotted the bug!

Thanks,
Jeff</description>
		<content:encoded><![CDATA[<p>Hi Seth,</p>
<p>Thanks for the feedback. I actually decided to go with the second option since it made more sense for me to have an initialization step and subsequent output steps.</p>
<p>Have you played around with the dynamic port dimensions in the latest prerelease (2009b)? I&#8217;m looking at having a bus with elements of varying dimensions, but I haven&#8217;t found any documentation on the updates to the bus editor. I take it prereleases don&#8217;t come with documentation?</p>
<p>P.S. Glad y&#8217;all spotted the bug!</p>
<p>Thanks,<br />
Jeff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-787</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Mon, 29 Jun 2009 16:14:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-787</guid>
		<description>@Jeff - Regarding your first question about handling a bus with a Level 2 M-file S-function: you are correct, level 2 M-file S-functions do not support bus signals, but there are some other options.
&lt;ul&gt;
&lt;li&gt;Use Embedded MATLAB - As long as you have an structure of arrays (not an array of structures) you should be able to pass the bus out of an Embedded MATLAB block.&lt;/li&gt;
&lt;li&gt;Mask the level 2 M-file s-function in a subsystem with a bus creator at the output.  If there are 100 signals, you can pass them out separately and wire them into the bus.  If the bus is more complicated, you may need to cascade the bus creators.  This would have a high one time cost, but it will give you a nice interface to the system.&lt;/li&gt;
&lt;/ul&gt;

I think the Embedded MATLAB option may be best, though, the Embedded MATLAB language is a subset of what you can do in the M-file S-function.  Embedded MATLAB blocks don&#039;t have states the way S-functions do, so you may have to rething your code if you rely on them.

Regarding your second comment about the S-function builder bug, thanks for reporting it.  Technical Support is looking into this.</description>
		<content:encoded><![CDATA[<p>@Jeff &#8211; Regarding your first question about handling a bus with a Level 2 M-file S-function: you are correct, level 2 M-file S-functions do not support bus signals, but there are some other options.</p>
<ul>
<li>Use Embedded MATLAB &#8211; As long as you have an structure of arrays (not an array of structures) you should be able to pass the bus out of an Embedded MATLAB block.</li>
<li>Mask the level 2 M-file s-function in a subsystem with a bus creator at the output.  If there are 100 signals, you can pass them out separately and wire them into the bus.  If the bus is more complicated, you may need to cascade the bus creators.  This would have a high one time cost, but it will give you a nice interface to the system.</li>
</ul>
<p>I think the Embedded MATLAB option may be best, though, the Embedded MATLAB language is a subset of what you can do in the M-file S-function.  Embedded MATLAB blocks don&#8217;t have states the way S-functions do, so you may have to rething your code if you rely on them.</p>
<p>Regarding your second comment about the S-function builder bug, thanks for reporting it.  Technical Support is looking into this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff</title>
		<link>http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-781</link>
		<dc:creator>Jeff</dc:creator>
		<pubDate>Tue, 23 Jun 2009 13:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/seth/2009/04/17/s-functions-bus-signals-and-missing-documentation/#comment-781</guid>
		<description>Seth,

Just FYI, I found a bug in the S-Function Builder. If you try to create an S-Function with a bus output and no inputs, the builder messes up while generating the code (inserts an extra comma where the input argument usually is) that causes build errors, rendering the builder GUI useless.

Thanks,
Jeff</description>
		<content:encoded><![CDATA[<p>Seth,</p>
<p>Just FYI, I found a bug in the S-Function Builder. If you try to create an S-Function with a bus output and no inputs, the builder messes up while generating the code (inserts an extra comma where the input argument usually is) that causes build errors, rendering the builder GUI useless.</p>
<p>Thanks,<br />
Jeff</p>
]]></content:encoded>
	</item>
</channel>
</rss>

