⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 triangle.mdl

📁 非常好的三角波的发生器
💻 MDL
📖 第 1 页 / 共 2 页
字号:
	  }
	}
	hdlcoderui.hdlcc {
	  $ObjectID		  11
	  Description		  "HDL Coder custom configuration component"
	  Version		  "1.3.0"
	  Name			  "HDL Coder"
	  Array {
	    Type		    "Cell"
	    Dimension		    1
	    Cell		    ""
	    PropName		    "HDLConfigFile"
	  }
	  HDLCActiveTab		  "0"
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      CurrentDlgPage	      "Solver"
    }
    PropName		    "ConfigurationSets"
  }
  Simulink.ConfigSet {
    $PropName		    "ActiveConfigurationSet"
    $ObjectID		    1
  }
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Clock
      DisplayTime	      off
    }
    Block {
      BlockType		      Fcn
      Expr		      "sin(u[1])"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ParamMin		      "[]"
      ParamMax		      "[]"
      ParameterDataTypeMode   "Same as input"
      ParameterDataType	      "fixdt(1,16,0)"
      ParameterScalingMode    "Best Precision: Matrix-wise"
      ParameterScaling	      "[]"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      SignalConversion
      OverrideOpt	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      DataType		      "auto"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      SignalType	      "auto"
      SamplingMode	      "auto"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      Scope
      ModelBased	      off
      TickLabels	      "OneTimeTick"
      ZoomMode		      "on"
      Grid		      "on"
      TimeRange		      "auto"
      YMin		      "-5"
      YMax		      "5"
      SaveToWorkspace	      off
      SaveName		      "ScopeData"
      LimitDataPoints	      on
      MaxDataPoints	      "5000"
      Decimation	      "1"
      SampleInput	      off
      SampleTime	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      "FromPortIcon"
      Permissions	      "ReadWrite"
      PermitHierarchicalResolution "All"
      TreatAsAtomicUnit	      off
      SystemSampleTime	      "-1"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      CollapseMode	      "All dimensions"
      CollapseDim	      "1"
      InputSameDT	      on
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Lookup
      InputValues	      "[-4:5]"
      Table		      " rand(1,10)-0.5"
      LookUpMeth	      "Interpolation-Extrapolation"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
      LUTDesignTableMode      "Redesign Table"
      LUTDesignDataSource     "Block Dialog"
      LUTDesignFunctionName   "sqrt(x)"
      LUTDesignUseExistingBP  on
      LUTDesignRelError	      "0.01"
      LUTDesignAbsError	      "1e-6"
    }
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  System {
    Name		    "Triangle"
    Location		    [480, 93, 1016, 386]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    200
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "A4"
    PaperUnits		    "centimeters"
    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Scope
      Name		      "Scope1"
      Ports		      [1]
      Position		      [260, 104, 290, 136]
      Floating		      off
      Location		      [5, 47, 1285, 794]
      Open		      off
      NumInputPorts	      "1"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      YMin		      "1"
      YMax		      "7"
      DataFormat	      "StructureWithTime"
      SampleTime	      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Sub_Tri"
      Ports		      [0, 1]
      Position		      [160, 90, 200, 150]
      MinAlgLoopOccurrences   off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      MaskPromptString	      "Fc"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "Fc=@1;"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "10000"
      System {
	Name			"Sub_Tri"
	Location		[438, 249, 658, 334]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Gain
	  Name			  "Gain"
	  Position		  [75, 29, 140, 61]
	  Gain			  "1000"
	  ParameterDataTypeMode	  "Inherit via internal rule"
	  ParameterDataType	  "sfix(16)"
	  ParameterScaling	  "2^0"
	  OutDataTypeMode	  "Inherit via internal rule"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Triangle"
	  Ports			  [0, 1]
	  Position		  [25, 30, 55, 60]
	  NamePlacement		  "alternate"
	  AncestorBlock		  "simulink/Sources/Repeating\nSequence"
	  MinAlgLoopOccurrences	  off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  MaskType		  "Repeating table"
	  MaskDescription	  "Output a repeating sequence of numbers specified in a table of time-value pairs. Values of time should be monotonically increasing."
	  MaskHelp		  "Repeats cycle given in table. Time values should be monotonically increasing."
	  MaskPromptString	  "Time values:|Output values:"
	  MaskStyleString	  "edit,edit"
	  MaskTunableValueString  "on,on"
	  MaskCallbackString	  "|"
	  MaskEnableString	  "on,on"
	  MaskVisibilityString	  "on,on"
	  MaskToolTipString	  "on,on"
	  MaskVarAliasString	  ","
	  MaskVariables		  "rep_seq_t=@1;rep_seq_y=@2;"
	  MaskInitialization	  "if (length(rep_seq_t) ~= length(rep_seq_y)),\n  error('Length of time vector and output vector must be the same.')\nend\ndbl_rep_seq_t = double(rep_seq_t);\ndbl_rep_seq_y = double(rep_seq_y);\nperiod = max(dbl_rep_seq_t) - min(dbl_rep_seq_t);\nperiod = str2num(sprintf('%0.5g',period));\ns = round(length(dbl_rep_seq_t)/50);\nif s > 0\n  pts = [1:s:length(dbl_rep_seq_t)];\n  L   = length(pts);\nelse\n  L   = length(dbl_rep_seq_t);\n  pts = [1:L];\nend\n\ndisp_seq_t = reshape(dbl_rep_seq_t(pts),L,1);\ndisp_seq_y = reshape(dbl_rep_seq_y(pts),L,1);\ndisp_period = max(disp_seq_t) - min(disp_seq_t);\n\ndisp_seq_t  = repmat(disp_seq_t,1,3) + (ones(L,1)*(disp_period*[0,1,2]));\ndisp_seq_t = [ disp_seq_t(:); disp_seq_t(end) ];\ndisp_seq_y = repmat(disp_seq_y,1,3);\ndisp_seq_y = [ disp_seq_y(:); disp_seq_y(1) ];\n"
	  MaskDisplay		  "plot( disp_seq_t, disp_seq_y )"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	  MaskValueString	  "[0 1/Fc 2/Fc]|[0 1/Fc 0]"
	  MaskCapabilities	  "slmaskedcaps(gcbh)"
	  MaskTabNameString	  ","
	  System {
	    Name		    "Triangle"
	    Location		    [35, 547, 799, 716]
	    Open		    on
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Clock
	      Name		      "Clock"
	      Position		      [15, 30, 35, 50]
	      ShowName		      off
	      Decimation	      "10"
	    }
	    Block {
	      BlockType		      Fcn
	      Name		      "Fcn1"
	      Position		      [200, 46, 290, 64]
	      Expr		      "rem(u[1],period)"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [525, 40, 555, 70]
	      Gain		      "0.001"
	      ParameterDataTypeMode   "Inherit via internal rule"
	      ParameterDataType	      "sfix(16)"
	      ParameterScaling	      "2^0"
	      OutDataTypeMode	      "Inherit via internal rule"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Lookup
	      Name		      "Look-Up Table1"
	      Position		      [330, 43, 370, 67]
	      InputValues	      "rep_seq_t - min(rep_seq_t)"
	      Table		      "rep_seq_y"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      SignalConversion
	      Name		      "Output"
	      Position		      [450, 31, 470, 79]
	      ConversionOutput	      "Contiguous copy"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum"
	      Ports		      [2, 1]
	      Position		      [145, 29, 165, 76]
	      ShowName		      off
	      Inputs		      "+-"
	      CollapseMode	      "All dimensions"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      "S-Function"
	      Name		      "startTime"
	      Ports		      [0, 1]
	      Position		      [50, 52, 120, 78]
	      FunctionName	      "sfun_tstart"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [620, 40, 640, 60]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "Look-Up Table1"
	      SrcPort		      1
	      DstBlock		      "Output"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "startTime"
	      SrcPort		      1
	      DstBlock		      "Sum"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Clock"
	      SrcPort		      1
	      DstBlock		      "Sum"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sum"
	      SrcPort		      1
	      DstBlock		      "Fcn1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Fcn1"
	      SrcPort		      1
	      DstBlock		      "Look-Up Table1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Output"
	      SrcPort		      1
	      DstBlock		      "Gain"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      Points		      [20, 0; 0, -5]
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Outport
	  Name			  "Tri"
	  Position		  [165, 38, 195, 52]
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "Triangle"
	  SrcPort		  1
	  DstBlock		  "Gain"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Gain"
	  SrcPort		  1
	  DstBlock		  "Tri"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Sub_Tri"
      SrcPort		      1
      DstBlock		      "Scope1"
      DstPort		      1
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -