📄 scdlens_control.mdl
字号:
Name "Machine\nEnvironment"
Tag "Factory ground"
Ports [0, 0, 0, 0, 0, 0, 1]
Position [95, 50, 135, 70]
DialogController "MECH.DialogSource"
SourceBlock "mblibv1/Bodies/Machine\nEnvironment"
SourceType "Mechanical"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
PortType "env"
PhysicalDomain "Mechanical"
ClassName "Environment"
DialogTemplateClass "MECH.MachineEnvironment"
SyncWhenCopied "off"
Gravity "[0 -9.81 0]"
GravityUnits "m/s^2"
GravityAsSignal off
Dimensionality "Auto-detect"
AnalysisType "Forward dynamics"
LinearAssemblyTolerance "1e-3"
LinearAssemblyToleranceUnits "mm"
AngularAssemblyTolerance "1e-3"
AngularAssemblyToleranceUnits "deg"
ConstraintSolverType "Stabilizing"
ConstraintRelTolerance "1e-4"
ConstraintAbsTolerance "1e-4"
UseRobustSingularityHandling off
StatePerturbationType "Fixed"
PerturbationSize "1e-5"
VisualizeMachine on
}
Block {
BlockType Reference
Name "Mechanical\nBranching\nBar"
Ports [0, 0, 0, 0, 0, 1, 3]
Position [200, 129, 210, 311]
Orientation "left"
BackgroundColor "black"
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Utilities/Mechanical\nBranching\nBar"
SourceType "msb"
PhysicalDomain "mechanical"
SubClassName "Unknown"
LeftPortType "blob"
RightPortType "blob"
LConnTagsString "_newl0"
RConnTagsString "SA0|SA1|SA2"
ClassName "BranchingBar"
DialogClass "MechanicalBranchingBarBlock"
NumSAPorts "3"
}
Block {
BlockType SubSystem
Name "OPU system"
Ports [0, 0, 0, 0, 0, 1, 1]
Position [355, 18, 625, 262]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskDisplay "image(imread('translator_top.jpg','jpg'))\n"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "OPU system"
Location [113, 744, 683, 1083]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Reference
Name "Body with Lens"
Ports [0, 0, 0, 0, 0, 3, 3]
Position [150, 22, 425, 278]
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Bodies/Body"
SourceType "msb"
PhysicalDomain "mechanical"
SubClassName "Unknown"
LeftPortType "workingframe"
RightPortType "workingframe"
LConnTagsString "CS3|CS4|CS5"
RConnTagsString "CS1|CS2|CS6"
ClassName "Body"
DialogClass "MechanicalBodyBlock"
Mass "0.2"
MassUnits "g"
InertiaUnits "g*cm^2"
Inertia "[0 1 0 ; 1 0 0 ; 0 0 1]*[ 2 0 -0.5 ; 0 1.5 "
"0 ; -0.5 0 3 ]*[0 1 0 ; 1 0 0 ; 0 0 1]/100"
Shape "Cylinder"
ShapeDims "[1 1]"
ShapeUnits "m"
ShapeUse "false"
Density "1"
DensityUnits "kg/m^3"
DensityUse "false"
CG "Left$CG$[0.0 0.0 0.0 ]$WORLD$WORLD$mm$[0 0 "
"0]$Euler X-Y-Z$deg$WORLD$false"
WorkingFrames "Right$CS1$[5 0 1.5]$CS5$CS5$mm$[0 0 0]$Eule"
"r X-Y-Z$deg$WORLD$true#Right$CS2$[5 0 -1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$de"
"g$WORLD$true#Left$CS3$[-5 0 1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$tru"
"e#Left$CS4$[-5 0 -1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$true#Left$CS5"
"$[0 0 0]$WORLD$WORLD$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$true#Right$CS6$[0 .2 3]"
"$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$true#Right$CS7$[-4 -4 -1.5]$CS5$CS5"
"$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$false#Right$CS8$[-4 -4 1.5]$CS5$CS5$mm$[0 0"
" 0]$Euler X-Y-Z$deg$WORLD$false#Right$CS9$[-4 4 -1.5]$CS5$CS5$mm$[0 0 0]$Eule"
"r X-Y-Z$deg$WORLD$false#Right$CS10$[-4 4 1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$"
"deg$WORLD$false#Right$CS11$[4 -4 -1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WOR"
"LD$false#Right$CS12$[4 -4 1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$false"
"#Right$CS13$[4 4 -1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$false#Right$C"
"S14$[4 4 1.5]$CS5$CS5$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$false"
CGPos "[0.0 0.0 0.0 ]"
CGRot "[0 0 0]"
CS0Pos "[]"
CS0Rot "[]"
CS1Pos "[5 0 1.5]"
CS1Rot "[0 0 0]"
CS2Pos "[5 0 -1.5]"
CS2Rot "[0 0 0]"
CS3Pos "[-5 0 1.5]"
CS3Rot "[0 0 0]"
CS4Pos "[-5 0 -1.5]"
CS4Rot "[0 0 0]"
CS5Pos "[0 0 0]"
CS5Rot "[0 0 0]"
CS6Pos "[0 .2 3]"
CS6Rot "[0 0 0]"
CS7Pos "[-4 -4 -1.5]"
CS7Rot "[0 0 0]"
CS8Pos "[-4 -4 1.5]"
CS8Rot "[0 0 0]"
CS9Pos "[-4 4 -1.5]"
CS9Rot "[0 0 0]"
CS10Pos "[-4 4 1.5]"
CS10Rot "[0 0 0]"
CS11Pos "[4 -4 -1.5]"
CS11Rot "[0 0 0]"
CS12Pos "[4 -4 1.5]"
CS12Rot "[0 0 0]"
CS13Pos "[4 4 -1.5]"
CS13Rot "[0 0 0]"
CS14Pos "[4 4 1.5]"
CS14Rot "[0 0 0]"
CS15Pos "[]"
CS15Rot "[]"
CS16Pos "[]"
CS16Rot "[]"
CS17Pos "[]"
CS17Rot "[]"
CS18Pos "[]"
CS18Rot "[]"
CS19Pos "[]"
CS19Rot "[]"
CS20Pos "[]"
CS20Rot "[]"
}
Block {
BlockType SubSystem
Name "Wire 1"
Ports [0, 0, 0, 0, 0, 0, 1]
Position [470, 47, 550, 83]
Orientation "left"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Ground connection position [x,y,z]|Lens con"
"nection position [x,y,z]"
MaskStyleString "edit,edit"
MaskTunableValueString "on,on"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "g=@1;l=@2;"
MaskInitialization "f=(g(1)-l(1))/abs(g(2)-l(2));\nInertia=1e-3"
"*[cos(f) sin(f) 0 ; sin(f) .02*cos(f) 0 ; 0 0 1];\ncg=[l(1)+(g(1)-l(1))/2 l(2"
")+(g(2)-l(2))/2 l(3)+(g(3)-l(3))/2];\n"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "[6 -15 1.5]|[5 0 1.5]"
MaskTabNameString ","
System {
Name "Wire 1"
Location [50, 568, 527, 867]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Reference
Name "Body"
Ports [0, 0, 0, 0, 0, 1, 2]
Position [170, 165, 230, 205]
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Bodies/Body"
SourceType "msb"
PhysicalDomain "mechanical"
SubClassName "Unknown"
LeftPortType "workingframe"
RightPortType "workingframe"
LConnTagsString "CS1"
RConnTagsString "CS2|CS3"
ClassName "Body"
DialogClass "MechanicalBodyBlock"
Mass "10"
MassUnits "mg"
InertiaUnits "g*cm^2"
Inertia "Inertia"
Shape "Cylinder"
ShapeDims "[1 1]"
ShapeUnits "m"
ShapeUse "false"
Density "1"
DensityUnits "kg/m^3"
DensityUse "false"
CG "Left$CG$[cg(1) cg(2) cg(3)]$WORLD$WORLD"
"$mm$[0 0 0]$Euler X-Y-Z$deg$WORLD$false"
WorkingFrames "Left$CS1$[g(1) g(2) g(3)]$WORLD$WORLD$m"
"m$[0 0 0]$Euler X-Y-Z$deg$WORLD$true#Right$CS2$[0 0 0]$CS3$CS3$mm$[0 0 0]$Eul"
"er X-Y-Z$deg$WORLD$true#Right$CS3$[l(1) l(2) l(3)]$WORLD$WORLD$mm$[0 0 0]$Eul"
"er X-Y-Z$deg$WORLD$true"
CGPos "[cg(1) cg(2) cg(3)]"
CGRot "[0 0 0]"
CS0Pos "[]"
CS0Rot "[]"
CS1Pos "[g(1) g(2) g(3)]"
CS1Rot "[0 0 0]"
CS2Pos "[0 0 0]"
CS2Rot "[0 0 0]"
CS3Pos "[l(1) l(2) l(3)]"
CS3Rot "[0 0 0]"
CS4Pos "[]"
CS4Rot "[]"
CS5Pos "[]"
CS5Rot "[]"
CS6Pos "[]"
CS6Rot "[]"
CS7Pos "[]"
CS7Rot "[]"
CS8Pos "[]"
CS8Rot "[]"
CS9Pos "[]"
CS9Rot "[]"
CS10Pos "[]"
CS10Rot "[]"
CS11Pos "[]"
CS11Rot "[]"
CS12Pos "[]"
CS12Rot "[]"
CS13Pos "[]"
CS13Rot "[]"
CS14Pos "[]"
CS14Rot "[]"
CS15Pos "[]"
CS15Rot "[]"
CS16Pos "[]"
CS16Rot "[]"
CS17Pos "[]"
CS17Rot "[]"
CS18Pos "[]"
CS18Rot "[]"
CS19Pos "[]"
CS19Rot "[]"
CS20Pos "[]"
CS20Rot "[]"
}
Block {
BlockType Reference
Name "Bushing"
Ports [0, 0, 0, 0, 0, 2, 1]
Position [130, 57, 180, 108]
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Joints/Bushing"
SourceType "msb"
PhysicalDomain "mechanical"
SubClassName "Unknown"
LeftPortType "blob"
RightPortType "blob"
LConnTagsString "__newl0|SA1"
RConnTagsString "__newr0"
NumSAPorts "1"
CutJoint "off"
MarkAsCut "off"
Primitives "prismatic_prismatic_prismatic_revolute_"
"revolute_revolute"
PrimitiveProps "P1$WORLD$[1 0 0]$prismatic#P2$WORLD$[0 "
"1 0]$prismatic#P3$WORLD$[0 0 1]$prismatic#R1$WORLD$[1 0 0]$revolute#R2$WORLD$"
"[0 1 0]$revolute#R3$WORLD$[0 0 1]$revolute"
ClassName "Joint"
DialogClass "JointBlock"
P1Axis "[1 0 0]"
P2Axis "[0 1 0]"
P3Axis "[0 0 1]"
R1Axis "[1 0 0]"
R2Axis "[0 1 0]"
R3Axis "[0 0 1]"
}
Block {
BlockType Reference
Name "Flexure"
Ports [0, 0, 0, 0, 0, 1]
Position [25, 95, 85, 145]
Orientation "left"
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Force \nElements/Joint Spring &"
" Damper"
SourceType "msb"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
ClassName "JointSpringDamper"
DialogClass "JointSpringDamper"
JFEParameters "P1$true$20$.005$0$m$m/s$N$rad$rad/s$N-m"
"#P2$false$0$0$0$m$m/s$N$rad$rad/s$N-m#P3$true$20$.005$0$m$m/s$N$rad$rad/s$N-m"
"#R1$false$4$0$0$m$m/s$N$rad$rad/s$N-m#R2$true$6e-4$.000005$0$m$m/s$N$rad$rad/"
"s$N-m#R3$false$4$0$0$m$m/s$N$rad$rad/s$N-m#S$false$0$0$0$m$m/s$N$rad$rad/s$N-"
"m"
}
Block {
BlockType Reference
Name "Gimbal"
Ports [0, 0, 0, 0, 0, 1, 1]
Position [100, 160, 150, 210]
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Joints/Gimbal"
SourceType "msb"
PhysicalDomain "mechanical"
SubClassName "Unknown"
LeftPortType "blob"
RightPortType "blob"
LConnTagsString "__newl0"
RConnTagsString "__newr0"
NumSAPorts "0"
CutJoint "off"
MarkAsCut "off"
Primitives "revolute_revolute_revolute"
PrimitiveProps "R1$WORLD$[1 0 0]$revolute#R2$WORLD$[0 1"
" 0]$revolute#R3$WORLD$[0 0 1]$revolute"
ClassName "Joint"
DialogClass "JointBlock"
R1Axis "[1 0 0]"
R2Axis "[0 1 0]"
R3Axis "[0 0 1]"
}
Block {
BlockType SubSystem
Name "Gimbal\nplus stiffness"
Ports [0, 0, 0, 0, 0, 1, 1]
Position [265, 174, 325, 216]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Gimbal\nplus stiffness"
Location [360, 315, 825, 732]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[1.270000, 1.270000, 1.270000, 1.2700"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Reference
Name "Custom Joint"
Ports [0, 0, 0, 0, 0, 2, 2]
Position [210, 27, 260, 78]
DialogController "MECH.DynMechDlgSource"
SourceBlock "mblibv1/Joints/Custom Joint"
SourceType "msb"
PhysicalDomain "mechanical"
SubClassName "custom_joint"
LeftPortType "blob"
RightPortType "blob"
LConnTagsString "__newl0|SA1"
RConnTagsString "__newr0|SA1"
NumSAPorts "2"
CutJoint "off"
MarkAsCut "off"
Primitives "revolute_revolute_prismatic"
PrimitiveProps "R1$WORLD$[1 0 0]$revolute#R3$WORLD$"
"[0 0 1]$revolute#P1$WORLD$[0 1 0]$prismatic"
ClassName "Joint"
DialogClass "JointBlock"
R1Axis "[1 0 0]"
R2Axis "[]"
R3Axis "[0 0 1]"
P1Axis "[0 1 0]"
P2Axis "[]"
P3Axis "[]"
SAxis "[]"
}
Block {
BlockType Gain
Name "Damping"
Position [210, 258, 275, 292]
Orientation "left"
Gain "-1"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -