📄 c2407pwmtest.mdl
字号:
SrcPort 1
Points [55, 0; 0, 35]
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [160, 0; 0, -35]
DstBlock "Add"
DstPort 2
}
Line {
SrcBlock "Add"
SrcPort 1
DstBlock "Period"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Pulse Width\nSource"
Position [55, 150, 95, 190]
Value "8000"
OutDataTypeMode "uint16"
ConRadixGroup "Best Precision: Vector-wise"
OutScaling "2^-10"
}
Block {
BlockType SubSystem
Name "Subsystem"
Ports [2, 1]
Position [355, 160, 420, 220]
ForegroundColor "gray"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Subsystem"
Location [500, 515, 856, 740]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "usletter"
PaperUnits "inches"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Period"
Position [30, 20, 60, 35]
Orientation "down"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Width"
Position [29, 190, 61, 205]
Orientation "up"
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [2, 1]
Position [65, 117, 95, 148]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Divide"
Ports [2, 1]
Position [150, 80, 190, 120]
Inputs "/*"
InputSameDT off
OutDataTypeMode "single"
OutScaling "2^-10"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Gain
Name "Gain2"
Position [235, 80, 265, 120]
Gain "100"
ParameterScaling "2^-15"
OutScaling "2^-10"
}
Block {
BlockType Outport
Name "Duty\nCycle"
Position [310, 93, 340, 107]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Period"
SrcPort 1
Points [0, 0; 0, 50]
Branch {
DstBlock "Divide"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Add"
DstPort 1
}
}
Line {
SrcBlock "Divide"
SrcPort 1
DstBlock "Gain2"
DstPort 1
}
Line {
SrcBlock "Gain2"
SrcPort 1
DstBlock "Duty\nCycle"
DstPort 1
}
Line {
SrcBlock "Add"
SrcPort 1
Points [35, 0]
DstBlock "Divide"
DstPort 2
}
Line {
SrcBlock "Width"
SrcPort 1
Points [0, -45]
DstBlock "Add"
DstPort 2
}
}
}
Block {
BlockType Scope
Name "Width"
Ports [1]
Position [270, 179, 300, 211]
ForegroundColor "gray"
Floating off
Location [53, 516, 320, 679]
Open off
NumInputPorts "1"
List {
ListType AxesTitles
axes1 "%<SignalLabel>"
}
YMin "0"
YMax "16000"
SaveName "ScopeData1"
DataFormat "StructureWithTime"
SampleTime "0"
}
Line {
SrcBlock "Subsystem"
SrcPort 1
DstBlock "Duty Cycle\n(%)"
DstPort 1
}
Line {
SrcBlock "Pulse Period\nSource"
SrcPort 1
Points [25, 0; 0, 30; 40, 0]
Branch {
Points [0, 80]
DstBlock "Period"
DstPort 1
}
Branch {
Points [165, 0]
Branch {
DstBlock "C24x PWM"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Subsystem"
DstPort 1
}
}
}
Line {
SrcBlock "Pulse Width\nSource"
SrcPort 1
Points [25, 0; 0, -30; 120, 0]
Branch {
Points [0, 55]
DstBlock "Width"
DstPort 1
}
Branch {
Points [70, 0]
Branch {
DstBlock "C24x PWM"
DstPort 2
}
Branch {
Points [0, 65]
DstBlock "Subsystem"
DstPort 2
}
}
}
Annotation {
Name "PWM Duty Cycle Control via Period Change"
Position [339, 34]
UseDisplayTextAsClickCallback off
FontName "Arial Narrow"
FontSize 22
FontWeight "bold"
}
}
}
MatData {
NumRecords 2
DataRecord {
Tag DataTag1
Data " %)30 . @)4 8 ( @ % "
"\"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P86-E "
" . < $ 8 ( @ % \" $ ! 0 "
"% 0 # $ P 8W)E871E2&5A< :&5A<%-I>F4 9&5F:6YE3&%B96P :&5A<$QA"
"8F5L #@ #@ & \" 8 !0 @ ! 0 $ \"0 "
" @ X X !@ @ & 4 ( 0 $ ! "
" D ( <$ . . 8 ( !@ % \" $ !"
" 0 ) \" #@ $ & \" 0 !0 @"
" ! # $ $ P !S96=M96YT7VYA;64 #@ #@ & \" "
" 8 !0 @ ! 0 $ \"0 @ X X "
" !@ @ & 4 ( 0 $ ! D ( ."
" . 8 ( ! % \" $ ' 0 0 !P %9%"
"0U1/4E, #@ #@ & \" 8 !0 @ ! 0 $ \"0 "
" @ X X !@ @ & 4 ( 0 $ ! "
" D ( 4$ . , 8 ( ! % \" $ $"
" 0 0 0 0V]D90X X !@ @ $ 4 ( 0 @ "
" ! ! ( 26YT97)N86P. < $ 8 ( @ % \" "
" $ ! 0 % 0 # $ P 8W)E871E2&5A< :&5A<%-I>F4 9&"
"5F:6YE3&%B96P :&5A<$QA8F5L #@ #@ & \" 8 !0 @ ! "
" 0 $ \"0 @ X X !@ @ & 4 "
" ( 0 $ ! D ( <$ . . 8 ( !@ "
" % \" $ ! 0 ) \" #@ $ & \""
" 0 !0 @ ! # $ $ P !S96=M96YT7VYA;64 "
" #@ #@ & \" 8 !0 @ ! 0 $ \"0 @ "
" X X !@ @ & 4 ( 0 $ ! "
"D ( . . 8 ( ! % \" $ ' 0"
" 0 !P %-!4D%-7U #@ #@ & \" 8 !0 @ ! "
" 0 $ \"0 @ #@0 X X !@ @ & 4 "
" ( 0 $ ! D ( F$ . , 8 ( ! "
" % \" $ $ 0 0 0 0V]D90X X !@ @ $ "
" 4 ( 0 @ ! ! ( 26YT97)N86P. < $ 8 ( "
" @ % \" $ ! 0 % 0 # $ P 8W)E871E2&5A"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -