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

📄 testbcirobot3f_sim.mdl

📁 simulink real-time workshop for dragon12 development board from
💻 MDL
📖 第 1 页 / 共 4 页
字号:
	Line {
	  SrcBlock		  "Data Type Conversion1"
	  SrcPort		  1
	  DstBlock		  "myDLatch_nonZero"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      From
      Name		      "From"
      Position		      [395, 308, 460, 322]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "mot_ctrl"
      Port {
	PortNumber		1
	Name			"motor ctrl"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      From
      Name		      "From1"
      Position		      [395, 248, 460, 262]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "pulse_right"
      Port {
	PortNumber		1
	Name			"pulse right"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      From
      Name		      "From3"
      Position		      [395, 208, 460, 222]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "command"
      Port {
	PortNumber		1
	Name			"command"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      From
      Name		      "From4"
      Position		      [395, 228, 460, 242]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "pulse_left"
      Port {
	PortNumber		1
	Name			"pulse left"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      From
      Name		      "From5"
      Position		      [395, 268, 460, 282]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "dir_left"
      Port {
	PortNumber		1
	Name			"dir left"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      From
      Name		      "From6"
      Position		      [395, 288, 460, 302]
      BackgroundColor	      "red"
      ShowName		      off
      CloseFcn		      "tagdialog Close"
      GotoTag		      "dir_right"
      Port {
	PortNumber		1
	Name			"dir right"
	TestPoint		off
	LinearAnalysisOutput	off
	LinearAnalysisInput	off
	RTWStorageClass		"Auto"
	DataLogging		off
	DataLoggingNameMode	"SignalName"
	DataLoggingDecimateData	off
	DataLoggingDecimation	"2"
	DataLoggingLimitDataPoints off
	DataLoggingMaxPoints	"5000"
      }
    }
    Block {
      BlockType		      Goto
      Name		      "Goto"
      Position		      [585, 43, 650, 57]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "pulse_left"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto1"
      Position		      [585, 63, 650, 77]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "pulse_right"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto4"
      Position		      [585, 113, 650, 127]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "mot_ctrl"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto5"
      Position		      [210, 138, 275, 152]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "dir_left"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto6"
      Position		      [210, 223, 275, 237]
      BackgroundColor	      "red"
      ShowName		      off
      GotoTag		      "dir_right"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Logic
      Name		      "Logical\nOperator"
      Ports		      [1, 1]
      Position		      [425, 104, 455, 136]
      ShowName		      off
      Operator		      "NOT"
      AllPortsSameDT	      off
    }
    Block {
      BlockType		      Scope
      Name		      "Scope"
      Ports		      [6]
      Position		      [560, 204, 625, 326]
      Location		      [471, 155, 971, 660]
      Open		      off
      NumInputPorts	      "6"
      ZoomMode		      "xonly"
      List {
	ListType		AxesTitles
	axes1			"%<SignalLabel>"
	axes2			"%<SignalLabel>"
	axes3			"%<SignalLabel>"
	axes4			"%<SignalLabel>"
	axes5			"%<SignalLabel>"
	axes6			"%<SignalLabel>"
      }
      List {
	ListType		SelectedSignals
	axes1			""
	axes2			""
	axes3			""
	axes4			""
	axes5			""
	axes6			""
      }
      TimeRange		      "10"
      YMin		      "-1~-5~-5~-5~-5~-5"
      YMax		      "4~5~5~5~5~5"
      DataFormat	      "StructureWithTime"
      LimitDataPoints	      off
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator"
      Position		      [505, 60, 525, 80]
      ShowName		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "myGatedPulseTrain left"
      Ports		      [1, 2]
      Position		      [400, 39, 480, 81]
      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"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Relational\nOperator2"
	      SrcPort		      1
	      DstBlock		      "Switch"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Constant5"
	      SrcPort		      1
	      DstBlock		      "Relational\nOperator2"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  Saturate
	  Name			  "0 ... 1"
	  Position		  [700, 110, 730, 140]
	  UpperLimit		  "1"
	  LowerLimit		  "0"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [330, 55, 360, 85]
	  Orientation		  "left"
	  ShowName		  off
	  Value			  "0"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant5"
	  Position		  [380, 140, 430, 170]
	  ShowName		  off
	  Value			  "Ncount-1"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [2, 1]
	  Position		  [770, 117, 800, 148]
	  ShowName		  off
	  AllPortsSameDT	  off
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "Relational\nOperator"
	  Position		  [470, 97, 500, 128]
	  ShowName		  off
	  InputSameDT		  off
	  LogicOutDataTypeMode	  "Specify via dialog"
	}
	Block {
	  BlockType		  Scope
	  Name			  "Scope1"
	  Ports			  [3]
	  Position		  [860, 182, 905, 248]
	  Location		  [256, 383, 656, 652]
	  Open			  off
	  NumInputPorts		  "3"
	  ZoomMode		  "xonly"
	  List {
	    ListType		    AxesTitles
	    axes1		    "%<SignalLabel>"
	    axes2		    "%<SignalLabel>"
	    axes3		    "%<SignalLabel>"
	  }
	  YMin			  "-5~-5~-5"
	  YMax			  "5~5~5"
	  SaveName		  "ScopeData1"
	  DataFormat		  "StructureWithTime"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum"

⌨️ 快捷键说明

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