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

📄 testbcirobot3d.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	    DstBlock		    "switch off \nmotors in \nidle state\n(low"
" active)"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 120]
	    DstBlock		    "True=1, False=0"
	    DstPort		    1
	  }
	}
	Line {
	  Labels		  [0, 0]
	  SrcBlock		  "switch off \nmotors in \nidle state\n(low a"
"ctive)"
	  SrcPort		  1
	  DstBlock		  "Motor Control\nBit"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [5]
      Position		      [785, 417, 850, 523]
      Location		      [83, 190, 578, 651]
      Open		      off
      NumInputPorts	      "5"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
	axes4			"%<SignalLabel>"
	axes5			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
	axes3			""
	axes4			""
	axes5			""
      }
      TimeRange		      "10"
      YMin		      "-5~-5~-5~-5~-5"
      YMax		      "5~5~5~5~5"
      DataFormat	      "StructureWithTime"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Velocity left"
      Ports		      [1]
      Position		      [775, 14, 870, 66]
      BackgroundColor	      "[1.000000, 1.000000, 0.000000]"
      AncestorBlock	      "mc9S12tool/Digital output"
      List {
	ListType		RTWdata
	portStr			"PORTA"
	ddrStr			"DDRA"
	pinStr			"6"
      }
      FontSize		      12
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskHelp		      "helpview('C:\\Program Files\\Metrowerks\\rtmc9S"
"12_CW_R13\\bin\\mc9S12.map', 'mc9S12_DOUT_In_blkref')"
      MaskPromptString	      "Port (see hardware manuals for valid options)|P"
"in (see hardware manuals for valid options)|Sample time|On-threshold (Von)|Of"
"f-threshold (Voff)"
      MaskStyleString	      "popup(Port A|Port B|Port H|Port J|Port M|Port P"
"|Port S|Port T),edit,edit,edit,edit"
      MaskTunableValueString  "off,off,off,on,on"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on"
      MaskVarAliasString      ",,,,"
      MaskVariables	      "port=@1;pin=&2;sampletime=@3;Von=@4;Voff=@5;"
      MaskInitialization      "[portstr, pinstr, pins] = mbc_digitaloutput(por"
"t, pin, sampletime, Von, Voff);"
      MaskDisplay	      "fprintf('%s\\nPins: %s', portstr, pinstr)"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "Port A|4|0.002|0.5|0.5"
      System {
	Name			"Velocity left"
	Location		[262, 81, 702, 272]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [30, 20, 50, 40]
	  FontSize		  12
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Digital Output SFcn"
	  Tag			  "MC9S12target"
	  Ports			  [1]
	  Position		  [255, 81, 380, 119]
	  List {
	    ListType		    RTWdata
	    portStr		    "PORTA"
	    ddrStr		    "DDRA"
	    pinMask		    "16"
	    pinStr		    "4"
	  }
	  FontSize		  12
	  FunctionName		  "digOut_sfcn_9S12"
	  Parameters		  "sampletime, port, pins, Von, Voff"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [1, 1]
	  Position		  [165, 40, 170, 220]
	  ShowName		  off
	  Inputs		  "1"
	  DisplayOption		  "bar"
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [95, 0]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  Points		  [0, -30]
	  DstBlock		  "Digital Output SFcn"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Velocity right"
      Ports		      [1]
      Position		      [775, 159, 870, 211]
      BackgroundColor	      "[1.000000, 1.000000, 0.000000]"
      AncestorBlock	      "mc9S12tool/Digital output"
      List {
	ListType		RTWdata
	portStr			"PORTA"
	ddrStr			"DDRA"
	pinStr			"6"
      }
      FontSize		      12
      ShowPortLabels	      off
      TreatAsAtomicUnit	      off
      MaskHelp		      "helpview('C:\\Program Files\\Metrowerks\\rtmc9S"
"12_CW_R13\\bin\\mc9S12.map', 'mc9S12_DOUT_In_blkref')"
      MaskPromptString	      "Port (see hardware manuals for valid options)|P"
"in (see hardware manuals for valid options)|Sample time|On-threshold (Von)|Of"
"f-threshold (Voff)"
      MaskStyleString	      "popup(Port A|Port B|Port H|Port J|Port M|Port P"
"|Port S|Port T),edit,edit,edit,edit"
      MaskTunableValueString  "off,off,off,on,on"
      MaskCallbackString      "||||"
      MaskEnableString	      "on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on"
      MaskToolTipString	      "on,on,on,on,on"
      MaskVarAliasString      ",,,,"
      MaskVariables	      "port=@1;pin=&2;sampletime=@3;Von=@4;Voff=@5;"
      MaskInitialization      "[portstr, pinstr, pins] = mbc_digitaloutput(por"
"t, pin, sampletime, Von, Voff);"
      MaskDisplay	      "fprintf('%s\\nPins: %s', portstr, pinstr)"
      MaskSelfModifiable      on
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "Port A|6|0.002|0.5|0.5"
      System {
	Name			"Velocity right"
	Location		[262, 81, 702, 272]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [30, 20, 50, 40]
	  FontSize		  12
	}
	Block {
	  BlockType		  "S-Function"
	  Name			  "Digital Output SFcn"
	  Tag			  "MC9S12target"
	  Ports			  [1]
	  Position		  [255, 81, 380, 119]
	  List {
	    ListType		    RTWdata
	    portStr		    "PORTA"
	    ddrStr		    "DDRA"
	    pinMask		    "64"
	    pinStr		    "6"
	  }
	  FontSize		  12
	  FunctionName		  "digOut_sfcn_9S12"
	  Parameters		  "sampletime, port, pins, Von, Voff"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [1, 1]
	  Position		  [165, 40, 170, 220]
	  ShowName		  off
	  Inputs		  "1"
	  DisplayOption		  "bar"
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  Points		  [0, -30]
	  DstBlock		  "Digital Output SFcn"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [95, 0]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Constant
      Name		      "dir left"
      Position		      [715, 95, 745, 125]
      NamePlacement	      "alternate"
      Value		      "0"
    }
    Block {
      BlockType		      Constant
      Name		      "dir right"
      Position		      [715, 240, 745, 270]
      NamePlacement	      "alternate"
    }
    Block {
      BlockType		      SubSystem
      Name		      "myGatedPulseTrain left"
      Ports		      [1, 2]
      Position		      [415, 29, 495, 71]
      TreatAsAtomicUnit	      off
      MaskPromptString	      "Sample time|Number of samples"
      MaskStyleString	      "edit,edit"
      MaskTunableValueString  "on,on"
      MaskCallbackString      "|"
      MaskEnableString	      "on,on"
      MaskVisibilityString    "on,on"
      MaskToolTipString	      "on,on"
      MaskVarAliasString      ","
      MaskVariables	      "Tcount=@1;Nsamp=@2;"
      MaskInitialization      "% each period has an on-phase and an off-phase"
"\nNcount = 2*Nsamp;\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "0.02|30"
      System {
	Name			"myGatedPulseTrain left"
	Location		[43, 153, 968, 526]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "start"
	  Position		  [20, 98, 50, 112]
	}
	Block {
	  BlockType		  SubSystem
	  Name			  " latched high "
	  Ports			  [2, 1]
	  Position		  [550, 105, 615, 145]
	  TreatAsAtomicUnit	  off
	  System {
	    Name		    " latched high "
	    Location		    [181, 194, 702, 429]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "A4"
	    PaperUnits		    "centimeters"
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "trig"
	      Position		      [40, 28, 70, 42]
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "reset"
	      Position		      [40, 128, 70, 142]
	      Port		      "2"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant1"
	      Position		      [40, 170, 70, 200]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant4"
	      Position		      [265, 20, 295, 50]
	      Orientation	      "left"
	      ShowName		      off
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Constant5"
	      Position		      [40, 70, 70, 100]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion"
	      Position		      [150, 166, 205, 194]
	      ShowName		      off
	      DataType		      "double"
	    }
	    Block {
	      BlockType		      Gain
	      Name		      "Gain"
	      Position		      [240, 165, 270, 195]
	      Gain		      "-1"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator2"
	      Position		      [90, 62, 120, 93]
	      ShowName		      off
	      Operator		      "=="
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	    }
	    Block {
	      BlockType		      RelationalOperator
	      Name		      "Relational\nOperator3"
	      Position		      [90, 162, 120, 193]
	      ShowName		      off
	      Operator		      "=="
	      InputSameDT	      off
	      LogicOutDataTypeMode    "Specify via dialog"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Sum2"
	      Ports		      [2, 1]
	      Position		      [270, 105, 290, 125]
	      Orientation	      "left"
	      NamePlacement	      "alternate"
	      ShowName		      off
	      IconShape		      "round"
	      Inputs		      "|++"
	      InputSameDT	      off
	      OutDataTypeMode	      "Inherit via internal rule"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch"
	      Position		      [265, 55, 295, 85]
	      Criteria		      "u2 > Threshold"
	      InputSameDT	      off
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay2"
	      Position		      [315, 53, 350, 87]
	      ShowName		      off
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "high"
	      Position		      [430, 63, 460, 77]
	    }
	    Line {
	      SrcBlock		      "trig"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "reset"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator3"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion"
	      SrcPort		      1
	      DstBlock		      "Gain"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Gain"
	      SrcPort		      1
	      Points		      [5, 0]
	      DstBlock		      "Sum2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator3"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant1"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator3"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Sum2"
	      SrcPort		      1
	      Points		      [-30, 0; 0, -45]
	      DstBlock		      "Switch"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Switch"
	      SrcPort		      1
	      DstBlock		      "Unit Delay2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Constant4"
	      SrcPort		      1
	      Points		      [-25, 0; 0, 25]
	      DstBlock		      "Switch"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Unit Delay2"
	      SrcPort		      1
	      Points		      [0, 0; 10, 0]
	      Branch {
		DstBlock		"high"
		DstPort			1
	      }
	      Branch {
		Points			[0, 45]
		DstBlock		"Sum2"
		

⌨️ 快捷键说明

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