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

📄 speedcontrol.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
📖 第 1 页 / 共 2 页
字号:
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      SubSystem
      Name		      "ADC Input"
      Ports		      [0, 1]
      Position		      [45, 175, 140, 225]
      AncestorBlock	      "mc9S12tool/ADC Input"
      FontName		      "Arial"
      FontSize		      12
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskHelp		      "helpview('C:\\Documents and Settings\\fwornle\\"
"My Documents\\frank\\_cProgs\\Motorola\\rtmc9S12_CW_R13\\bin\\mc9S12.map', 'm"
"c9S12_ADC_In_blkref')"
      MaskPromptString	      "ADC bank|Channels ( 0 - 7 )|ADC resolution|Norm"
"alization|Sample time"
      MaskStyleString	      "popup(0|1),edit,popup(10 bits|8 bits),popup(raw"
" values|max. output:  1|max. output:  5),edit"
      MaskTunableValueString  "off,off,off,off,off"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on"
      MaskVarAliasString      ",,,,"
      MaskVariables	      "bank=@1;channels=&2;use10bits=@3;normalize=@4;s"
"ampletime=@5;"
      MaskInitialization      "[channelsStr, firstChannel, numChannels] = mbc_"
"adcinput(bank, channels, use10bits, normalize, sampletime);"
      MaskDisplay	      "disp(['ADC Input\\n' channelsStr])"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "0|3|10 bits|max. output:  5|0.004"
      System {
	Name			"ADC Input"
	Location		[584, 145, 1067, 361]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  "S-Function"
	  Name			  "Analog Input SFcn"
	  Ports			  [0, 1]
	  Position		  [25, 25, 145, 65]
	  FunctionName		  "adc_sfcn_9S12"
	  Parameters		  "bank-1, firstChannel, numChannels, use10bit"
"s-1, normalize, sampletime"
	  MaskIconFrame		  on
	  MaskIconOpaque	  on
	  MaskIconRotate	  "none"
	  MaskIconUnits		  "autoscale"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 1]
	  Position		  [240, 23, 245, 207]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "1"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [410, 26, 430, 44]
	}
	Line {
	  SrcBlock		  "Analog Input SFcn"
	  SrcPort		  1
	  Points		  [0, 70]
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [30, 0; 0, -80]
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "Bias"
      Position		      [95, 45, 125, 75]
    }
    Block {
      BlockType		      Reference
      Name		      "D to A converter"
      Ports		      [1]
      Position		      [520, 85, 615, 135]
      FontSize		      12
      SourceBlock	      "mc9S12tool/D to A converter"
      SourceType	      ""
      sampletime	      "0.004"
      dac_channel	      "1"
      Vsat		      "5"
    }
    Block {
      BlockType		      Mux
      Name		      "Mux"
      Ports		      [2, 1]
      Position		      [270, 171, 275, 209]
      ShowName		      off
      Inputs		      "2"
      DisplayOption	      "bar"
    }
    Block {
      BlockType		      Reference
      Name		      "PID Controller"
      Ports		      [1, 1]
      Position		      [310, 95, 340, 125]
      SourceBlock	      "simulink_extras/Additional\nLinear/PID Controll"
"er"
      SourceType	      "PID Controller"
      P			      "1"
      I			      "0"
      D			      "0"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation"
      Position		      [425, 93, 455, 127]
      UpperLimit	      "5"
      LowerLimit	      "0"
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [1]
      Position		      [370, 174, 400, 206]
      Location		      [21, 490, 345, 729]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "10"
      YMin		      "-0.5"
      YMax		      "5.5"
      SaveToWorkspace	      on
      SaveName		      "y"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope2"
      Ports		      [1]
      Position		      [370, 24, 400, 56]
      Location		      [357, 491, 681, 730]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "10"
      YMin		      "-5.5"
      YMax		      "5.5"
      SaveToWorkspace	      on
      SaveName		      "e"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope3"
      Ports		      [1]
      Position		      [510, 24, 540, 56]
      Location		      [695, 490, 1019, 729]
      Open		      on
      NumInputPorts	      "1"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
      }
      TimeRange		      "10"
      YMin		      "-0.5"
      YMax		      "5.5"
      SaveToWorkspace	      on
      SaveName		      "u"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [175, 100, 195, 120]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "++|"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [235, 100, 255, 120]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|+-"
      InputSameDT	      off
      OutDataTypeMode	      "Inherit via internal rule"
    }
    Block {
      BlockType		      DiscretePulseGenerator
      Name		      "set point"
      Position		      [90, 93, 135, 127]
      PulseType		      "Time based"
      Amplitude		      "3"
      PulseWidth	      "50"
    }
    Line {
      SrcBlock		      "Saturation"
      SrcPort		      1
      Points		      [20, 0]
      Branch {
	DstBlock		"D to A converter"
	DstPort			1
      }
      Branch {
	Points			[0, -70]
	DstBlock		"Scope3"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "ADC Input"
      SrcPort		      1
      Points		      [100, 0]
      Branch {
	DstBlock		"Mux"
	DstPort			2
      }
      Branch {
	DstBlock		"Sum1"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "PID Controller"
      SrcPort		      1
      DstBlock		      "Saturation"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Bias"
      SrcPort		      1
      Points		      [55, 0]
      DstBlock		      "Sum"
      DstPort		      1
    }
    Line {
      SrcBlock		      "set point"
      SrcPort		      1
      DstBlock		      "Sum"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	DstBlock		"Sum1"
	DstPort			1
      }
      Branch {
	Points			[0, 70]
	DstBlock		"Mux"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      Points		      [15, 0]
      Branch {
	DstBlock		"PID Controller"
	DstPort			1
      }
      Branch {
	Points			[0, -70]
	DstBlock		"Scope2"
	DstPort			1
      }
    }
    Annotation {
      Name		      "Test program - Speed controller"
      Position		      [27, 17]
      HorizontalAlignment     "left"
      VerticalAlignment	      "top"
      FontName		      "Times New Roman"
      FontSize		      14
      FontWeight	      "bold"
    }
  }
}

⌨️ 快捷键说明

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