Model {
  Name			  "prioritydemo"
  Version		  3.00
  SimParamPage		  "Solver"
  SampleTimeColors	  off
  InvariantConstants	  off
  WideVectorLines	  off
  ShowLineWidths	  off
  ShowPortDataTypes	  off
  StartTime		  "0.0"
  StopTime		  "inf"
  SolverMode		  "Auto"
  Solver		  "VariableStepDiscrete"
  RelTol		  "1e-3"
  AbsTol		  "auto"
  Refine		  "1"
  MaxStep		  "auto"
  InitialStep		  "auto"
  FixedStep		  "auto"
  MaxOrder		  5
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  SaveTime		  on
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  on
  OutputSaveName	  "yout"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Matrix"
  LimitMaxRows		  off
  MaxRows		  "1000"
  Decimation		  "1"
  AlgebraicLoopMsg	  "warning"
  MinStepSizeMsg	  "warning"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  IntegerOverflowMsg	  "none"
  UnnecessaryDatatypeConvMsg "none"
  Int32ToFloatConvMsg	  "warning"
  SignalLabelMismatchMsg  "none"
  ConsistencyChecking	  "off"
  ZeroCross		  on
  SimulationMode	  "normal"
  BlockDataTips		  off
  BlockParametersDataTip  off
  BlockAttributesDataTip  off
  BlockPortWidthsDataTip  off
  BlockDescriptionStringDataTip	off
  BlockMaskParametersDataTip off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  OptimizeBlockIOStorage  on
  BufferReuse		  on
  BooleanDataType	  off
  RTWSystemTargetFile	  "grt.tlc"
  RTWInlineParameters	  off
  RTWRetainRTWFile	  off
  RTWTemplateMakefile	  "grt_default_tmf"
  RTWMakeCommand	  "make_rtw"
  RTWGenerateCodeOnly	  off
  ExtModeMexFile	  "ext_comm"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "oneshot"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  off
  Created		  "Mon Jul 27 12:02:57 1998"
  Creator		  "ldean"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "ricks"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Thu Nov 05 15:59:01 1998"
  ModelVersionFormat	  "1.%<AutoIncrement:24>"
  ConfigurationManager	  "none"
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  LineDefaults {
    FontName		    "Helvetica"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "prioritydemo"
    Location		    [162, 102, 639, 455]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    AutoZoom		    on
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "More Info"
      Ports		      [0, 0, 0, 0, 0]
      Position		      [325, 261, 450, 339]
      DropShadow	      on
      ShowName		      off
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      on
      MaskDisplay	      "disp('Double click\\nhere for\\ninformation on"
"\\nthis demonstration')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info"
	Location		[168, 137, 722, 385]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Annotation {
	  Position		  [233, 22]
	  Text			  "Block Priority Demonstration"
	  FontName		  "Arial"
	  FontSize		  14
	  FontWeight		  "bold"
	}
	Annotation {
	  Position		  [20, 40]
	  HorizontalAlignment	  "left"
	  VerticalAlignment	  "top"
	  Text			  "This demonstration shows what happens when "
"blocks are assigned different\npriorities.  The block priority affects the or"
"der in which the blocks are\nexecuted.  You can set the block priority throug"
"h the Block Properties dialog.\n\nThe block sorting order is calculated only "
"at the beginning of a\nsimulation.  For this reason, changes to a block's Pri"
"ority property are only\nupdated when the simulation is started.  Double clic"
"k on the green block\nto change the priority levels for the blocks and see wh"
"at happens.\n\nInside of each triggered subsystem is an S-Function which cont"
"rols the coloring \nof the blocks and also slows down the simulation. The pri"
"ority level of the block \nis displayed using the format attribute string tha"
"t can be set in the Block Properties \ndialog."
	  FontName		  "Arial"
	  FontSize		  12
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "More Info1"
      Ports		      [0, 0, 0, 0, 0]
      Position		      [25, 261, 147, 339]
      DropShadow	      on
      ShowName		      off
      OpenFcn		      "simcad(bdroot);"
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      on
      MaskDisplay	      "disp('Double click\\nhere for\\nSimulink Help')"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      System {
	Name			"More Info1"
	Location		[128, 280, 487, 453]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      DiscretePulseGenerator
      Name		      "Pulse\nGenerator"
      Position		      [50, 50, 80, 80]
      FontName		      "Arial"
      FontSize		      12
      Amplitude		      "1"
      Period		      "2"
      PulseWidth	      "1"
      PhaseDelay	      "0"
      SampleTime	      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Set Block Priority"
      Ports		      [0, 0, 0, 0, 0]
      Position		      [180, 166, 305, 244]
      BackgroundColor	      "green"
      DropShadow	      on
      ShowName		      off
      StartFcn		      "set_param(gcbh,'MaskEnables',{'off'})"
      StopFcn		      "set_param(gcbh,'MaskEnables',{'on'})"
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      on
      MaskType		      "Set Block Priority"
      MaskDescription	      "This block lets you select the priority that is"
" used on the three triggered subsystems above it.  The priority may only be s"
"et when the simulation is stopped."
      MaskPromptString	      "Priority order:"
      MaskStyleString	      "popup(1 2 3|1 3 2|2 1 3|2 3 1|3 1 2|3 2 1)"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskVariables	      "PriorityOrder=&1;"
      MaskInitialization      "spriorityfcn([],[],[],'PriorityOrder');"
      MaskDisplay	      "disp(['Set\\nBlock\\nPriority\\n' PriorityOrder"
"])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "1 2 3"
      System {
	Name			"Set Block Priority"
	Location		[183, 98, 613, 325]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "a"
      Ports		      [0, 0, 0, 1, 0]
      Position		      [170, 95, 200, 125]
      ShowName		      off
      Priority		      "1"
      AttributesFormatString  "Priority: %<Priority>"
      FontName		      "Arial Black"
      FontSize		      14
      ShowPortLabels	      on
      System {
	Name			"a"
	Location		[205, 333, 571, 540]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  TriggerPort
	  Name			  "Trigger"
	  Ports			  [0, 0, 0, 0, 0]
	  Position		  [140, 40, 160, 60]
	  TriggerType		  "rising"
	  ShowOutputPort	  off
	  OutputDataType	  "auto"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [0, 0, 0, 0, 0]
	  Position		  [115, 100, 175, 130]
	  FunctionName		  "spriorityfcn"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "b"
      Ports		      [0, 0, 0, 1, 0]
      Position		      [290, 95, 320, 125]
      ShowName		      off
      Priority		      "2"
      AttributesFormatString  "Priority: %<Priority>"
      FontName		      "Arial Black"
      FontSize		      14
      ShowPortLabels	      on
      System {
	Name			"b"
	Location		[203, 587, 569, 794]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  TriggerPort
	  Name			  "Trigger"
	  Ports			  [0, 0, 0, 0, 0]
	  Position		  [140, 40, 160, 60]
	  TriggerType		  "rising"
	  ShowOutputPort	  off
	  OutputDataType	  "auto"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [0, 0, 0, 0, 0]
	  Position		  [115, 100, 175, 130]
	  FunctionName		  "spriorityfcn"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "c"
      Ports		      [0, 0, 0, 1, 0]
      Position		      [405, 95, 435, 125]
      ShowName		      off
      Priority		      "3"
      AttributesFormatString  "Priority: %<Priority>"
      FontName		      "Arial Black"
      FontSize		      14
      ShowPortLabels	      on
      System {
	Name			"c"
	Location		[200, 593, 566, 800]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	ZoomFactor		"100"
	AutoZoom		on
	Block {
	  BlockType		  TriggerPort
	  Name			  "Trigger"
	  Ports			  [0, 0, 0, 0, 0]
	  Position		  [140, 40, 160, 60]
	  TriggerType		  "rising"
	  ShowOutputPort	  off
	  OutputDataType	  "auto"
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "S-Function"
	  Ports			  [0, 0, 0, 0, 0]
	  Position		  [120, 100, 180, 130]
	  FunctionName		  "spriorityfcn"
	  PortCounts		  "[]"
	  SFunctionModules	  "''"
	}
      }
    }
    Line {
      SrcBlock		      "Pulse\nGenerator"
      SrcPort		      1
      Points		      [100, 0]
      Branch {
	Points			[120, 0]
	Branch {
	  Points		  [115, 0]
	  DstBlock		  "c"
	  DstPort		  trigger
	}
	Branch {
	  DstBlock		  "b"
	  DstPort		  trigger
	}
      }
      Branch {
	DstBlock		"a"
	DstPort			trigger
      }
    }
    Annotation {
      Position		      [231, 23]
      Text		      "Block Priority Demonstration"
      FontName		      "Arial Black"
      FontSize		      18
    }
  }
}
