Model { Name "merge" Version 3.00 SimParamPage "Solver" SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off ShowPortDataTypes off StartTime "0.0" StopTime "inf" SolverMode "SingleTasking" Solver "VariableStepDiscrete" RelTol "1e-3" AbsTol "1e-6" Refine "1" MaxStep ".1" 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" ConsistencyChecking "off" ZeroCross on SimulationMode "normal" BlockDataTips on BlockParametersDataTip on BlockAttributesDataTip off BlockPortWidthsDataTip off BlockDescriptionStringDataTip off BlockMaskParametersDataTip off 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:06:55 1998" Creator "ldean" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "ctrapeni" ModifiedDateFormat "%" LastModifiedDate "Fri Sep 18 15:45:13 1998" ModelVersionFormat "1.%" 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 "merge" Location [70, 137, 541, 534] Open on ToolBar on StatusBar on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "88" ReportName "simulink-default.rpt" Block { BlockType DiscretePulseGenerator Name "Discrete Pulse\nGenerator" Position [100, 145, 130, 175] ShowName off FontName "Arial" FontSize 12 Amplitude "1" Period "2" PulseWidth "1" PhaseDelay "0" SampleTime "5" } Block { BlockType Logic Name "Logical\nOperator" Ports [1, 1, 0, 0, 0] Position [167, 195, 213, 225] Orientation "down" NamePlacement "alternate" ShowName off FontName "Arial" FontSize 12 Operator "NOT" Inputs "1" } Block { BlockType Merge Name "Merge" Ports [2, 1, 0, 0, 0] Position [310, 144, 400, 211] ShowName off FontName "Arial" FontSize 12 Inputs "2" InitialOutput "[]" } Block { BlockType SubSystem Name "More Info" Ports [0, 0, 0, 0, 0] Position [376, 345, 510, 426] 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 [111, 191, 616, 394] Open off ToolBar off StatusBar off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Annotation { Position [218, 22] Text "Merge Block Demonstration" FontSize 14 FontWeight "bold" } Annotation { Position [20, 40] HorizontalAlignment "left" VerticalAlignment "top" Text "This demonstration shows what happens when " "the output of two enabled \nsubsystems are merged together. The output of th" "e merge block is the last\n output written to the input ports of the block.\n" "\nWhile the simulation is running, the subsystem which is green is the one \n" "whose signal is displayed on the scope. The coloring of the blocks is \ncontr" "olled by an S-Function which exists in the enabled subsystems. This\nS-Funct" "ion also artifically slows down the simulation by placing a short \npause in " "the S-Function.\n" FontName "Arial" FontSize 12 } } } Block { BlockType SubSystem Name "More Info1" Ports [0, 0, 0, 0, 0] Position [15, 346, 139, 425] 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 ToolBar off StatusBar off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" } } Block { BlockType Reference Name "Repeating\nSequence" Ports [0, 1, 0, 0, 0] Position [15, 263, 70, 307] ShowName off FontName "Arial" FontSize 12 SourceBlock "simulink3/Sources/Repeating\nSequence" SourceType "Repeating table" rep_seq_t "[0 1]" rep_seq_y "[0 2]" } Block { BlockType Scope Name "Scope" Ports [1, 0, 0, 0, 0] Position [455, 153, 505, 207] FontName "Arial" FontSize 12 Floating off Location [633, 104, 1120, 451] Open on NumInputPorts "1" TickLabels "on" ZoomMode "on" List { ListType AxesTitles axes1 "%" } Grid "on" TimeRange "20" YMin "-1.5" YMax "2" SaveToWorkspace off SaveName "ScopeData" DataFormat "Matrix" LimitMaxRows on MaxRows "5000" Decimation "1" SampleInput off SampleTime "0" } Block { BlockType Sin Name "Sine Wave" Position [15, 67, 70, 113] ShowName off FontName "Arial" FontSize 12 Amplitude "1" Frequency "pi" Phase "0" SampleTime "0" } Block { BlockType SubSystem Name "Subsystem" Tag "MergeExample" Ports [1, 1, 1, 0, 0] Position [160, 61, 225, 119] NamePlacement "alternate" ShowName off FontName "Arial" FontSize 12 ShowPortLabels on System { Name "Subsystem" Location [526, 547, 885, 717] Open off ToolBar off StatusBar off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "U" Position [70, 103, 100, 117] Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" } Block { BlockType EnablePort Name "Enable" Ports [0, 0, 0, 0, 0] Position [145, 25, 191, 60] StatesWhenEnabling "reset" ShowOutputPort off } Block { BlockType "S-Function" Name "S-Function" Ports [0, 0, 0, 0, 0] Position [245, 25, 305, 55] FunctionName "mergefcn" PortCounts "[]" SFunctionModules "''" } Block { BlockType Outport Name "Y" Position [230, 103, 260, 117] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "U" SrcPort 1 DstBlock "Y" DstPort 1 } } } Block { BlockType SubSystem Name "Subsystem1" Tag "MergeExample" Ports [1, 1, 1, 0, 0] Position [160, 258, 225, 312] ShowName off FontName "Arial" FontSize 12 ShowPortLabels on System { Name "Subsystem1" Location [210, 540, 569, 710] Open off ToolBar off StatusBar off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "usletter" PaperUnits "inches" ZoomFactor "100" Block { BlockType Inport Name "U" Position [70, 103, 100, 117] Port "1" PortWidth "-1" SampleTime "-1" DataType "auto" SignalType "auto" } Block { BlockType EnablePort Name "Enable" Ports [0, 0, 0, 0, 0] Position [145, 25, 191, 60] StatesWhenEnabling "reset" ShowOutputPort off } Block { BlockType "S-Function" Name "S-Function" Ports [0, 0, 0, 0, 0] Position [235, 25, 295, 55] FunctionName "mergefcn" PortCounts "[]" SFunctionModules "''" } Block { BlockType Outport Name "Y" Position [230, 103, 260, 117] Port "1" OutputWhenDisabled "held" InitialOutput "[]" } Line { SrcBlock "U" SrcPort 1 DstBlock "Y" DstPort 1 } } } Line { SrcBlock "Sine Wave" SrcPort 1 DstBlock "Subsystem" DstPort 1 } Line { SrcBlock "Subsystem" SrcPort 1 Points [45, 0; 0, 70] DstBlock "Merge" DstPort 1 } Line { SrcBlock "Subsystem1" SrcPort 1 Points [50, 0; 0, -90] DstBlock "Merge" DstPort 2 } Line { SrcBlock "Logical\nOperator" SrcPort 1 DstBlock "Subsystem1" DstPort enable } Line { SrcBlock "Discrete Pulse\nGenerator" SrcPort 1 Points [55, 0] Branch { DstBlock "Logical\nOperator" DstPort 1 } Branch { DstBlock "Subsystem" DstPort enable } } Line { SrcBlock "Repeating\nSequence" SrcPort 1 DstBlock "Subsystem1" DstPort 1 } Line { SrcBlock "Merge" SrcPort 1 DstBlock "Scope" DstPort 1 } Annotation { Position [245, 23] Text "Merge Block Demonstration" FontName "Arial" FontSize 18 FontWeight "bold" } } }