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

📄 hierarchy_risingedge2.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 26-Jan-1999 14:07:39
#
#    Stateflow Version 2.0 (R11) dated Jan 21 1999, 19:12:04
#
#

Stateflow {

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

	chart {
		id                     		2
		name                   		"Switch"
		windowPosition         		[18.75 42 343.5 307.5]
		viewLimits             		[0 300 0 271.5]
		screen                 		[1 1 1024 768 1.333333333333333]
		treeNode               		[0 3 0 0]
		firstTransition        		8
		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.06558970097353 189.6253811697279 9.75 18]
		fontSize     		14
		arrowSize    		12
		src {
			intersection		[0 0 0 0 14 211.5]
		}
		dst {
			id          		4
			intersection		[3 0 1 0.8542684231251716 56 120.7500000000001]
		}
		midPoint     		[31.92257746363113 184.0098956174103]
		chart        		2
		linkNode     		[2 0 9]
		dataLimits   		[14.0000000000001 59.6 120.7500000000001 211.4999999999999]
	}

	transition {
		id           		9
		labelString  		"S/out=in1;"
		labelPosition		[40.19519057831329 229.2410270208716 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.6459350897918382 74.75 120.7500000000001]
		}
		midPoint     		[95.50038159920386 220.4875062798957]
		chart        		2
		linkNode     		[2 8 11]
		dataLimits   		[71.15000000000001 130.5265167657042 120.7500000000001 240.0000000000001]
	}

	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    		RISING_EDGE_EVENT
		machine    		1
	}

	event {
		id         		13
		name       		"S"
		linkNode   		[2 12 0]
		scope      		INPUT_EVENT
		trigger    		RISING_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 + -