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

📄 hierarchy_eitheredge2.mdl

📁 这是关于matlab stateflow的源码例子
💻 MDL
📖 第 1 页 / 共 2 页
字号:
	  DstBlock		  " Terminator "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in1"
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "in2"
	  SrcPort		  1
	  Points		  [120, 0]
	  DstBlock		  " SFunction "
	  DstPort		  2
	}
	Line {
	  SrcBlock		  " input events "
	  SrcPort		  1
	  DstBlock		  " SFunction "
	  DstPort		  3
	}
	Line {
	  SrcBlock		  " SFunction "
	  SrcPort		  2
	  DstBlock		  "out"
	  DstPort		  1
	}
      }
    }
    Line {
      SrcBlock		      "Switch"
      SrcPort		      1
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Gain"
      SrcPort		      1
      DstBlock		      "Switch"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Ramp"
      SrcPort		      1
      Points		      [25, 0]
      Branch {
	DstBlock		"Switch"
	DstPort			1
      }
      Branch {
	Points			[0, 35]
	DstBlock		"Gain"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [40, 0]
      DstBlock		      "Switch"
      DstPort		      trigger
    }
    Line {
      SrcBlock		      "Pulse\nGenerator"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Pulse\nGenerator1"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      1
    }
  }
}

# Finite State Machines
# -- File save dated 10-Mar-1999 08:47:37
#
#    Stateflow Version 2.0 (R11) dated Jan 21 1999, 19:12:04
#
#

Stateflow {

	machine {
		id         		1
		name       		"hierarchy_eitheredge2"
		created    		"21-Jan-1999 13:00:34"
		firstTarget		18
		sfVersion  		20011061
	}

	chart {
		id                     		2
		name                   		"Switch"
		windowPosition         		[294 236.25 343.5 307.5]
		viewLimits             		[0 300 0 271.5]
		screen                 		[1 1 1024 768 1.333333333333333]
		treeNode               		[0 3 0 0]
		firstTransition        		8
		visible                		1
		machine                		1
		decomposition          		CLUSTER_CHART
		firstEvent             		12
		firstData              		14
		chartFileNumber        		1
	}

	state {
		id             		3
		labelString    		"On"
		position       		[3.261918505942248 3.000000000000028 292.7380814940577 186.75]
		fontSize       		14
		arrowSize      		12
		chart          		2
		treeNode       		[2 4 0 6]
		firstTransition		7
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		4
		labelString    		"positive"
		position       		[42.88415808126544 60.75000000000011 90 60]
		fontSize       		14
		arrowSize      		12
		chart          		2
		treeNode       		[3 0 0 5]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		5
		labelString    		"negative"
		position       		[168.1264452059055 61.50000000000017 90 60]
		fontSize       		14
		arrowSize      		12
		chart          		2
		treeNode       		[3 0 4 0]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		6
		labelString    		"Shutdown"
		position       		[130.5265167657046 207.7500000000001 90 60]
		fontSize       		14
		arrowSize      		12
		chart          		2
		treeNode       		[2 0 3 0]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	transition {
		id           		7
		labelString  		"E/out=in2;"
		labelPosition		[119.9932194155685 8.824723091538019 65.25 18]
		fontSize     		14
		arrowSize    		12
		src {
			id          		4
			intersection		[1 0 -1 0.5666666666666667 93.88415808126544 60.75000000000011]
		}
		dst {
			id          		5
			intersection		[1 0 -1 0.3666666666666666 201.1264452059055 61.50000000000017]
		}
		midPoint     		[123.9675214716841 34.41726965659482]
		chart        		2
		linkNode     		[3 0 10]
		dataLimits   		[93.8841580812651 204.7264452059055 28.42294489262726 61.50000000000017]
	}

	transition {
		id           		8
		labelPosition		[27.99909837196885 189.6906012566384 9.75 18]
		fontSize     		14
		arrowSize    		12
		src {
			intersection		[0 0 0 0 14 211.5]
		}
		dst {
			id          		4
			intersection		[3 0 1 0.8209350897918383 59 120.7500000000001]
		}
		midPoint     		[33.20276156817621 184.1122016360935]
		chart        		2
		linkNode     		[2 0 9]
		dataLimits   		[14.00000000000001 62.6 120.7500000000001 211.4999999999999]
	}

	transition {
		id           		9
		labelString  		"S/out=in1;"
		labelPosition		[40.51460474294032 232.4214305070784 65.25 18]
		fontSize     		14
		arrowSize    		12
		src {
			id          		6
			intersection		[4 -1 0 0.462500000000001 130.5265167657046 240]
		}
		dst {
			id          		4
			intersection		[3 0 1 0.6792684231251716 71.75 120.7500000000001]
		}
		midPoint     		[94.47187522659642 220.5899839998711]
		chart        		2
		linkNode     		[2 8 11]
		dataLimits   		[68.15000000000001 130.5265167657047 120.7500000000001 239.9999999999999]
	}

	transition {
		id           		10
		labelString  		"E/out=in1;"
		labelPosition		[120.7944604619655 157.7066462260898 65.25 18]
		fontSize     		14
		arrowSize    		12
		src {
			id          		5
			intersection		[3 0 1 0.625 201.8764452059055 121.5000000000002]
		}
		dst {
			id          		4
			intersection		[3 0 1 0.4833333333333333 89.38415808126544 120.7500000000001]
		}
		midPoint     		[170.330168676272 149.0243819973095]
		chart        		2
		linkNode     		[3 7 0]
		dataLimits   		[85.78415808126545 201.8764452059051 120.7500000000001 155.1792731662117]
	}

	transition {
		id           		11
		labelString  		"S/out=0;"
		labelPosition		[245.696950967866 213.7618998964495 54.75 18]
		fontSize     		14
		arrowSize    		12
		src {
			id          		3
			intersection		[3 0 1 0.1870272556292316 241.25 189.75]
		}
		dst {
			id          		6
			intersection		[2 1 0 0.4874999999999991 220.5265167657046 237]
		}
		midPoint     		[243.3687654793696 208.4821756073388]
		chart        		2
		linkNode     		[2 9 0]
		dataLimits   		[220.5265167657046 243.6131867442227 189.75 240.6]
	}

	event {
		id         		12
		name       		"E"
		linkNode   		[2 0 13]
		scope      		INPUT_EVENT
		trigger    		EITHER_EDGE_EVENT
		machine    		1
	}

	event {
		id         		13
		name       		"S"
		linkNode   		[2 12 0]
		scope      		INPUT_EVENT
		trigger    		EITHER_EDGE_EVENT
		machine    		1
	}

	data {
		id         		14
		name       		"out"
		linkNode   		[2 0 15]
		scope      		OUTPUT_DATA
		machine    		1
		dataType   		"double"
	}

	data {
		id         		15
		name       		"in1"
		linkNode   		[2 14 16]
		scope      		INPUT_DATA
		machine    		1
		dataType   		"double"
	}

	data {
		id         		16
		name       		"in2"
		linkNode   		[2 15 0]
		scope      		INPUT_DATA
		machine    		1
		dataType   		"double"
	}

	instance {
		id     		17
		name   		"Switch"
		machine		1
		chart  		2
	}

	target {
		id               		18
		name             		"sfun"
		description      		"Default Simulink S-Function Target."
		machine          		1
		linkNode         		[1 0 0]
	}
}

⌨️ 快捷键说明

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