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

📄 timer_ic.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
字号:
Model {
  Name			  "Timer_IC"
  Version		  5.1
  SaveDefaultBlockParams  on
  SampleTimeColors	  on
  LibraryLinkDisplay	  "none"
  WideLines		  on
  ShowLineDimensions	  off
  ShowPortDataTypes	  off
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  off
  SortedOrder		  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  on
  CloseFcn		  "rtwprivate ssgencode ModelCloseRequest MC_AD"
  Created		  "Wed Jun 13 23:02:07 2001"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "fwornle"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Tue Sep 05 20:10:10 2006"
  ModelVersionFormat	  "1.%<AutoIncrement:299>"
  ConfigurationManager	  "none"
  SimParamPage		  "RTW"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  ExtModeMexFile	  "ext_comm_mc9S12"
  ExtModeMexArgs	  "2, 0, 115200"
  ExtModeBatchMode	  off
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  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	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  BufferReuse		  on
  RTWExpressionDepthLimit 5
  SimulationMode	  "normal"
  Solver		  "ode1"
  SolverMode		  "SingleTasking"
  StartTime		  "0.0"
  StopTime		  "99999"
  MaxOrder		  5
  MaxStep		  "0.02"
  MinStep		  "auto"
  MaxNumMinSteps	  "-1"
  InitialStep		  "auto"
  FixedStep		  "0.002"
  RelTol		  "1e-3"
  AbsTol		  "1e-6"
  OutputOption		  "RefineOutputTimes"
  OutputTimes		  "[]"
  Refine		  "1"
  LoadExternalInput	  off
  ExternalInput		  "[t, u]"
  LoadInitialState	  off
  InitialState		  "xInitial"
  SaveTime		  off
  TimeSaveName		  "tout"
  SaveState		  off
  StateSaveName		  "xout"
  SaveOutput		  off
  OutputSaveName	  "yout"
  SaveFinalState	  off
  FinalStateName	  "xFinal"
  SaveFormat		  "Array"
  Decimation		  "1"
  LimitDataPoints	  off
  MaxDataPoints		  "1000"
  SignalLoggingName	  "sigsOut"
  ConsistencyChecking	  "none"
  ArrayBoundsChecking	  "none"
  AlgebraicLoopMsg	  "warning"
  BlockPriorityViolationMsg "warning"
  MinStepSizeMsg	  "warning"
  InheritedTsInSrcMsg	  "warning"
  DiscreteInheritContinuousMsg "warning"
  MultiTaskRateTransMsg	  "error"
  SingleTaskRateTransMsg  "none"
  CheckForMatrixSingularity "none"
  IntegerOverflowMsg	  "warning"
  Int32ToFloatConvMsg	  "warning"
  ParameterDowncastMsg	  "error"
  ParameterOverflowMsg	  "error"
  ParameterPrecisionLossMsg "warning"
  UnderSpecifiedDataTypeMsg "none"
  UnnecessaryDatatypeConvMsg "none"
  VectorMatrixConversionMsg "none"
  InvalidFcnCallConnMsg	  "error"
  SignalLabelMismatchMsg  "none"
  UnconnectedInputMsg	  "warning"
  UnconnectedOutputMsg	  "warning"
  UnconnectedLineMsg	  "warning"
  SfunCompatibilityCheckMsg "none"
  RTWInlineParameters	  off
  BlockReductionOpt	  off
  BooleanDataType	  off
  ConditionallyExecuteInputs on
  ParameterPooling	  on
  OptimizeBlockIOStorage  on
  ZeroCross		  on
  AssertionControl	  "UseLocalSettings"
  ProdHWDeviceType	  "Microprocessor"
  ProdHWWordLengths	  "8,16,32,32"
  RTWSystemTargetFile	  "mc9S12.tlc"
  RTWTemplateMakefile	  "mc9S12.tmf"
  RTWMakeCommand	  "make_mc9S12"
  RTWGenerateCodeOnly	  off
  RTWRetainRTWFile	  off
  TLCProfiler		  off
  TLCDebug		  off
  TLCCoverage		  off
  TLCAssertion		  off
  RTWOptions		  " -aCore_time=\"RTI\" -aCycTI_pin=5 -aDebug2SCI0=0 -"
"aEnforceIntegerDowncast=1 -aExtMode=1 -aExtModeTesting=0 -aFoldNonRolledExpr="
"1 -aForceParamTrailComments=0 -aGenerateComments=1 -aGenerateReport=0 -aHasTi"
"mers=\"0x00000002\" -aIgnoreCustomStorageClasses=0 -aIncDataTypeInIds=0 -aInc"
"HierarchyInIds=0 -aInlineInvariantSignals=0 -aInlineParameters=0 -aInlinedPrm"
"Access=\"Literals\" -aLCDdispErrors=1 -aLocalBlockOutputs=1 -aLogVarNameModif"
"ier=\"rt_\" -aMATLAB_comms_port=\"SCI1\" -aMaxRTWIdLen=31 -aMem_Map=\"Flash_f"
"lat\" -aNumFreePortSCI0=0 -aNumFreePortSCI1=0 -aPrefixModelToSubsysFcnNames=1"
" -aPurelyIntegerCode=0 -aRTWVerbose=1 -aRollThreshold=5 -aRun_Immediately=0 -"
"aSCI0=\"idle\" -aSCI1=\"MCOM\" -aSerTI_pin=6 -aShowEliminatedStatements=1 -aS"
"taticLibraryRebuild=0 -aTarget_board=\"Dragon-12\" -aTimerBasePeriod=0.1 -aTi"
"ming_signals=0 -abaudrate=115200 -aport=\"COM2\" -atimeport=\"PORTB\""
  BlockDefaults {
    Orientation		    "right"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Helvetica"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Display
      Format		      "short"
      Decimation	      "10"
      Floating		      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      PortCounts	      "[]"
      SFunctionModules	      "''"
    }
    Block {
      BlockType		      SubSystem
      ShowPortLabels	      on
      Permissions	      "ReadWrite"
      RTWSystemCode	      "Auto"
      RTWFcnNameOpts	      "Auto"
      RTWFileNameOpts	      "Auto"
      SimViewingDevice	      off
      DataTypeOverride	      "UseLocalSettings"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      ZeroOrderHold
    }
  }
  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		    "Timer_IC"
    Location		    [495, 292, 1140, 489]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    212
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    Block {
      BlockType		      Display
      Name		      "Display"
      Ports		      [1]
      Position		      [470, 96, 565, 124]
      FontSize		      12
      Decimation	      "1"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Timer3"
      Ports		      [0, 1]
      Position		      [40, 66, 215, 154]
      AncestorBlock	      "mc9S12tool/Digital output"
      List {
	ListType		RTWdata
	portStr			"PORTA"
	ddrStr			"DDRA"
	pinStr			"6"
      }
      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_DOUT_In_blkref')"
      MaskPromptString	      "Timer channel|Timer mode|Timer base period (sec"
"onds)|Sample time"
      MaskStyleString	      "popup(Channel 0|Channel 1|Channel 2|Channel 3|C"
"hannel 4|Channel 5|Channel 6),popup(Output Compare|Input Capture),edit,edit"
      MaskTunableValueString  "off,off,off,off"
      MaskCallbackString      "|||"
      MaskEnableString	      "on,on,on,on"
      MaskVisibilityString    "on,on,on,on"
      MaskToolTipString	      "on,on,on,on"
      MaskVarAliasString      ",,,"
      MaskVariables	      "timerChannel=@1;timerMode=@2;timerPeriod=@3;sam"
"pletime=@4;"
      MaskInitialization      "if(timerMode == 1)\n	% OC\n	timer"
"PeriodTypestr = 'Period:';\nelse\n	% IC\n	timerPeriodTypestr = "
"'Measurement intvl:';\nend\n\n[timerChannelstr, timerModestr, timerPeriodstr,"
" ECTResolutionstr] = mbc_timer(timerChannel, timerMode, timerPeriod, sampleti"
"me);\n\n% future extension: allow for output port / pin selection\n% this has"
"n't been implemented yet, as it would require the \n% interrupt service handl"
"ers to be configured by TLC\n% fw-09-06\n%\n% the following code assumes that"
" timerOCport and timerOCpin have been defined similarly to what's done in mbc"
"_ditaloutput.m\n% the function also returns two more parameters (timerPORTstr"
", timerPINstr)\n% these can be used in the Icon page. Replace that line by th"
"e following:\n% fprintf('Channel: %s\\nMode: %s\\n%sPeriod: %s\\nResolution: "
"%s', timerChannelstr, timerModestr, timerOptPORTstr, timerPeriodstr, ECTResol"
"utionstr)\n% \n% [timerChannelstr, timerModestr, timerPORTstr, timerPINstr, t"
"imerPeriodstr, ECTResolutionstr] = mbc_timer(timerChannel, timerMode, timerOC"
"port, timerOCpin, timerPeriod, sampletime);\n% \n% if(timerMode == 1)\n% "
"	% OC -> display port / pin\n% 	timerOptPORTstr = ['Toggle: ' t"
"imerPORTstr ', Pin(s): ' timerPINstr '\\n'];\n% else\n% 	% IC -> don't"
" display port / pin\n% 	timerOptPORTstr = '';\n% end\n"
      MaskDisplay	      "fprintf('Channel: %s\\nMode: %s\\nPeriod: %s\\n"
"Resolution: %s', timerChannelstr, timerModestr, timerPeriodstr, ECTResolution"
"str)\n"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "Channel 3|Input Capture|0.3|0.1"
      System {
	Name			"Timer3"
	Location		[262, 81, 732, 200]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  "S-Function"
	  Name			  "Timer Block"
	  Tag			  "MC9S12target_timer"
	  Ports			  [0, 1]
	  Position		  [200, 41, 335, 79]
	  List {
	    ListType		    RTWdata
	    timerChannel	    "3"
	    timerMode		    "2"
	    timerPeriod		    "0.34952"
	    timerResolution	    "5.3333e-006"
	  }
	  FontSize		  12
	  FunctionName		  "timer_sfcn_9S12"
	  Parameters		  "sampletime, timerMode"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Out1"
	  Position		  [385, 50, 405, 70]
	  FontSize		  12
	}
	Line {
	  SrcBlock		  "Timer Block"
	  SrcPort		  1
	  DstBlock		  "Out1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      ZeroOrderHold
      Name		      "Zero-Order\nHold"
      Position		      [350, 91, 385, 129]
      ShowName		      off
      SampleTime	      "0.1"
    }
    Line {
      SrcBlock		      "Zero-Order\nHold"
      SrcPort		      1
      DstBlock		      "Display"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Timer3"
      SrcPort		      1
      DstBlock		      "Zero-Order\nHold"
      DstPort		      1
    }
    Annotation {
      Name		      "Test program - Timer (Input Capture mode)"
      Position		      [27, 22]
      HorizontalAlignment     "left"
      VerticalAlignment	      "top"
      FontName		      "Times New Roman"
      FontSize		      14
      FontWeight	      "bold"
    }
  }
}

⌨️ 快捷键说明

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