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

📄 testbcirobot3e_ext.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
📖 第 1 页 / 共 5 页
字号:
	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, 258, 870, 292]
      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		      [245, 438, 310, 452]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "mot_ctrl"
    }
    Block {
      BlockType		      From
      Name		      "From1"
      Position		      [245, 418, 310, 432]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "gate_right"
    }
    Block {
      BlockType		      From
      Name		      "From2"
      Position		      [245, 398, 310, 412]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "gate_left"
    }
    Block {
      BlockType		      From
      Name		      "From3"
      Position		      [245, 378, 310, 392]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "pulse_right"
    }
    Block {
      BlockType		      From
      Name		      "From4"
      Position		      [245, 358, 310, 372]
      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, 203, 640, 217]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "gate_right"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto4"
      Position		      [690, 348, 755, 362]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "mot_ctrl"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Motor Enable Pin"
      Ports		      [1]
      Position		      [775, 356, 870, 394]
      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 T|7|0.002|0.5|0.5"
      System {
	Name			"Motor Enable Pin"
	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		    "PTT"
	    ddrStr		    "DDRT"
	    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		      SubSystem
      Name		      "Motor Power\nControl"
      Ports		      [2, 1]
      Position		      [550, 334, 650, 416]
      TreatAsAtomicUnit	      off
      System {
	Name			"Motor Power\nControl"
	Location		[217, 336, 796, 652]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"A4"
	PaperUnits		"centimeters"
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Left Motor\nInstruction"
	  Position		  [105, 62, 135, 78]
	  BackgroundColor	  "orange"
	}
	Block {
	  BlockType		  Inport
	  Name			  "Right Motor \nInstruction"
	  Position		  [105, 232, 135, 248]
	  BackgroundColor	  "orange"
	  Port			  "2"
	}
	Block {
	  BlockType		  Ground
	  Name			  "Ground"
	  Position		  [160, 145, 180, 165]
	}
	Block {
	  BlockType		  Display
	  Name			  "Left Motor Pulse"
	  Ports			  [1]
	  Position		  [190, 16, 280, 44]
	  Decimation		  "1"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator"
	  Position		  [235, 152, 265, 183]
	  ShowName		  off
	  Operator		  "~="
	  InputSameDT		  off
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator2"
	  Position		  [235, 107, 265, 138]
	  ShowName		  off
	  Operator		  "~="
	  InputSameDT		  off
	}
	Block {
	  BlockType		  Display
	  Name			  "Right Motor Pulse"
	  Ports			  [1]
	  Position		  [185, 261, 275, 289]
	  Decimation		  "1"
	}
	Block {
	  BlockType		  Display
	  Name			  "True=1, False=0"
	  Ports			  [1]
	  Position		  [335, 261, 425, 289]
	  Decimation		  "1"
	}
	Block {
	  BlockType		  Display
	  Name			  "True=1; False=0"
	  Ports			  [1]
	  Position		  [335, 16, 425, 44]
	  Decimation		  "1"
	}
	Block {
	  BlockType		  Logic
	  Name			  "switch off \nmotors in \nidle state\n(low a"
"ctive)"
	  Ports			  [2, 1]
	  Position		  [330, 132, 360, 163]
	  Operator		  "NOR"
	  AllPortsSameDT	  off
	}
	Block {
	  BlockType		  Outport
	  Name			  "Motor Control\nBit"
	  Position		  [510, 143, 540, 157]
	  BackgroundColor	  "orange"
	}
	Line {
	  SrcBlock		  "Right Motor \nInstruction"
	  SrcPort		  1
	  Points		  [0, 0; 25, 0]
	  Branch {
	    Points		    [50, 0; 0, -80]
	    DstBlock		    "Relational\nOperator"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 35]
	    DstBlock		    "Right Motor Pulse"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Left Motor\nInstruction"
	  SrcPort		  1
	  Points		  [0, 0; 25, 0]
	  Branch {
	    Points		    [50, 0; 0, 45]
	    DstBlock		    "Relational\nOperator2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -40]
	    DstBlock		    "Left Motor Pulse"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Ground"
	  SrcPort		  1
	  Points		  [0, 0; 15, 0]
	  Branch {
	    Points		    [0, -25]
	    DstBlock		    "Relational\nOperator2"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, 20]
	    DstBlock		    "Relational\nOperator"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Relational\nOperator2"
	  SrcPort		  1
	  Points		  [15, 0; 0, 15; 10, 0]
	  Branch {
	    DstBlock		    "switch off \nmotors in \nidle state\n(low"
" active)"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -110]
	    DstBlock		    "True=1; False=0"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Relational\nOperator"
	  SrcPort		  1

⌨️ 快捷键说明

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