Model { Name "Model205_sv1" Version 7.1 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.168" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions on ShowPortDataTypes off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off Created "Mon Jul 31 20:59:39 2000" Creator "student" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "student" ModifiedDateFormat "%" LastModifiedDate "Wed Aug 05 12:12:45 2009" RTWModifiedTimeStamp 0 ModelVersionFormat "1.%" ConfigurationManager "None" SimulationMode "external" LinearizationMsg "none" Profile off ParamWorkspaceSource "MATLABWorkspace" AccelSystemTargetFile "accel.tlc" AccelTemplateMakefile "accel_default_tmf" AccelMakeCommand "make_rtw" TryForcingSFcnDF off RecordCoverage off CovPath "/" CovSaveName "covdata" CovMetricSettings "dw" CovNameIncrementing off CovHtmlReporting on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" ExtModeBatchMode off ExtModeEnableFloating on ExtModeTrigType "manual" ExtModeTrigMode "normal" ExtModeTrigPort "1" ExtModeTrigElement "any" ExtModeTrigDuration 10000 ExtModeTrigDurationFloating "auto" ExtModeTrigHoldOff 0 ExtModeTrigDelay 0 ExtModeTrigDirection "rising" ExtModeTrigLevel 0 ExtModeArchiveMode "off" ExtModeAutoIncOneShot off ExtModeIncDirWhenArm off ExtModeAddSuffixToVar off ExtModeWriteAllDataToWs off ExtModeArmWhenConnect on ExtModeSkipDownloadWhenConnect off ExtModeLogAll on ExtModeAutoUpdateStatusClock on BufferReuse on ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.4.0" Array { Type "Handle" Dimension 7 Simulink.SolverCC { $ObjectID 2 Version "1.4.0" StartTime "0.0" StopTime "Tf" AbsTol "auto" FixedStep "0.001" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ZcThreshold "auto" ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "Auto" Solver "ode1" SolverName "ode1" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Non-adaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 3 Version "1.4.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "10000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput on SaveState off SignalLogging on InspectSignalLogs off SaveTime on StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "sigsOut" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Array { Type "Cell" Dimension 5 Cell "ZeroExternalMemoryAtStartup" Cell "ZeroInternalMemoryAtStartup" Cell "InitFltsAndDblsToZero" Cell "OptimizeModelRefInitCode" Cell "NoFixptDivByZeroProtection" PropName "DisabledProps" } Version "1.4.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off EnforceIntegerDowncast on ExpressionFolding on ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode off LifeSpan "inf" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off } Simulink.DebuggingCC { $ObjectID 5 Version "1.4.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "none" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" SolverPrmCheckMsg "none" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "warning" MultiTaskCondExecSysMsg "none" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "warning" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" ModelReferenceSimTargetVerbose off UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" StrictBusMsg "None" LoggingUnavailableSignals "error" BlockIODiagnostic "none" } Simulink.HardwareCC { $ObjectID 6 Version "1.4.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "LittleEndian" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "MATLAB Host" TargetUnknown off ProdEqTarget off } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.4.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferenceSigSizeVariationType "Always allowed" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Array { Type "Cell" Dimension 6 Cell "IncludeHyperlinkInReport" Cell "GenerateTraceInfo" Cell "GenerateTraceReport" Cell "GenerateTraceReportSl" Cell "GenerateTraceReportSf" Cell "GenerateTraceReportEml" PropName "DisabledProps" } Version "1.4.0" SystemTargetFile "rtwin.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "rtwin.tmf" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "rtwin_make_rtw_hook" ConfigAtBuild off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime on GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off RTWCompilerOptimization "Off" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Array { Type "Cell" Dimension 16 Cell "IgnoreCustomStorageClasses" Cell "InsertBlockDesc" Cell "SFDataObjDesc" Cell "SimulinkDataObjDesc" Cell "DefineNamingRule" Cell "SignalNamingRule" Cell "ParamNamingRule" Cell "InlinedPrmAccess" Cell "CustomSymbolStr" Cell "CustomSymbolStrGlobalVar" Cell "CustomSymbolStrType" Cell "CustomSymbolStrField" Cell "CustomSymbolStrFcn" Cell "CustomSymbolStrBlkIO" Cell "CustomSymbolStrTmpVar" Cell "CustomSymbolStrMacro" PropName "DisabledProps" } Version "1.4.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses on IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off SimulinkBlockComments on EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off } RTW.RTWinTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Array { Type "Cell" Dimension 16 Cell "IncludeMdlTerminateFcn" Cell "CombineOutputUpdateFcns" Cell "SuppressErrorStatus" Cell "ERTCustomFileBanners" Cell "GenerateSampleERTMain" Cell "GenerateTestInterfaces" Cell "ModelStepFunctionPrototypeControlCompliant" Cell "CPPClassGenCompliant" Cell "MultiInstanceERTCode" Cell "PurelyIntegerCode" Cell "SupportNonFinite" Cell "SupportComplex" Cell "SupportAbsoluteTime" Cell "SupportContinuousTime" Cell "SupportNonInlinedSFcns" Cell "PortableWordSizes" PropName "DisabledProps" } Version "1.4.0" TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn on CombineOutputUpdateFcns off SuppressErrorStatus off ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners off SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime on SupportNonInlinedSFcns on EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off AutosarCompliant off CCOptimize on CCListing off RebuildAll off ExtMode on ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "rtwinext" ExtModeIntrfLevel "Level1" } PropName "Components" } } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 " CurrentDlgPage "Solver" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Clock DisplayTime off } Block { BlockType Demux Outputs "4" DisplayOption "none" BusSelectionMode off } Block { BlockType Derivative LinearizePole "inf" } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParameterDataTypeMode "Same as input" ParameterDataType "fixdt(1,16,0)" ParameterScalingMode "Best Precision: Matrix-wise" ParameterScaling "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" SignalType "auto" SamplingMode "auto" LatchByDelayingOutsideSignal off LatchByCopyingInsideSignal off Interpolate on } Block { BlockType Mux Inputs "4" DisplayOption "none" UseBusObject off BusObject "BusObject" NonVirtualBus off } Block { BlockType Outport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" OutMin "[]" OutMax "[]" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: auto" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" SFunctionDeploymentMode off } Block { BlockType Step Time "1" Before "0" After "1" SampleTime "-1" VectorParams1D on ZeroCross on } Block { BlockType SubSystem ShowPortLabels "FromPortIcon" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType ToWorkspace VariableName "simulink_output" MaxDataPoints "1000" Decimation "1" SampleTime "0" FixptAsFi off } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "fixdt(1,16,0)" ConRadixGroup "Use specified scaling" OutScaling "[]" OutDataTypeStr "Inherit: Inherit from 'Constant value'" SampleTime "inf" FramePeriod "inf" } Block { BlockType Saturate UpperLimit "0.5" LowerLimit "-0.5" LinearizeAsGain on ZeroCross on SampleTime "-1" OutMin "[]" OutMax "[]" OutDataTypeMode "Same as input" OutDataType "fixdt(1,16,0)" OutScaling "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" UseDisplayTextAsClickCallback off } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "Model205_sv1" Location [467, 113, 1193, 424] Open on 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" ReportName "simulink-default.rpt" Block { BlockType Gain Name "C" Position [355, 185, 385, 215] Gain "C" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Clock Name "Clock" Position [65, 20, 85, 40] Decimation "1" } Block { BlockType Demux Name "Demux" Ports [1, 2] Position [365, 101, 370, 139] BackgroundColor "black" ShowName off Outputs "2" } Block { BlockType SubSystem Name "ECP Model 205" Ports [1, 1] Position [190, 99, 290, 141] BackgroundColor "yellow" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "ECP Model 205" Location [174, 144, 833, 608] 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 "u" Position [60, 213, 90, 227] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Constant Name "Dac2 Value" Position [180, 260, 210, 290] BackgroundColor "cyan" DropShadow on Value "0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType SubSystem Name "Manipulate Data" Ports [1, 1] Position [445, 224, 545, 266] ForegroundColor "red" BackgroundColor "green" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Manipulate Data" Location [476, 151, 1141, 408] 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 "In1" Position [15, 103, 45, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Derivative Name "Derivative" Position [280, 70, 310, 100] } Block { BlockType Derivative Name "Derivative2" Position [320, 180, 350, 210] } Block { BlockType Mux Name "Mux1" Ports [4, 1] Position [425, 96, 430, 134] ShowName off Inputs "[3 3 1 1]" DisplayOption "bar" } Block { BlockType Gain Name "get \ndesired\nstates" Position [535, 100, 565, 130] Gain "get_desired_states" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Gain Name "get all \nstates" Position [475, 100, 505, 130] Gain "get_all_states" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Gain Name "get angles" Position [145, 140, 175, 170] Gain "get_angles" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Gain Name "get positions" Position [100, 35, 130, 65] Gain "get_positions" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Gain Name "scale1" Position [160, 35, 190, 65] Gain "1/(32*2546)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Gain Name "scale2" Position [205, 140, 235, 170] Gain "1/(32*2608)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "Out1" Position [610, 108, 640, 122] IconDisplay "Port number" } Line { SrcBlock "get positions" SrcPort 1 DstBlock "scale1" DstPort 1 } Line { SrcBlock "get angles" SrcPort 1 DstBlock "scale2" DstPort 1 } Line { SrcBlock "scale2" SrcPort 1 Points [0, 0; 25, 0] Branch { Points [0, 40] DstBlock "Derivative2" DstPort 1 } Branch { Points [70, 0; 0, -35] DstBlock "Mux1" DstPort 3 } } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "get all \nstates" DstPort 1 } Line { SrcBlock "get all \nstates" SrcPort 1 DstBlock "get \ndesired\nstates" DstPort 1 } Line { SrcBlock "get \ndesired\nstates" SrcPort 1 DstBlock "Out1" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 Points [0, 0; 25, 0] Branch { Points [0, -60] DstBlock "get positions" DstPort 1 } Branch { Points [0, 45] DstBlock "get angles" DstPort 1 } } Line { SrcBlock "scale1" SrcPort 1 Points [0, 0; 45, 0] Branch { Points [0, 35] DstBlock "Derivative" DstPort 1 } Branch { Points [135, 0; 0, 50] DstBlock "Mux1" DstPort 1 } } Line { SrcBlock "Derivative" SrcPort 1 Points [15, 0; 0, 25] DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Derivative2" SrcPort 1 Points [25, 0; 0, -65] DstBlock "Mux1" DstPort 4 } } } Block { BlockType Mux Name "Mux" Ports [2, 1] Position [255, 226, 260, 264] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Saturate Name "Saturation" Position [180, 205, 210, 235] UpperLimit "32000" LowerLimit "-32000" } Block { BlockType SubSystem Name "Subsystem" Ports [1, 1] Position [285, 199, 420, 291] BackgroundColor "lightBlue" MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off MaskPromptString "Base I/O Address|Sample Time (Sec)|Timeout Period (500 ~ 2000)|Hardware Access" MaskStyleString "edit,edit,edit,checkbox" MaskTunableValueString "on,on,on,on" MaskCallbackString "|||" MaskEnableString "on,on,on,on" MaskVisibilityString "on,on,on,on" MaskToolTipString "on,on,on,on" MaskVarAliasString ",,," MaskVariables "BaseAddr=@1;STime=@2;TimeOutPer=@3;HWAccess=@4;" MaskDisplay "color('black');disp('ECPDSP Driver\\n upto\\n 4 Encs(ADC Channels)\\n and 2 Dacs')\n\n" MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" MaskValueString "'0xB400'|0.001|500|on" MaskTabNameString ",,," System { Name "Subsystem" Location [414, 408, 789, 552] 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 "In1" Position [320, 43, 350, 57] Orientation "left" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType "S-Function" Name "S-Function" Ports [1, 1] Position [140, 30, 225, 70] Orientation "left" FunctionName "ECPDSPDriver" Parameters "BaseAddr,STime,TimeOutPer,HWAccess" EnableBusSupport off MaskIconFrame on MaskIconOpaque on MaskIconRotate "none" MaskIconUnits "autoscale" } Block { BlockType Outport Name "Out1" Position [15, 43, 45, 57] Orientation "left" IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Line { SrcBlock "S-Function" SrcPort 1 DstBlock "Out1" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 DstBlock "S-Function" DstPort 1 } } } Block { BlockType Gain Name "scale" Position [130, 205, 160, 235] Gain "32*2546" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Outport Name "states\n" Position [575, 240, 605, 250] IconDisplay "Port number" } Line { SrcBlock "Saturation" SrcPort 1 Points [0, 10; 25, 0] DstBlock "Mux" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Subsystem" DstPort 1 } Line { SrcBlock "Dac2 Value" SrcPort 1 Points [15, 0; 0, -20] DstBlock "Mux" DstPort 2 } Line { SrcBlock "scale" SrcPort 1 DstBlock "Saturation" DstPort 1 } Line { SrcBlock "Subsystem" SrcPort 1 DstBlock "Manipulate Data" DstPort 1 } Line { SrcBlock "u" SrcPort 1 DstBlock "scale" DstPort 1 } Line { SrcBlock "Manipulate Data" SrcPort 1 DstBlock "states\n" DstPort 1 } } } Block { BlockType Gain Name "Gpf" Position [85, 105, 115, 135] Gain "Gpf" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Step Name "Input" Position [20, 105, 50, 135] Time "0" After "Amp" SampleTime "0" } Block { BlockType Gain Name "K" Position [250, 185, 280, 215] Orientation "left" Gain "K" Multiplication "Matrix(K*u)" ParameterDataType "sfix(16)" ParameterScaling "2^0" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [145, 110, 165, 130] ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" OutDataTypeStr "Inherit: Inherit via internal rule" } Block { BlockType ToWorkspace Name "To Workspace" Position [415, 185, 475, 215] VariableName "y" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace2" Position [115, 15, 175, 45] VariableName "time" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace4" Position [440, 20, 500, 50] VariableName "x1" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Block { BlockType ToWorkspace Name "To Workspace5" Position [445, 100, 505, 130] VariableName "x1_dot" MaxDataPoints "inf" SampleTime "-1" SaveFormat "Array" } Line { SrcBlock "ECP Model 205" SrcPort 1 Points [25, 0] Branch { DstBlock "Demux" DstPort 1 } Branch { Points [0, 80] Branch { DstBlock "K" DstPort 1 } Branch { DstBlock "C" DstPort 1 } } } Line { SrcBlock "Clock" SrcPort 1 DstBlock "To Workspace2" DstPort 1 } Line { SrcBlock "Input" SrcPort 1 DstBlock "Gpf" DstPort 1 } Line { SrcBlock "C" SrcPort 1 DstBlock "To Workspace" DstPort 1 } Line { SrcBlock "Demux" SrcPort 1 Points [20, 0; 0, -75] DstBlock "To Workspace4" DstPort 1 } Line { SrcBlock "Demux" SrcPort 2 Points [25, 0; 0, -15] DstBlock "To Workspace5" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "ECP Model 205" DstPort 1 } Line { SrcBlock "K" SrcPort 1 Points [-90, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Gpf" SrcPort 1 DstBlock "Sum" DstPort 1 } } }