Model { Name "FYP_pwm_model" Version 7.6 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.19" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" MaxMDLFileLineLength 120 Created "Mon Oct 24 14:13:51 2011" Creator "lab" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "lab" ModifiedDateFormat "%" LastModifiedDate "Tue Oct 25 18:13:03 2011" RTWModifiedTimeStamp 241457750 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes 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 1000 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.10.0" Array { Type "Handle" Dimension 8 Simulink.SolverCC { $ObjectID 2 Version "1.10.0" StartTime "0.0" StopTime "10.0" 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 "SingleTasking" ConcurrentTasks off Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" SolverJacobianMethodControl "auto" ShapePreserveControl "DisableAll" ZeroCrossControl "UseLocalSettings" ZeroCrossAlgorithm "Nonadaptive" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" InsertRTBMode "Whenever possible" } Simulink.DataIOCC { $ObjectID 3 Version "1.10.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveCompleteFinalSimState off SaveFormat "Array" 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.10.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off UseIntDivNetSlope 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 } Simulink.DebuggingCC { $ObjectID 5 Version "1.10.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" 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" InitInArrayFormatMsg "warning" StrictBusMsg "ErrorLevel1" BusNameAdapt "WarnAndRepair" NonBusSignalsTreatedAsBus "none" LoggingUnavailableSignals "error" BlockIODiagnostic "none" SFUnusedDataAndEventsDiag "warning" SFUnexpectedBacktrackingDiag "warning" SFInvalidInputDataAccessInChartInitDiag "warning" SFNoUnconditionalDefaultTransitionDiag "warning" SFTransitionOutsideNaturalParentDiag "warning" } Simulink.HardwareCC { $ObjectID 6 Version "1.10.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 16 ProdBitPerLong 32 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 16 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Zero" ProdEndianess "LittleEndian" ProdWordSize 16 ProdShiftRightIntArith on ProdHWDeviceType "Microchip->dsPIC" 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.10.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.10.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.10.0" SystemTargetFile "dsPIC_stf.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "dsPIC_gcc.tmf" Description "Embedded Target for Microchip dsPIC33fxx (real-time)" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "dsPIC_stf_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 GenerateSLWebview off RTWCompilerOptimization "Off" CheckMdlBeforeBuild "Off" CustomRebuildMode "OnUpdate" Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 10 Version "1.10.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.10.0" Array { Type "Cell" Dimension 2 Cell "IncludeMdlTerminateFcn" Cell "GenerateSampleERTMain" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off ParMdlRefBuildCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus off 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 SystemTargetFile "dsPIC_stf.tlc" DialogCategory 0 Array { Type "Handle" Dimension 1 Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 12 Version "1.10.0" Array { Type "Cell" Dimension 7 Cell "IncludeMdlTerminateFcn" Cell "ERTSrcFileBannerTemplate" Cell "ERTHdrFileBannerTemplate" Cell "ERTDataSrcFileTemplate" Cell "ERTDataHdrFileTemplate" Cell "GenerateSampleERTMain" Cell "ERTCustomFileTemplate" PropName "DisabledProps" } TargetFcnLib "ansi_tfl_table_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off ParMdlRefBuildCompliant off CompOptLevelCompliant off IncludeMdlTerminateFcn off GeneratePreprocessorConditionals "Use local settings" CombineOutputUpdateFcns on CombineSignalStateStructs off SuppressErrorStatus off 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 GenerateErtSFunction off CreateSILPILBlock "None" GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "ext_comm" ExtModeIntrfLevel "Level1" InlinedParameterPlacement "NonHierarchical" TargetOS "BareBoardExample" MultiInstanceErrorCode "Error" RateGroupingCode on RootIOFormat "Individual arguments" RTWCAPISignals off RTWCAPIParams off RTWCAPIStates 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" ModuleNamingRule "Unspecified" SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" DataDefinitionFile "global.c" GlobalDataReference "Auto" ERTFilePackagingFormat "Modular" DataReferenceFile "global.h" GRTInterface off PreserveExpressionOrder off PreserveIfCondition off ConvertIfToSwitch off PreserveExternInFcnDecls on 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" } PropName "Components" } CustomProperty { DataType "string" Name "PICTYPE" Value "33FJ64MC802" } CustomProperty { DataType "string" Name "OGCC" Value "-O3 -g -fschedule-insns -fschedule-insns2" } CustomProperty { DataType "string" Name "LDFS" Value "-t --report-mem -Map ../untitled.map --heap 0 -cref" } CustomProperty { DataType "string" Name "MCPATH" Value "C:\\PROGRA~1\\MICROC~1\\MPLABC~2" } CustomProperty { DataType "string" Name "LINKERSCRIPT" Value "C:\\Program Files\\Microchip\\MPLAB C30\\support\\dsPIC33F\\gld\\p33FJ64MC802.gld" } CustomProperty { DataType "string" Name "PICLIB" Value "C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\dsPIC33F\\libp33FJ64MC802-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\l" "ib\\libpic30-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libm-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libc-c" "off.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libc-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libq-coff.a C:\\PROG" "RA~1\\MICROC~1\\MPLABC~2\\lib\\libq-dsp-coff.a" } CustomProperty { DataType "string" Name "PICINCL" Value " -IC:\\PROGRA~1\\MICROC~1\\MPLABC~2\\include -IC:\\PROGRA~1\\MICROC~1\\MPLABC~2\\support\\dsPIC33F\\h" } } PropName "Components" } } PropName "Components" } Name "Configuration" CurrentDlgPage "Solver" ConfigPrmDlgPosition " [ 227, 141, 1196, 771 ] " } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } 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 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 DataTypeConversion OutMin "[]" OutMax "[]" OutDataTypeStr "Inherit: Inherit via back propagation" LockScale off ConvertRealWorld "Real World Value (RWV)" RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Scope ModelBased off TickLabels "OneTimeTick" ZoomMode "on" Grid "on" TimeRange "auto" YMin "-5" YMax "5" SaveToWorkspace off SaveName "ScopeData" LimitDataPoints on MaxDataPoints "5000" Decimation "1" SampleInput off SampleTime "-1" } } System { Name "FYP_pwm_model" Location [692, 68, 1207, 814] 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" SIDHighWatermark "24" Block { BlockType Reference Name "Config" SID "5" Ports [] Position [30, 144, 165, 208] BackgroundColor "yellow" DropShadow on LibraryVersion "1.1517" FontName "Arial" SourceBlock "dsPICConfigLib/Config" SourceType "Config" } Block { BlockType Constant Name "Constant" SID "11" Position [80, 345, 110, 375] Value "20e-3" VectorParams1D off OutMin "[0]" OutMax "[20e-3]" OutDataTypeStr "uint16" LockScale on } Block { BlockType DataTypeConversion Name "Data Type Conversion" SID "18" Position [155, 483, 230, 517] OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Master" SID "10" Tag "dsPIC_MASTER" Ports [] Position [84, 605, 184, 655] BackgroundColor "lightBlue" DropShadow on Priority "1" LibraryVersion "3.77" List { ListType RTWdata NumBusyPort "-1" } SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "33fj64MC802" fcy "6000000" Quartz_33f "12e6" PLLActive_33f off fcyDesired_33f "0" tmr1 "[1 4999 0]" tmr1Info "Time Step : 0.001 ; Error : 0% PR1=4999" tmr2345 "[0 0 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 0 0 0 0 0" " 0 11 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 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 65535 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 on NewFcy "5e6" PR2345 "[65535 65535 65535 65535]" } Block { BlockType Reference Name "PWM Motor Output" SID "2" Tag "dsPIC_PWM_Motor" Ports [2] Position [310, 366, 460, 424] Priority "5" LibraryVersion "3.77" SourceBlock "dsPICdrivers/Peripheral I//O/PWM Motor Output" SourceType "PWM Motor Output" PWMref "2" PWM12 "2" InputEnableChk off InputPeriodeChk on Channel "[1 ]" TPeriode "20E-3" PrescalerValue "4" PeriodeInteger "12500" MaxName "'PWM2'" Centered on HChannelON off Info "Nbr Bits : 14.6096 || PWM2 = 25000 || Prescaler = 4" Delay "0" IntPriority "5" nbrPwmChannelPIC "1" Status "OK" DeadTimePrescaleA "1e-6" DeadTimePrescaleB "0" DeadTimeInfo "Dead Time A = 1e-006 || Dead Time B = 0" DTPWM1a "Prescaler A" DTPWM1i "Prescaler A" DTPWM2a "Prescaler A" DTPWM2i "Prescaler A" DTPWM3a "Prescaler A" DTPWM3i "Prescaler A" DTPWM4a "Prescaler A" DTPWM4i "Prescaler A" DTCON1 "5" DTCON2 "0" } Block { BlockType Reference Name "PWM config" SID "1" Ports [] Position [153, 39, 288, 103] DropShadow on Priority "-19" LibraryVersion "1.1517" FontName "Arial" FontSize 12 SourceBlock "dsPICConfigLib/PWM config" SourceType "dsPIC MCPWM Configuration" PWMSEL "2" PTPER "159999" PDC1 "3204780" PDC4 "1600" PMOD1 "complementary output mode" PMOD2 "complementary output mode" PMOD3 "complementary output mode" PMOD4 "complementary output mode" PEN4H off PEN3H off PEN2H off PEN1H on PEN4L off PEN3L off PEN2L off PEN1L on IUE off OSYNC "Output overrides via the PxOVDCON(1) register occur on the next TCY boundary" UDIS off PWMINTEN off PWMINTP "0" SEVTDIR "Trigger when PWM time base is counting up" SEVTCMP "100000" PTEN off PTSIDL off PTOPS "1" PTCKPS "input clock period is TCY (1:1 prescale)" PTMOD "Free Running mode" PTFREQ "25" PDC1P "2003" PDC2P "Apply Positive dead time for all output modes" PDC3P "off" PDC4P "1" PWMPIN "Control pin state at reset by the module" HPOL "Ative Low" LPOL "Ative Low" DTBPS "Clock period for Dead Time Unit B is TCY" DTB "397" DTAPS "Clock period for Dead Time Unit A is TCY" DTA "0" DTS4A "Dead time provided from Unit A" DTS4I "Dead time provided from Unit A" DTS3A "Dead time provided from Unit A" DTS3I "Dead time provided from Unit A" DTS2A "Dead time provided from Unit A" DTS2I "Dead time provided from Unit A" DTS1A "Dead time provided from Unit A" DTS1I "Dead time provided from Unit A" FAOV4H "Drive PWM output pin Inactive on an external fault input event" FAOV3H "Drive PWM output pin Inactive on an external fault input event" FAOV2H "Drive PWM output pin Inactive on an external fault input event" FAOV1H "Drive PWM output pin Inactive on an external fault input event" FAOV4L "Drive PWM output pin Inactive on an external fault input event" FAOV3L "Drive PWM output pin Inactive on an external fault input event" FAOV2L "Drive PWM output pin Inactive on an external fault input event" FAOV1L "Drive PWM output pin Inactive on an external fault input event" FLTAM "Fault A input pin latches all control pins to the programmed states in PxFLTACON<15:8>" FAEN4 off FAEN3 off FAEN2 off FAEN1 off FBOV4H "Drive PWM output pin Inactive on an external fault input event" FBOV3H "Drive PWM output pin Inactive on an external fault input event" FBOV2H "Drive PWM output pin Inactive on an external fault input event" FBOV1H "Drive PWM output pin Inactive on an external fault input event" FBOV4L "Drive PWM output pin Inactive on an external fault input event" FBOV3L "Drive PWM output pin Inactive on an external fault input event" FBOV2L "Drive PWM output pin Inactive on an external fault input event" FBOV1L "Drive PWM output pin Inactive on an external fault input event" FLTBM "Fault B input pin latches all control pins to the programmed states in PxFLTACON<15:8>" FBEN4 off FBEN3 off FBEN2 off FBEN1 off POVD4H off POUT4H "Drive PWM4H Inactive when POVD4H bit is cleared" POVD4L off POUT4L "Drive PWM4L Inactive when POVD4L bit is cleared" POVD3H off POUT3H "Drive PWM3H Inactive when POVD3H bit is cleared" POVD3L off POUT3L "Drive PWM3L Inactive when POVD3L bit is cleared" POVD2H off POUT2H "Drive PWM2H Inactive when POVD2H bit is cleared" POVD2L off POUT2L "Drive PWM2L Inactive when POVD2L bit is cleared" POVD1H off POUT1H "Drive PWM1H Inactive when POVD1H bit is cleared" POVD1L off POUT1L "Drive PWM1L Inactive when POVD1L bit is cleared" } Block { BlockType Reference Name "Repeating\nSequence\nInterpolated" SID "19" Ports [0, 1] Position [40, 485, 70, 515] LibraryVersion "1.225" SourceBlock "simulink/Sources/Repeating\nSequence\nInterpolated" SourceType "Repeating Sequence Interpolated" ShowPortLabels "FromPortIcon" SystemSampleTime "-1" FunctionWithSeparateData off RTWMemSecFuncInitTerm "Inherit from model" RTWMemSecFuncExecute "Inherit from model" RTWMemSecDataConstants "Inherit from model" RTWMemSecDataInternal "Inherit from model" RTWMemSecDataParameters "Inherit from model" GeneratePreprocessorConditionals off OutValues "[1 0 1 0 1].'" TimeValues "[0 0.8 1 1.2 2].'" LookUpMeth "Interpolation-Use End Values" tsamp "0.01" OutMin "[]" OutMax "[]" OutDataTypeStr "uint16" OutputDataTypeScalingMode "uint16" OutDataType "fixdt(0,8)" OutScaling "2^-10" LockScale off } Block { BlockType Scope Name "Scope" SID "22" Ports [1] Position [310, 534, 340, 566] Floating off Location [188, 390, 512, 629] Open on NumInputPorts "1" TickLabels "on" List { ListType AxesTitles axes1 "%" } TimeRange "5" DataFormat "StructureWithTime" Decimation "2" SampleInput on SampleTime "0.01" } Block { BlockType Scope Name "Scope1" SID "24" Ports [1] Position [235, 284, 265, 316] Floating off Location [174, 93, 519, 328] Open on NumInputPorts "1" TickLabels "on" List { ListType AxesTitles axes1 "%" } TimeRange "5" YMin "-1" YMax "0.04" SaveName "ScopeData1" DataFormat "StructureWithTime" Decimation "2" SampleInput on SampleTime "0.01" } Block { BlockType Reference Name "dsPIC33fxx Main" SID "3" Ports [] Position [310, 74, 445, 138] DropShadow on Priority "-50" LibraryVersion "1.1517" FontName "Arial" FontSize 12 FontWeight "bold" SourceBlock "dsPICConfigLib/dsPIC33fxx Main" SourceType "dsPIC33fxx Controller Setup" PICTYPE "33FJ64MC802" timer "Timer1" OscSrcSel "Primary oscillator (XT HS EC)" Fin "8e6" Fcy "4000000" ReqLpTm "1" PR1 "4000" IESO "Enabled" Temperature "Disabled" ClockSwi "Both enabled" Osc2 "Digital I/O" OscSel "External clock" FICD "Use PGC1/EMUC1 and PGD1/EMUD1" Wdt "Disabled" WinWdt "Disabled" WdtPre "1:32" WdtPost "1:1" HSCP "code protect off" CodeProtect "Disabled" WriteProtect "Disabled" PLLDIV "0" PLLPRE "0" PLLPOST "0" TMR1PRESCL "0" } Line { SrcBlock "Repeating\nSequence\nInterpolated" SrcPort 1 DstBlock "Data Type Conversion" DstPort 1 } Line { SrcBlock "Data Type Conversion" SrcPort 1 Points [10, 0] Branch { Points [5, 0; 0, 50] DstBlock "Scope" DstPort 1 } Branch { Points [0, -90] DstBlock "PWM Motor Output" DstPort 2 } } Line { SrcBlock "Constant" SrcPort 1 Points [95, 0] Branch { Points [5, 0; 0, 20] DstBlock "PWM Motor Output" DstPort 1 } Branch { Points [0, -60] DstBlock "Scope1" DstPort 1 } } } }