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

📄 testbcirobot3.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	  DstBlock		  "right"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum"
	  SrcPort		  1
	  DstBlock		  "0 ... 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "'0'"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Sum"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "FreePortComms_RX"
	  SrcPort		  1
	  DstBlock		  "Sum"
	  DstPort		  1
	}
	Line {
	  Name			  "top centre"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  DstBlock		  "Display"
	  DstPort		  1
	}
	Line {
	  Name			  "top right"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  "Display"
	  DstPort		  2
	}
	Line {
	  Name			  "bottom right"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  DstBlock		  "Display"
	  DstPort		  3
	}
	Line {
	  Name			  "bottom centre"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  4
	  DstBlock		  "Display"
	  DstPort		  4
	}
	Line {
	  Name			  "bottom left"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  5
	  DstBlock		  "Display"
	  DstPort		  5
	}
	Line {
	  Name			  "top left"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  6
	  DstBlock		  "Display"
	  DstPort		  6
	}
	Line {
	  Name			  "centre"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  7
	  DstBlock		  "Display"
	  DstPort		  7
	}
	Line {
	  Name			  "dot"
	  Labels		  [-1, 1]
	  SrcBlock		  "Demux"
	  SrcPort		  8
	  DstBlock		  "Display"
	  DstPort		  8
	}
	Line {
	  SrcBlock		  "Multiport\nSwitch"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "0 ... 2"
	  SrcPort		  1
	  Points		  [30, 0]
	  Branch {
	    Points		    [60, 0]
	    Branch {
	      DstBlock		      "Multiport\nSwitch"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, -100]
	      DstBlock		      "Relational\nOperator1"
	      DstPort		      2
	    }
	  }
	  Branch {
	    Points		    [0, -155]
	    DstBlock		    "Relational\nOperator"
	    DstPort		    2
	  }
	}
      }
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion"
      Position		      [220, 36, 275, 64]
      ShowName		      off
      DataType		      "double"
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion1"
      Position		      [220, 181, 275, 209]
      ShowName		      off
      DataType		      "double"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Direction left"
      Ports		      [1]
      Position		      [775, 84, 870, 136]
      BackgroundColor	      "lightBlue"
      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|5|0.002|0.5|0.5"
      System {
	Name			"Direction left"
	Location		[262, 82, 829, 357]
	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		    "32"
	    pinStr		    "5"
	  }
	  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		      SubSystem
      Name		      "Direction right"
      Ports		      [1]
      Position		      [775, 230, 865, 280]
      BackgroundColor	      "lightBlue"
      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|7|0.002|0.5|0.5"
      System {
	Name			"Direction 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		    "128"
	    pinStr		    "7"
	  }
	  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		      From
      Name		      "From"
      Position		      [660, 503, 725, 517]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "mot_ctrl"
    }
    Block {
      BlockType		      From
      Name		      "From1"
      Position		      [660, 483, 725, 497]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "gate_right"
    }
    Block {
      BlockType		      From
      Name		      "From2"
      Position		      [660, 463, 725, 477]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "gate_left"
    }
    Block {
      BlockType		      From
      Name		      "From3"
      Position		      [660, 443, 725, 457]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "pulse_right"
    }
    Block {
      BlockType		      From
      Name		      "From4"
      Position		      [660, 423, 725, 437]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "pulse_left"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto"
      Position		      [600, 18, 665, 32]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "pulse_left"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto1"
      Position		      [600, 158, 665, 172]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "pulse_right"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto2"
      Position		      [575, 53, 640, 67]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "gate_left"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto3"
      Position		      [575, 198, 640, 212]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "gate_right"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto4"
      Position		      [690, 343, 755, 357]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "mot_ctrl"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Heartbeat (TX)"
      Ports		      []
      Position		      [60, 195, 152, 231]
      BackgroundColor	      "orange"
      TreatAsAtomicUnit	      off
      MaskPromptString	      "Period of heartbeat signal (seconds)"
      MaskStyleString	      "edit"
      MaskTunableValueString  "on"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "Tbeat=@1;"
      MaskDisplay	      "disp(['Tbeat = ' num2str(Tbeat) ' s'])"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "3"
      System {
	Name			"Heartbeat (TX)"
	Location		[118, 498, 710, 652]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Gain
	  Name			  "'x'"
	  Position		  [190, 65, 220, 95]
	  Gain			  "double('x')"
	}
	Block {
	  BlockType		  ZeroOrderHold
	  Name			  "0.1 s"
	  Position		  [280, 61, 315, 99]
	  SampleTime		  "0.1"
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "3 seconds"
	  Position		  [25, 63, 70, 97]
	  PulseType		  "Time based"
	  Period		  "3"
	  PulseWidth		  "0.2"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [125, 30, 155, 60]
	  Orientation		  "left"
	  ShowName		  off
	  Value			  "0"
	}
	Block {
	  BlockType		  Constant

⌨️ 快捷键说明

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