Model { Name "strainBasedMotorDrive_v3" Version 7.9 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.211" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" FPTRunName "Run 1" MaxMDLFileLineLength 120 Created "Wed Feb 17 08:16:34 2010" Creator "ij8977" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "ij8977" ModifiedDateFormat "%" LastModifiedDate "Fri Mar 29 10:01:50 2013" RTWModifiedTimeStamp 286451606 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions on ShowPortDataTypes on ShowDesignRanges off ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowSignalResolutionIcons on ShowViewerIcons on SortedOrder off ExecutionContextIcon off ShowLinearizationAnnotations on BlockNameDataTip off BlockParametersDataTip off BlockDescriptionStringDataTip off ToolBar on StatusBar on BrowserShowLibraryLinks off BrowserLookUnderMasks off SimulationMode "normal" 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 CovForceBlockReductionOff on covSaveCumulativeToWorkspaceVar on CovSaveSingleToWorkspaceVar on CovCumulativeVarName "covCumulativeData" CovCumulativeReport off CovReportOnPause on CovModelRefEnable "Off" CovExternalEMLEnable 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.12.0" Array { Type "Handle" Dimension 8 Simulink.SolverCC { $ObjectID 2 Version "1.12.0" StartTime "0.0" StopTime "inf" AbsTol "auto" FixedStep "1.25e-7" 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 "SingleTasking" EnableConcurrentExecution off ConcurrentTasks off Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" SolverJacobianMethodControl "auto" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder on AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 3 Version "1.12.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" SignalLoggingSaveFormat "ModelDataLogs" SaveOutput on SaveState off SignalLogging on DSMLogging on InspectSignalLogs off SaveTime on ReturnWorkspaceOutputs off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" DSMLoggingName "dsmout" OutputOption "RefineOutputTimes" OutputTimes "[]" ReturnWorkspaceOutputsName "out" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.12.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off UseIntDivNetSlope off UseFloatMulNetSlope off UseSpecifiedMinMax off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnhancedBackFolding off StrengthReduction off ExpressionFolding on BooleansAsBitfields off BitfieldContainerType "uint_T" EnableMemcpy on MemcpyThreshold 64 PassReuseOutputArgsAs "Structure reference" ExpressionDepthLimit 2147483647 FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero off NoFixptDivByZeroProtection off EfficientFloat2IntCast off EfficientMapNaN2IntZero on OptimizeModelRefInitCode on LifeSpan "Inf" MaxStackSize "Inherit from target" BufferReusableBoundary on SimCompilerOptimization "Off" AccelVerboseBuild off ParallelExecutionInRapidAccelerator on } Simulink.DebuggingCC { $ObjectID 5 Version "1.12.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" SignalRangeChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" SaveWithDisabledLinksMsg "warning" SaveWithParameterizedLinksMsg "warning" CheckSSInitialOutputMsg on UnderspecifiedInitializationDetection "Classic" MergeDetectMultiDrivingBlocksExec "none" CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "UseLocalSettings" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" MaskedZcDiagnostic "warning" IgnoredZcDiagnostic "warning" SolverPrmCheckMsg "warning" InheritedTsInSrcMsg "warning" DiscreteInheritContinuousMsg "warning" MultiTaskDSMMsg "error" MultiTaskCondExecSysMsg "error" MultiTaskRateTransMsg "error" SingleTaskRateTransMsg "none" TasksWithSamePriorityMsg "warning" SigSpecEnsureSampleTimeMsg "warning" CheckMatrixSingularityMsg "none" IntegerOverflowMsg "warning" Int32ToFloatConvMsg "warning" ParameterDowncastMsg "error" ParameterOverflowMsg "error" ParameterUnderflowMsg "none" ParameterPrecisionLossMsg "warning" ParameterTunabilityLossMsg "warning" FixptConstUnderflowMsg "none" FixptConstOverflowMsg "none" FixptConstPrecisionLossMsg "none" UnderSpecifiedDataTypeMsg "none" UnnecessaryDatatypeConvMsg "none" VectorMatrixConversionMsg "none" InvalidFcnCallConnMsg "error" FcnCallInpInsideContextMsg "Use local settings" SignalLabelMismatchMsg "none" UnconnectedInputMsg "warning" UnconnectedOutputMsg "warning" UnconnectedLineMsg "warning" SFcnCompatibilityMsg "none" FrameProcessingCompatibilityMsg "warning" UniqueDataStoreMsg "none" BusObjectLabelMismatch "warning" RootOutportRequireBusObject "warning" AssertControl "UseLocalSettings" EnableOverflowDetection off ModelReferenceIOMsg "none" ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error" ModelReferenceVersionMismatchMessage "none" ModelReferenceIOMismatchMessage "none" ModelReferenceCSMismatchMessage "none" UnknownTsInhSupMsg "warning" ModelReferenceDataLoggingMessage "warning" ModelReferenceSymbolNameMessage "warning" ModelReferenceExtraNoncontSigs "error" StateNameClashWarn "warning" SimStateInterfaceChecksumMismatchMsg "warning" SimStateOlderReleaseMsg "error" InitInArrayFormatMsg "warning" StrictBusMsg "Warning" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" LoggingUnavailableSignals "error" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" SFUnconditionalTransitionShadowingDiag "warning" } Simulink.HardwareCC { $ObjectID 6 Version "1.12.0" Array { Type "Cell" Dimension 2 Cell "ProdHWDeviceType" Cell "ProdEqTarget" PropName "DisabledProps" } ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 32 ProdBitPerLong 32 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 32 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Undefined" ProdEndianess "Unspecified" ProdWordSize 32 ProdShiftRightIntArith on ProdHWDeviceType "32-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetBitPerFloat 32 TargetBitPerDouble 64 TargetBitPerPointer 32 TargetLargestAtomicInteger "Char" TargetLargestAtomicFloat "None" TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "Specified" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.12.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" EnableParallelModelReferenceBuilds off ParallelModelReferenceErrorOnInvalidPool on ParallelModelReferenceMATLABWorkerInit "None" ModelReferenceNumInstancesAllowed "Multi" PropagateVarSize "Infer from blocks in model" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off PropagateSignalLabelsOutOfModel off SupportModelReferenceSimTargetCustomCode off } Simulink.SFSimCC { $ObjectID 8 Version "1.12.0" SFSimEnableDebug on SFSimOverflowDetection on SFSimEcho on SimBlas on SimCtrlC on SimExtrinsic on SimIntegrity on SimUseLocalCustomCode off SimParseCustomCode on SimBuildMode "sf_incremental_build" } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 9 Version "1.12.0" Array { Type "Cell" Dimension 1 Cell "TargetLang" PropName "DisabledProps" } SystemTargetFile "pic32.tlc" GenCodeOnly off MakeCommand "make_CreateMPLAB" GenerateMakefile on TemplateMakefile "pic32_gcc.tmf" PostCodeGenCommand "dsPIC_Compile()" Description "Embedded Target for Microchip dsPIC (real-time)" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "pic32_make_rtw_hook" ConfigAtBuild off RTWUseLocalCustomCode off RTWUseSimCustomCode off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off GenerateTraceInfo off GenerateTraceReport off GenerateTraceReportSl off GenerateTraceReportSf off GenerateTraceReportEml off GenerateCodeInfo off GenerateWebview off GenerateCodeMetricsReport off GenerateCodeReplacementReport off RTWCompilerOptimization "Off" CheckMdlBeforeBuild "Off" CustomRebuildMode "OnUpdate" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.12.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses off IgnoreTestpoints off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off MATLABFcnDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "$R$N$M" CustomSymbolStrType "$N$R$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$R$N$M$F" CustomSymbolStrFcnArg "rt$I$N$M" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$R$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc off InsertPolySpaceComments off SimulinkBlockComments on MATLABSourceComments off EnableCustomComments off InlinedPrmAccess "Literals" ReqsInCode off UseSimReservedNames off } Simulink.STFCustomTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 11 Version "1.12.0" Array { Type "Cell" Dimension 7 Cell "GenerateSampleERTMain" Cell "MatFileLogging" Cell "GRTInterface" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" CodeReplacementLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" CodeExecutionProfiling off ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant off ConcurrentExecutionCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus on ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off SupportVariableSizeSignals off EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant off AutosarCompliant off GRTInterface off SystemTargetFile "pic32.tlc" DialogCategory 0 Array { Type "Handle" Dimension 1 Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 12 Version "1.12.0" Array { Type "Cell" Dimension 9 Cell "GenerateSampleERTMain" Cell "GenerateErtSFunction" Cell "MatFileLogging" Cell "GRTInterface" Cell "ERTCustomFileTemplate" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" CodeReplacementLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" CodeExecutionProfiling off ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant off ConcurrentExecutionCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus on ERTFirstTimeCompliant off IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off SupportVariableSizeSignals off EnableShiftOperators on ParenthesesLevel "Nominal" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off CPPClassGenCompliant off AutosarCompliant off GRTInterface off GenerateErtSFunction off CreateSILPILBlock "None" CodeExecutionProfileVariable "executionProfile" CodeProfilingSaveOptions "SummaryOnly" GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "noextcomm" ExtModeIntrfLevel "Level1" InlinedParameterPlacement "NonHierarchical" TargetOS "BareBoardExample" MultiInstanceErrorCode "Error" RateGroupingCode on RootIOFormat "Individual arguments" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates off RTWCAPIRootIO off ERTSrcFileBannerTemplate "dsPIC_code_template.cgt" ERTHdrFileBannerTemplate "dsPIC_code_template.cgt" ERTDataSrcFileTemplate "dsPIC_code_template.cgt" ERTDataHdrFileTemplate "dsPIC_code_template.cgt" ERTCustomFileTemplate "dsPIC_main.tlc" CoverageDialogOpen "off" EnableDataOwnership off SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" DataDefinitionFile "global.c" GlobalDataReference "Auto" ERTFilePackagingFormat "Modular" DataReferenceFile "global.h" PreserveExpressionOrder off PreserveIfCondition off ConvertIfToSwitch off PreserveExternInFcnDecls on SuppressUnreachableDefaultCases off EnableUserReplacementTypes off Array { Type "Struct" Dimension 1 MATStruct { double "" single "" int32 "" int16 "" int8 "" uint32 "" uint16 "" uint8 "" boolean "" int "" uint "" char "" } PropName "ReplacementTypes" } MemSecPackage "--- None ---" MemSecDataConstants "Default" MemSecDataIO "Default" MemSecDataInternal "Default" MemSecDataParameters "Default" MemSecFuncInitTerm "Default" MemSecFuncExecute "Default" MemSecFuncSharedUtil "Default" CodeProfilingInstrumentation off } PropName "Components" } CustomProperty { DataType "string" Name "GMAKE_PLACE" Value "C:\\PROGRA~1\\MATLAB\\R2012a\\bin\\win32\\gmake" } CustomProperty { DataType "string" Name "OPTIM_GCC" Value "-mprocessor=32MX320F128H -O3 -fschedule-insns -fschedule-insns2" } CustomProperty { DataType "string" Name "LDFLAGS" Value "-t --report-mem -cref" } CustomProperty { DataType "string" Name "LDLIBPIC" Value " C:\\PROGRA~1\\MICROC~1\\mplabc32\\v2.01\\pic32mx\\lib\\speed\\libc.a C:\\PROGRA~1\\MICROC~1\\mplabc32\\v2." "01\\pic32mx\\lib\\speed\\libmchp_peripheral_32MX320F128H.a C:\\PROGRA~1\\MICROC~1\\mplabc32\\v2.01\\pic32mx\\lib\\sp" "eed\\libm.a C:\\PROGRA~1\\MICROC~1\\mplabc32\\v2.01\\pic32mx\\lib\\speed\\libm.a" } CustomProperty { DataType "string" Name "PIC_INCLUDES" Value " -IC:\\PROGRA~1\\MICROC~1\\mplabc32\\v2.01\\pic32mx\\include -IC:\\PROGRA~1\\MICROC~1\\mplabc32\\v2.01\\pic" "32mx\\include\\PERIPH~1" } CustomProperty { DataType "string" Name "PIC_REF" Value "32MX320F128H" } CustomProperty { DataType "string" Name "GCCPATH" Value "''" } } PropName "Components" } } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 " CurrentDlgPage "Solver" ConfigPrmDlgPosition [ 748, 30, 1677, 742 ] } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } ExplicitPartitioning off BlockDefaults { ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Helvetica" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on BlockRotation 0 BlockMirror off } 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" } BlockParameterDefaults { Block { BlockType Abs ZeroCross on SampleTime "-1" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Inherit from 'Constant value'" LockScale off SampleTime "inf" FramePeriod "inf" PreserveConstantTs off } Block { BlockType Gain Gain "1" Multiplication "Element-wise(K.*u)" ParamMin "[]" ParamMax "[]" ParamDataTypeStr "Inherit: Same as input" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Inport Port "1" OutputFunctionCall off OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: auto" LockScale off BusOutputAsStruct off PortDimensions "-1" VarSizeSig "Inherit" SampleTime "-1" SignalType "auto" SamplingMode "auto" LatchByDelayingOutsideSignal off LatchInputForFeedbackSignals off Interpolate on } Block { BlockType Outport Port "1" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: auto" LockScale off BusOutputAsStruct off PortDimensions "-1" VarSizeSig "Inherit" SampleTime "-1" SignalType "auto" SamplingMode "auto" SourceOfInitialOutputValue "Dialog" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType RelationalOperator Operator ">=" InputSameDT on OutDataTypeStr "Inherit: Logical (see Configuration Parameters: Optimization)" ZeroCross on SampleTime "-1" } 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" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" SFBlockType "NONE" Variant off GeneratePreprocessorConditionals off } Block { BlockType Sum IconShape "rectangular" Inputs "++" CollapseMode "All dimensions" CollapseDim "1" InputSameDT on AccumDataTypeStr "Inherit: Inherit via internal rule" OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Same as first input" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" InputSameDT on OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Inherit via internal rule" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on SampleTime "-1" AllowDiffInputSizes off } } System { Name "strainBasedMotorDrive_v3" Location [483, 129, 1810, 976] 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 "112" ReportName "simulink-default.rpt" SIDHighWatermark "509" Block { BlockType Reference Name "ADC Input 10 bits 0-1023" SID "404" Tag "dsPIC_ADC" Ports [0, 2] Position [35, 232, 175, 328] Priority "5" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Peripheral I//O/ADC Input" SourceType "dsPIC : ADC10" ADC_TYPE "10 bits" ADC_MODE "Continuous sampling & get last channel value" NbrSampleStep "10" VoltRefpopup "AVdd - AVss" OutFormatBitspopup "0000 00dd dddd dddd : Integer" InterruptPriority "6" ANCHANNELS "[3 4]" MaxName "ANmax = 1023" Rin "2e2" ADCS "12" SAMC "1" Temperature "25" DMAChannel "0" SampleTime ".00001" Status "OK | Tsmp=1.625e-07 | T/Channel=2.113e-06 | Tall=4.225e-05" SSRC "Timer3 (OC_HW PWM)" Port { PortNumber 1 Name "Control Signal" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } Port { PortNumber 2 Name "Zero Balance" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Abs Name "Abs" SID "439" Position [540, 240, 570, 270] ZOrder -1 OutDataTypeStr "uint16" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Configure Model \nfor dsPIC" SID "6" Ports [] Position [145, 51, 237, 90] ForegroundColor "blue" BackgroundColor "yellow" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC" SourceType "" } Block { BlockType Constant Name "Constant" SID "411" Position [605, 395, 635, 425] ZOrder -5 OutDataTypeStr "boolean" } Block { BlockType Constant Name "Constant1" SID "412" Position [590, 480, 620, 510] ZOrder -5 Value "0" OutDataTypeStr "boolean" } Block { BlockType Reference Name "Direction:\n1 = forward\n0 = reverse" SID "417" Tag "dsPIC_Digital_Output" Ports [1] Position [795, 435, 910, 475] Priority "5" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Digital I//O/Digital Output Write" SourceType "" PORT "D" Pin "[1]" Simultaneous off OrderingInOutPopup "None" } Block { BlockType Gain Name "Gain" SID "441" Position [605, 235, 680, 275] ZOrder -11 Gain "999/512" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint16" SaturateOnIntegerOverflow off Port { PortNumber 1 Name "PWM" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType Gain Name "Gain1" SID "503" Position [725, 236, 775, 274] ZOrder -11 Gain "5" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint16" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Master" SID "114" Tag "dsPIC_MASTER" Ports [] Position [34, 45, 134, 95] BackgroundColor "lightBlue" DropShadow on Priority "1" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "32MX320F128H" fcy "40000000" Quartz_33f "8e6" PLLActive_33f on fcyDesired_33f "40e6" tmr1 "[1 4 0]" tmr1Info "Time Step : 1.25e-07 ; Error : 0% PR1=4" tmr2345 "[0 1 0 0]" tmr2345cfg "[-1 -1 -1 -1]" IOautoConf on typePort "[ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 8 8 0 0 0" " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24 10 0 0" " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" " 0 0 0 0 ]" TRIS "[ 65535 65535 65535 65532 65535 65535 65535 ]" ADPCFG "0" MasterBusyPort "None" MasterOverloadPort "None" FOSC "Quartz (XT - HS)" ClockSwitchMonitor "Both disabled" TempProtection_33f "TEMP_ON" FPBOR "" PWRT "disable" MCLR "" ICD "ICS_PGD1" JTAGEN "JTAGEN_OFF" PowerSave off OverrideFcy off NewFcy "1e6" PR2345 "[65535 3999 65535 65535]" } Block { BlockType Reference Name "Output Compare HW" SID "405" Tag "dsPIC_OC_HW_out" Ports [1] Position [835, 224, 985, 286] Priority "5" LibraryVersion "3.84" SourceBlock "dsPICdrivers/Peripheral I//O/Output Compare HW" SourceType "Output Capture Peripheral - Hardware only (without interrupt) " OC_Mode "PWM duty cycle (robust)" Timer "3" CHANNEL "[1] " Channel_UP_Down_Periode "[5]" PeriodeInput off MaxChannel "0.0001" MaxName "' OCmax '" Precision "[11.9658]" Status "OK" SafeMarge "[0]" PortLetter "[68]" PortNumber "[0]" MaxValues "[3999]" NPORTS "1" } Block { BlockType RelationalOperator Name "Relational\nOperator" SID "433" Ports [2, 1] Position [540, 437, 570, 468] ZOrder -18 Operator ">" InputSameDT off OutDataTypeStr "boolean" } Block { BlockType Sum Name "Sum" SID "436" Ports [2, 1] Position [490, 245, 510, 265] ZOrder -18 ShowName off IconShape "round" Inputs "|+-" InputSameDT off OutDataTypeStr "int16" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch" SID "429" Position [675, 435, 725, 475] ZOrder -19 Criteria "u2 > Threshold" InputSameDT off OutDataTypeStr "Inherit: Inherit via back propagation" SaturateOnIntegerOverflow off ZeroCross off Port { PortNumber 1 Name "DIR" RTWStorageClass "Auto" DataLoggingNameMode "SignalName" } } Block { BlockType SubSystem Name "average last 10 ADC" SID "462" Ports [1, 1] Position [295, 242, 365, 268] ZOrder -19 MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "average last 10 ADC" Location [669, 314, 1300, 576] 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" SID "463" Position [55, 78, 85, 92] ZOrder -1 IconDisplay "Port number" } Block { BlockType Gain Name "Gain" SID "502" Position [255, 65, 330, 105] ZOrder -11 Gain "1/10" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint16" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" SID "504" Ports [1, 1] Position [165, 70, 195, 100] ZOrder -18 ShowName off IconShape "round" Inputs "+" InputSameDT off AccumDataTypeStr "uint16" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Out1" SID "464" Position [390, 78, 420, 92] ZOrder -2 IconDisplay "Port number" } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Out1" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Gain" DstPort 1 } } } Block { BlockType SubSystem Name "average last 10 ADC1" SID "505" Ports [1, 1] Position [295, 292, 365, 318] ZOrder -19 MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "average last 10 ADC1" Location [669, 314, 1300, 576] 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" SID "506" Position [55, 78, 85, 92] ZOrder -1 IconDisplay "Port number" } Block { BlockType Gain Name "Gain" SID "507" Position [255, 65, 330, 105] ZOrder -11 Gain "1/10" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint16" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum" SID "508" Ports [1, 1] Position [165, 70, 195, 100] ZOrder -18 ShowName off IconShape "round" Inputs "+" InputSameDT off AccumDataTypeStr "uint16" OutDataTypeStr "Inherit: Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "Out1" SID "509" Position [390, 78, 420, 92] ZOrder -2 IconDisplay "Port number" } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "In1" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 DstBlock "Out1" DstPort 1 } } } Line { Name "DIR" Labels [0, 0] SrcBlock "Switch" SrcPort 1 DstBlock "Direction:\n1 = forward\n0 = reverse" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 Points [0, -25] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Constant" SrcPort 1 Points [10, 0; 0, 30] DstBlock "Switch" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { Name "Control Signal" Labels [0, 0] SrcBlock "ADC Input 10 bits 0-1023" SrcPort 1 DstBlock "average last 10 ADC" DstPort 1 } Line { SrcBlock "Sum" SrcPort 1 DstBlock "Abs" DstPort 1 } Line { SrcBlock "Abs" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { Name "PWM" Labels [0, 0] SrcBlock "Gain" SrcPort 1 DstBlock "Gain1" DstPort 1 } Line { Name "Zero Balance" Labels [0, 0] SrcBlock "ADC Input 10 bits 0-1023" SrcPort 2 DstBlock "average last 10 ADC1" DstPort 1 } Line { SrcBlock "average last 10 ADC1" SrcPort 1 Points [130, 0] Branch { DstBlock "Sum" DstPort 2 } Branch { Points [0, 155] DstBlock "Relational\nOperator" DstPort 2 } } Line { SrcBlock "average last 10 ADC" SrcPort 1 Points [55, 0] Branch { DstBlock "Sum" DstPort 1 } Branch { Points [0, 190] DstBlock "Relational\nOperator" DstPort 1 } } Line { SrcBlock "Gain1" SrcPort 1 DstBlock "Output Compare HW" DstPort 1 } Annotation { SID "401" Name "f_pwm = 10 kHz\n(=> pwm period = 1 / 10,000)\nguessed minimum clock cycles per \nPWM period to avoi" "d over-run =200\nsample time sT = 1 / f_pwm / 200\nmin sample period = 5e-7\n\nSet ADC rate 100 kHz (0.00001)\n" "\nSet Vref + and Vref -" Position [263, 65] HorizontalAlignment "left" } Annotation { SID "407" Name "Cerebot MX3 Connections:\nJC header:\n1 \n2\n3\n4\n5 \n6\n7 Vref +\n8 Vref -\n9 PWM output to" " H-Bridge\n10 DIR Motor Direction Output to H-Bridge\n11 GND to H-Bridge\n12 + 5V (set jumper JPC to 5V0) to sup" "ply H-Bridge Logic" Position [512, 111] HorizontalAlignment "left" } Annotation { SID "440" Name "Note OC1max = 999\nOutput of ABS is 0 to 512\nNeed 999/512 gain to go to 100% duty" Position [735, 313] } Annotation { SID "442" Name "Cerebot MX3 Connections:\nJE header:\n1 \n2\n3\n4\n5 \n6\n7 \n8 Main System Gain (AN_5) \n9 " " Zero Balance (AN_4)\n10 Control (AN_3) \n11 \n12 " Position [837, 111] HorizontalAlignment "left" } } }