📄 nxtscara_controller.mdl
字号:
RTWStateStorageClass "Auto"
VectorParams1D on
DataType "single"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "real"
}
Block {
BlockType DataStoreMemory
Name "Data Store\nMemory7"
Position [355, 330, 425, 350]
ShowName off
AttributesFormatString "DataType = %<OutDataTypeStr>"
DataStoreName "timer_trj"
ReadBeforeWriteMsg "warning"
WriteAfterWriteMsg "warning"
WriteAfterReadMsg "warning"
RTWStateStorageClass "Auto"
VectorParams1D on
DataType "uint32"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "real"
}
Block {
BlockType DataStoreMemory
Name "Data Store\nMemory9"
Position [35, 385, 105, 405]
ShowName off
AttributesFormatString "DataType = %<OutDataTypeStr>"
DataStoreName "motor_number"
ReadBeforeWriteMsg "warning"
WriteAfterWriteMsg "warning"
WriteAfterReadMsg "warning"
RTWStateStorageClass "Auto"
VectorParams1D on
DataType "uint8"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "real"
}
Block {
BlockType SubSystem
Name "task_init"
Ports [0, 0, 0, 1]
Position [50, 144, 170, 188]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "task_init"
Location [181, 199, 632, 559]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType TriggerPort
Name "function"
Ports []
Position [30, 75, 50, 95]
ShowName off
TriggerType "function-call"
StatesWhenEnabling "held"
}
Block {
BlockType Constant
Name "Constant2"
Position [130, 165, 170, 185]
ShowName off
AttributesFormatString "DataType = %<OutDataTypeStr>"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
OutScaling "2^0"
SampleTime "-1"
}
Block {
BlockType Constant
Name "Constant3"
Position [130, 105, 170, 125]
ShowName off
AttributesFormatString "DataType = %<OutDataTypeStr>"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
OutScaling "2^0"
SampleTime "-1"
}
Block {
BlockType Constant
Name "Constant6"
Position [95, 290, 170, 310]
ShowName off
AttributesFormatString "DataType = %<OutDataTypeStr>"
Value "intmax('uint32')"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
OutScaling "2^0"
SampleTime "-1"
}
Block {
BlockType Constant
Name "Constant8"
Position [130, 225, 170, 245]
ShowName off
AttributesFormatString "DataType = %<OutDataTypeStr>"
Value "0"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
OutScaling "2^0"
SampleTime "-1"
}
Block {
BlockType DataStoreWrite
Name "Data Store\nWrite1"
Position [250, 165, 320, 185]
ShowName off
DataStoreName "motor_number"
SampleTime "-1"
}
Block {
BlockType DataStoreWrite
Name "Data Store\nWrite2"
Position [250, 105, 320, 125]
ShowName off
DataStoreName "operation_mode"
SampleTime "-1"
}
Block {
BlockType DataStoreWrite
Name "Data Store\nWrite6"
Position [250, 290, 320, 310]
ShowName off
DataStoreName "timer_trj"
SampleTime "-1"
}
Block {
BlockType DataStoreWrite
Name "Data Store\nWrite7"
Position [250, 225, 320, 245]
ShowName off
DataStoreName "pen_idx"
SampleTime "-1"
}
Line {
SrcBlock "Constant2"
SrcPort 1
DstBlock "Data Store\nWrite1"
DstPort 1
}
Line {
SrcBlock "Constant3"
SrcPort 1
DstBlock "Data Store\nWrite2"
DstPort 1
}
Line {
SrcBlock "Constant6"
SrcPort 1
DstBlock "Data Store\nWrite6"
DstPort 1
}
Line {
SrcBlock "Constant8"
SrcPort 1
DstBlock "Data Store\nWrite7"
DstPort 1
}
Annotation {
Name "Initialization Task"
Position [24, 22]
HorizontalAlignment "left"
FontName "Arial"
FontSize 16
FontWeight "bold"
}
Annotation {
Name "Set initial values and reset tracking timer."
Position [39, 42]
HorizontalAlignment "left"
FontName "Arial"
FontSize 12
FontWeight "bold"
}
}
}
Block {
BlockType SubSystem
Name "task_ts1"
Ports [0, 0, 0, 1]
Position [190, 144, 310, 188]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "task_ts1"
Location [249, 291, 834, 922]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType TriggerPort
Name "function"
Ports []
Position [30, 70, 50, 90]
ShowName off
TriggerType "function-call"
StatesWhenEnabling "held"
}
Block {
BlockType SubSystem
Name "Controller"
Ports [7, 3]
Position [295, 115, 395, 535]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
System {
Name "Controller"
Location [9, 260, 742, 764]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "theta1m"
Position [30, 198, 60, 212]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "theta2m"
Position [30, 223, 60, 237]
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "flag_touch1"
Position [30, 273, 60, 287]
Port "3"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "flag_touch2"
Position [30, 433, 60, 447]
Port "4"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "operation_mode"
Position [30, 123, 60, 137]
Port "5"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "motor_number"
Position [30, 398, 60, 412]
Port "6"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "system_clock"
Position [30, 248, 60, 262]
Port "7"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType SubSystem
Name "Adjustment_Mode"
Ports [3, 3, 0, 0, 0, 0, 0, 1]
Position [270, 350, 375, 460]
MinAlgLoopOccurrences off
RTWSystemCode "Inline"
FunctionWithSeparateData off
System {
Name "Adjustment_Mode"
Location [182, 217, 952, 846]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "flag_touch1"
Position [35, 243, 65, 257]
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "motor_number"
Position [35, 163, 65, 177]
Port "2"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType Inport
Name "flag_touch2"
Position [35, 288, 65, 302]
Port "3"
IconDisplay "Port number"
OutDataType "sfix(16)"
OutScaling "2^0"
}
Block {
BlockType ActionPort
Name "Action Port"
Position [25, 90, 72, 112]
ShowName off
ActionType "else"
}
Block {
BlockType From
Name "From"
Position [535, 230, 595, 250]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm1_1"
}
Block {
BlockType From
Name "From1"
Position [535, 260, 595, 280]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm1_2"
}
Block {
BlockType From
Name "From2"
Position [535, 290, 595, 310]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm1_3"
}
Block {
BlockType From
Name "From3"
Position [535, 370, 595, 390]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm2_1"
}
Block {
BlockType From
Name "From4"
Position [535, 400, 595, 420]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm2_2"
}
Block {
BlockType From
Name "From5"
Position [535, 430, 595, 450]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm2_3"
}
Block {
BlockType From
Name "From6"
Position [535, 510, 595, 530]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm3_1"
}
Block {
BlockType From
Name "From7"
Position [535, 540, 595, 560]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm3_2"
}
Block {
BlockType From
Name "From8"
Position [535, 570, 595, 590]
ShowName off
CloseFcn "tagdialog Close"
GotoTag "pwm3_3"
}
Block {
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -