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

📄 parallel_hierarchy.mdl

📁 这是关于matlab stateflow的源码例子
💻 MDL
📖 第 1 页 / 共 2 页
字号:
      Points		      [10, 0; 0, 50]
      DstBlock		      "Mux"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Fwd/Rev"
      SrcPort		      1
      DstBlock		      "Mux"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Motor"
      SrcPort		      1
      Points		      [5, 0; 0, -65]
      DstBlock		      "Scope"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Product"
      SrcPort		      1
      DstBlock		      "Motor"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Mux"
      SrcPort		      1
      Points		      [5, 0; 0, -55; 55, 0]
      DstBlock		      "Chart"
      DstPort		      trigger
    }
    Line {
      SrcBlock		      "Chart"
      SrcPort		      1
      DstBlock		      "Product"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Chart"
      SrcPort		      2
      DstBlock		      "Product"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Constant2"
      SrcPort		      1
      DstBlock		      "Fwd/Rev"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Constant3"
      SrcPort		      1
      DstBlock		      "Fwd/Rev"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Constant4"
      SrcPort		      1
      DstBlock		      "on/off"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Constant5"
      SrcPort		      1
      DstBlock		      "on/off"
      DstPort		      2
    }
    Line {
      SrcBlock		      "on/off"
      SrcPort		      1
      Points		      [10, 0; 0, -55]
      DstBlock		      "Mux"
      DstPort		      3
    }
  }
}

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

Stateflow {

	machine {
		id         		1
		name       		"parallel_hierarchy"
		created    		"26-Jan-1999 15:08:24"
		firstTarget		26
		sfVersion  		20011061
	}

	chart {
		id                     		2
		name                   		"Chart"
		windowPosition         		[30.75 33 615 256.5]
		viewLimits             		[0 571.5 0 220.5]
		screen                 		[1 1 1024 768 1.333333333333333]
		treeNode               		[0 3 0 0]
		firstTransition        		13
		visible                		1
		machine                		1
		decomposition          		CLUSTER_CHART
		firstEvent             		20
		firstData              		23
		chartFileNumber        		1
	}

	state {
		id             		3
		labelString    		"On"
		position       		[64.25 3.75 500.2764370396982 191.25]
		fontSize       		14
		chart          		2
		treeNode       		[2 4 0 8]
		type           		OR_STATE
		decomposition  		SET_STATE
	}

	state {
		id             		4
		labelString    		"Speed"
		position       		[113.5423103553118 14.25000000000029 216.5946356079645 164.25]
		fontSize       		14
		chart          		2
		treeNode       		[3 6 0 5]
		firstTransition		12
		type           		AND_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		5
		labelString    		"Direction"
		position       		[334.9704700491262 15.00000000000037 216.5946356079645 164.25]
		fontSize       		14
		chart          		2
		treeNode       		[3 7 4 0]
		firstTransition		11
		type           		AND_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		6
		labelString    		"Slow"
		position       		[180.8624614978822 61.50000000000026 63.75355693021466 28.50000000000009]
		fontSize       		14
		chart          		2
		treeNode       		[4 0 0 9]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		7
		labelString    		"Fwd"
		position       		[411.9576658297423 62.25000000000034 63.75355693021466 28.50000000000009]
		fontSize       		14
		chart          		2
		treeNode       		[5 0 0 10]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		8
		labelString    		"Off"
		position       		[8.342974223100541 99.00000000000006 46.88247260643081 27.75000000000001]
		fontSize       		14
		chart          		2
		treeNode       		[2 0 3 0]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		9
		labelString    		"Fast"
		position       		[204.2285208444895 133.5000000000001 63.75355693021466 28.50000000000009]
		fontSize       		14
		chart          		2
		treeNode       		[4 0 6 0]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	state {
		id             		10
		labelString    		"Rev"
		position       		[435.3237251763497 134.2500000000002 63.75355693021466 28.50000000000009]
		fontSize       		14
		chart          		2
		treeNode       		[5 0 7 0]
		type           		OR_STATE
		decomposition  		CLUSTER_STATE
	}

	transition {
		id           		11
		labelString  		"{d=1;}"
		labelPosition		[437.4835550173643 22.19512537735884 39.10263157894737 18]
		fontSize     		14
		src {
			intersection		[0 0 0 0 430.6105150889168 29.25000000000003]
		}
		dst {
			id          		7
			intersection		[1 0 -1 0.4178427557666858 438.5966277473914 62.25000000000034]
		}
		midPoint     		[434.0184132497453 38.42280503522173]
		chart        		2
		linkNode     		[5 0 15]
		dataLimits   		[430.6105150889168 440.9966277473914 29.25000000000004 62.25000000000034]
	}

	transition {
		id           		12
		labelString  		"{pow=0.5;}"
		labelPosition		[199.813845983545 28.88387000768678 69.18157894736842 18]
		fontSize     		14
		src {
			intersection		[0 0 0 0 191.8580519130591 30]
		}
		dst {
			id          		6
			intersection		[1 0 -1 0.4178427557666858 207.5014234155314 61.50000000000026]
		}
		midPoint     		[198.5335170927119 38.43661595535508]
		chart        		2
		linkNode     		[4 0 14]
		dataLimits   		[191.8580519130591 209.9014234155314 30.00000000000001 61.50000000000026]
	}

	transition {
		id           		13
		labelPosition		[16.25360200207531 84.77277892809897 9.775657894736844 18]
		fontSize     		14
		src {
			intersection		[0 0 0 0 20 68.25]
		}
		dst {
			id          		8
			intersection		[1 0 -1 0.4086180764764467 27.5 99.00000000000006]
		}
		midPoint     		[23.2004602613627 76.64423318005646]
		chart        		2
		linkNode     		[2 0 16]
		dataLimits   		[19.99999999999999 29.9 68.25000000000001 99.00000000000006]
	}

	transition {
		id           		14
		labelString  		"T/\n"
						"pow=0.5;"
		labelPosition		[130.1028813544128 112.8949361001219 60.1578947368421 34.5]
		fontSize     		14
		src {
			id          		9
			intersection		[1 0 -1 0.2259739812790951 218.6351659247136 133.5000000000001]
		}
		dst {
			id          		6
			intersection		[4 -1 0 0.5000000000000074 180.8624614978822 75.7500000000001]
		}
		midPoint     		[153.3851659247137 101.25]
		chart        		2
		linkNode     		[4 12 17]
		dataLimits   		[153.2109713966929 218.6351659247135 73.35000000000009 133.5000000000001]
	}

	transition {
		id           		15
		labelString  		"T2/\n"
						"d=1;"
		labelPosition		[361.1980856862729 113.6449361001222 30.07894736842105 34.5]
		fontSize     		14
		src {
			id          		10
			intersection		[1 0 -1 0.2259739812790951 449.7303702565737 134.2500000000002]
		}
		dst {
			id          		7
			intersection		[4 -1 0 0.5000000000000074 411.9576658297423 76.50000000000017]
		}
		midPoint     		[384.4803702565737 102.0000000000001]
		chart        		2
		linkNode     		[5 11 18]
		dataLimits   		[384.3061757285529 449.7303702565737 74.10000000000017 134.2500000000002]
	}

	transition {
		id           		16
		labelString  		"F"
		labelPosition		[34.04876048060919 72.35049341281918 10.52763157894737 18]
		fontSize     		14
		src {
			id          		8
			intersection		[1 0 -1 0.670028915335355 39.75558649182688 99.00000000000006]
		}
		dst {
			id          		3
			intersection		[4 -1 0 0.611764705882353 64.25 78]
		}
		midPoint     		[41.8083072088603 88.3722778331382]
		chart        		2
		linkNode     		[2 13 19]
		dataLimits   		[39.75558649182685 64.25 75.59999999999999 98.99999999999999]
	}

	transition {
		id           		17
		labelString  		"T/\n"
						"pow=1;"
		labelPosition		[269.3817371912888 68.19907653570527 48.12631578947369 34.5]
		fontSize     		14
		src {
			id          		6
			intersection		[3 0 1 0.2310593041813774 229.8851659247136 90.00000000000036]
		}
		dst {
			id          		9
			intersection		[2 1 0 0.6052631578947355 267.9820777747042 150.7500000000001]
		}
		midPoint     		[277.8851659247136 123]
		chart        		2
		linkNode     		[4 14 0]
		dataLimits   		[229.8851659247136 282.1742827943234 90.0000000000004 153.1500000000001]
	}

	transition {
		id           		18
		labelString  		"T2/\n"
						"d=-1;"
		labelPosition		[500.4769415231491 68.94907653570539 34.59078947368421 34.5]
		fontSize     		14
		src {
			id          		7
			intersection		[3 0 1 0.2310593041813774 460.9803702565737 90.75000000000043]
		}
		dst {
			id          		10
			intersection		[2 1 0 0.6052631578947355 499.0772821065643 151.5000000000002]
		}
		midPoint     		[508.9803702565737 123.7500000000001]
		chart        		2
		linkNode     		[5 15 0]
		dataLimits   		[460.9803702565736 513.2694871261834 90.75000000000043 153.9000000000002]
	}

	transition {
		id           		19
		labelString  		"F/pow=0;"
		labelPosition		[3.861491183346594 144.7567261522832 60.90986842105263 18]
		fontSize     		14
		src {
			id          		3
			intersection		[4 -1 0 0.2666666666666667 64.25 144]
		}
		dst {
			id          		8
			intersection		[3 0 1 0.5946522039591936 27.34668116706075 126.7500000000001]
		}
		midPoint     		[47.93531573346066 144.6353669648351]
		chart        		2
		linkNode     		[2 16 0]
		dataLimits   		[24.94668116706075 64.24999999999986 126.7500000000001 144.6570378096078]
	}

	event {
		id         		20
		name       		"T"
		linkNode   		[2 0 21]
		scope      		INPUT_EVENT
		trigger    		EITHER_EDGE_EVENT
		machine    		1
	}

	event {
		id         		21
		name       		"T2"
		linkNode   		[2 20 22]
		scope      		INPUT_EVENT
		trigger    		EITHER_EDGE_EVENT
		machine    		1
	}

	event {
		id         		22
		name       		"F"
		linkNode   		[2 21 0]
		scope      		INPUT_EVENT
		trigger    		EITHER_EDGE_EVENT
		machine    		1
	}

	data {
		id         		23
		name       		"pow"
		linkNode   		[2 0 24]
		scope      		OUTPUT_DATA
		machine    		1
		dataType   		"double"
	}

	data {
		id         		24
		name       		"d"
		linkNode   		[2 23 0]
		scope      		OUTPUT_DATA
		machine    		1
		dataType   		"double"
	}

	instance {
		id     		25
		name   		"Chart"
		machine		1
		chart  		2
	}

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

⌨️ 快捷键说明

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