Model { Name "oc_exm_counter" Version 6.5 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.198" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-949" SaveDefaultBlockParams on SampleTimeColors off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes on ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons 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 on BrowserLookUnderMasks off Created "Mon Jul 28 10:06:00 2008" Creator "Peter" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "peter" ModifiedDateFormat "%" LastModifiedDate "Tue May 15 10:34:42 2012" ModelVersionFormat "1.%" ConfigurationManager "None" 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 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 ProdHWDeviceType "16-bit Generic" ShowModelReferenceBlockVersion off ShowModelReferenceBlockIO off Array { Type "Handle" Dimension 1 Simulink.ConfigSet { $ObjectID 1 Version "1.2.0" Array { Type "Handle" Dimension 8 Simulink.SolverCC { $ObjectID 2 Version "1.2.0" StartTime "0.0" StopTime "10.0" AbsTol "auto" FixedStep "0.001" InitialStep "auto" MaxNumMinSteps "-1" MaxOrder 5 ConsecutiveZCsStepRelTol "10*128*eps" MaxConsecutiveZCs "1000" ExtrapolationOrder 4 NumberNewtonIterations 1 MaxStep "auto" MinStep "auto" MaxConsecutiveMinStep "1" RelTol "1e-3" SolverMode "Auto" Solver "FixedStepDiscrete" SolverName "FixedStepDiscrete" ZeroCrossControl "UseLocalSettings" AlgebraicLoopSolver "TrustRegion" SolverResetMethod "Fast" PositivePriorityOrder on AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.2.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" 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 "logsout" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.2.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast on ExpressionFolding on FoldNonRolledExpr on LocalBlockOutputs on ParameterPooling on RollThreshold 5 SystemCodeInlineAuto off StateBitsets off DataBitsets off UseTempVars off ZeroExternalMemoryAtStartup on ZeroInternalMemoryAtStartup on InitFltsAndDblsToZero on NoFixptDivByZeroProtection off EfficientFloat2IntCast off OptimizeModelRefInitCode on LifeSpan "1" BufferReusableBoundary on } Simulink.DebuggingCC { $ObjectID 5 Version "1.2.0" RTPrefix "error" ConsistencyChecking "none" ArrayBoundsChecking "none" SignalInfNanChecking "none" ReadBeforeWriteMsg "UseLocalSettings" WriteAfterWriteMsg "UseLocalSettings" WriteAfterReadMsg "UseLocalSettings" AlgebraicLoopMsg "warning" ArtificialAlgebraicLoopMsg "warning" CheckSSInitialOutputMsg on CheckExecutionContextPreStartOutputMsg off CheckExecutionContextRuntimeOutputMsg off SignalResolutionControl "TryResolveAllWithWarning" BlockPriorityViolationMsg "warning" MinStepSizeMsg "warning" TimeAdjustmentMsg "none" MaxConsecutiveZCsMsg "error" 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" 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" StrictBusMsg "Warning" } Simulink.HardwareCC { $ObjectID 6 Array { Type "Cell" Dimension 2 Cell "ProdHWDeviceType" Cell "ProdEqTarget" PropName "DisabledProps" } Version "1.2.0" ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 16 ProdBitPerLong 32 ProdIntDivRoundTo "Undefined" ProdEndianess "LittleEndian" ProdWordSize 16 ProdShiftRightIntArith on ProdHWDeviceType "16-bit Generic" TargetBitPerChar 8 TargetBitPerShort 16 TargetBitPerInt 32 TargetBitPerLong 32 TargetShiftRightIntArith on TargetIntDivRoundTo "Undefined" TargetEndianess "Unspecified" TargetWordSize 32 TargetTypeEmulationWarnSuppressLevel 0 TargetPreprocMaxBitsSint 32 TargetPreprocMaxBitsUint 32 TargetHWDeviceType "32-bit Generic" TargetUnknown off ProdEqTarget on } Simulink.ModelReferenceCC { $ObjectID 7 Version "1.2.0" UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange" CheckModelReferenceTargetMessage "error" ModelReferenceNumInstancesAllowed "Multi" ModelReferencePassRootInputsByReference on ModelReferenceMinAlgLoopOccurrences off } Simulink.RTWCC { $BackupClass "Simulink.RTWCC" $ObjectID 8 Array { Type "Cell" Dimension 1 Cell "TargetLang" PropName "DisabledProps" } Version "1.2.0" SystemTargetFile "dspic.tlc" GenCodeOnly off MakeCommand "make_rtw" GenerateMakefile on TemplateMakefile "dspic_pic30_gcc.tmf" PostCodeGenCommand "dsPIC_Compile()" Description "Embedded Target for Microchip dsPIC (real-t" "ime)" GenerateReport off SaveLog off RTWVerbose on RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "dspic_make_rtw_hook" ConfigAtBuild off IncludeHyperlinkInReport off LaunchReport off TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Version "1.2.0" ForceParamTrailComments off GenerateComments on IgnoreCustomStorageClasses off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc off SFDataObjDesc off IncDataTypeInIds off PrefixModelToSubsysFcnNames on 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 } Simulink.STFCustomTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 10 Array { Type "Cell" Dimension 5 Cell "GenerateSampleERTMain" Cell "MatFileLogging" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" PropName "DisabledProps" } Version "1.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off IncludeMdlTerminateFcn off CombineOutputUpdateFcns on SuppressErrorStatus on IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off EnableShiftOperators on ParenthesesLevel "Nominal" SystemTargetFile "dspic.tlc" DialogCategory 0 Array { Type "Handle" Dimension 1 Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 11 Array { Type "Cell" Dimension 8 Cell "GenerateSampleERTMain" Cell "GenerateErtSFunction" Cell "MatFileLogging" Cell "GRTInterface" Cell "ERTCustomFileTemplate" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" PropName "DisabledProps" } Version "1.2.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off IncludeMdlTerminateFcn off CombineOutputUpdateFcns on SuppressErrorStatus on IncludeFileDelimiter "Auto" ERTCustomFileBanners on SupportAbsoluteTime on LogVarNameModifier "rt_" MatFileLogging off MultiInstanceERTCode off SupportNonFinite on SupportComplex on PurelyIntegerCode off SupportContinuousTime off SupportNonInlinedSFcns off EnableShiftOperators on ParenthesesLevel "Nominal" GenerateErtSFunction off GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "ext_comm" 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" ModuleNamingRule "Unspecified" SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" DataDefinitionFile "global.c" GlobalDataReference "Auto" DataReferenceFile "global.h" GRTInterface 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" } PropName "Components" } CustomProperty { DataType "string" Name "GMAKE_PLACE" Value "C:\\MATLAB\\R2006b\\rtw\\bin\\win32\\" "gmake" } CustomProperty { DataType "string" Name "OPTIM_GCC" Value "-mcpu=30f4011 -O3 -fschedule-insns -f" "schedule-insns2 -fno-short-double" } CustomProperty { DataType "string" Name "LDFLAGS" Value "-t --report-mem -Map ../untitled.map " "--heap 0 -cref" } CustomProperty { DataType "string" Name "LDPICTYPE" Value "-T C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\" "support\\dsPIC30F\\gld\\p30f4011.gld" } CustomProperty { DataType "string" Name "LDLIBPIC" Value "C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib" "\\libpic30-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\dsPIC30F\\libp30f40" "11-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libc-coff.a C:\\PROGRA~1\\MI" "CROC~1\\MPLABC~2\\lib\\libm-coff.a" } CustomProperty { DataType "string" Name "PIC_INCLUDES" Value "-I C:\\PROGRA~1\\MICROC~1\\MPLABC~2\\" "include" } CustomProperty { DataType "string" Name "PIC_REF" Value "30f4011" } CustomProperty { DataType "string" Name "GCCPATH" Value "''" } } PropName "Components" } } hdlcoderui.hdlcc { $ObjectID 12 Description "HDL Coder custom configuration component" Version "1.2.0" Name "HDL Coder" Array { Type "Cell" Dimension 1 Cell "" PropName "HDLConfigFile" } HDLCActiveTab "0" } PropName "Components" } Name "Configuration" SimulationMode "normal" CurrentDlgPage "Real-Time Workshop/Comments" } PropName "ConfigurationSets" } Simulink.ConfigSet { $PropName "ActiveConfigurationSet" $ObjectID 1 } BlockDefaults { Orientation "right" ForegroundColor "black" BackgroundColor "white" DropShadow off NamePlacement "normal" FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" ShowName on } BlockParameterDefaults { Block { BlockType Constant } Block { BlockType DataTypeConversion OutDataTypeMode "Inherit via back propagation" OutDataType "sfix(16)" OutScaling "2^0" LockScale off ConvertRealWorld "Real World Value (RWV)" RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType From IconDisplay "Tag" } Block { BlockType Goto IconDisplay "Tag" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType RelationalOperator Operator ">=" InputSameDT on LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza" "tion)" LogicDataType "uint(8)" ZeroCross on SampleTime "-1" } Block { BlockType "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" } Block { BlockType SubSystem ShowPortLabels on Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit 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 "++" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "sfix(16)" OutScaling "2^0" LockScale off RndMeth "Floor" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType Switch Criteria "u2 >= Threshold" Threshold "0" InputSameDT on OutDataTypeMode "Inherit via internal rule" RndMeth "Floor" SaturateOnIntegerOverflow on ZeroCross on SampleTime "-1" } Block { BlockType Terminator } Block { BlockType UnitDelay X0 "0" SampleTime "1" StateMustResolveToSignalObject off RTWStateStorageClass "Auto" } } AnnotationDefaults { HorizontalAlignment "center" VerticalAlignment "middle" ForegroundColor "black" BackgroundColor "white" DropShadow off FontName "Arial" FontSize 10 FontWeight "normal" FontAngle "normal" } LineDefaults { FontName "Arial" FontSize 9 FontWeight "normal" FontAngle "normal" } System { Name "oc_exm_counter" Location [369, 79, 1493, 998] Open on ModelBrowserVisibility on ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "103" ReportName "simulink-default.rpt" Block { BlockType Reference Name "Configuration" Ports [] Position [345, 20, 445, 70] BackgroundColor "lightBlue" DropShadow on SourceBlock "dsPICdrivers/Configuration" SourceType "" 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" double64 on } Block { BlockType Reference Name "Configure Model \nfor dsPIC" Ports [] Position [175, 19, 287, 75] ForegroundColor "blue" BackgroundColor "yellow" DropShadow on SourceBlock "dsPICdrivers/Simulink Configuration/Configure M" "odel \nfor dsPIC" SourceType "" } Block { BlockType Constant Name "Constant" Position [20, 130, 100, 160] BackgroundColor "magenta" ShowName off Value "1000*8" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "double" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^0" SampleTime "-1" FramePeriod "inf" } Block { BlockType DataTypeConversion Name "Data Type Conversion" Position [400, 299, 455, 321] ShowName off OutDataTypeMode "double" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" Position [405, 689, 460, 711] ShowName off OutDataTypeMode "double" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion3" Position [420, 198, 480, 232] NamePlacement "alternate" ShowName off OutDataTypeMode "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion4" Position [230, 128, 290, 162] NamePlacement "alternate" ShowName off OutDataTypeMode "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Digital Output Write" Tag "dsPIC_Digital_Output" Ports [1] Position [705, 500, 820, 540] Priority "5" SourceBlock "dsPICdrivers/Digital I//O/Digital Output Write" SourceType "" PORT "E" Pin "[3]" Simultaneous off OrderingInOutPopup "None" } Block { BlockType Reference Name "Digital Output Write1" Tag "dsPIC_Digital_Output" Ports [1] Position [710, 890, 825, 930] Priority "5" SourceBlock "dsPICdrivers/Digital I//O/Digital Output Write" SourceType "" PORT "E" Pin "[5]" Simultaneous off OrderingInOutPopup "None" } Block { BlockType Product Name "Divide1" Ports [2, 1] Position [335, 173, 365, 257] NamePlacement "alternate" ShowName off Inputs "**" InputSameDT off OutDataTypeMode "double" OutDataType "ufix(16)" OutScaling "2^-1" RndMeth "Floor" } Block { BlockType From Name "From1" Position [745, 190, 845, 220] ShowName off CloseFcn "tagdialog Close" GotoTag "period" } Block { BlockType From Name "From2" Position [745, 220, 845, 250] ShowName off CloseFcn "tagdialog Close" GotoTag "up" } Block { BlockType From Name "From3" Position [745, 710, 845, 740] ShowName off CloseFcn "tagdialog Close" GotoTag "period" } Block { BlockType From Name "From4" Position [745, 740, 845, 770] ShowName off CloseFcn "tagdialog Close" GotoTag "up" } Block { BlockType Goto Name "Goto1" Position [570, 131, 670, 159] ShowName off GotoTag "period" TagVisibility "local" } Block { BlockType Goto Name "Goto2" Position [570, 201, 670, 229] ShowName off GotoTag "up" TagVisibility "local" } Block { BlockType Reference Name "Input Capture" Tag "dsPIC_PWM_IC" Ports [0, 3] Position [15, 261, 165, 319] Priority "5" SourceBlock "dsPICdrivers/Peripheral I//O/Input Capture" SourceType "Input driver for Input Capture Peripheral" IntPriority "4" Channel "[ 2 ]" Channel_UP_Down_Periode "[5]" MaxChannel "[0.001]" SafeMarge "[10]" MaxName " ' IC2max ' " Precision "[13.103]" Timer "[2]" ChangeDetected "[2]" ChangeDetectedPortRef "3" SampleTime "-1" Status "OK" } Block { BlockType Reference Name "Input Capture1" Tag "dsPIC_PWM_IC" Ports [0, 3] Position [20, 651, 170, 709] Priority "5" SourceBlock "dsPICdrivers/Peripheral I//O/Input Capture" SourceType "Input driver for Input Capture Peripheral" IntPriority "6" Channel "[1]" Channel_UP_Down_Periode "[5]" MaxChannel "[0.001]" SafeMarge "[10]" MaxName " ' IC1max ' " Precision "[13.103]" Timer "[2]" ChangeDetected "[2]" ChangeDetectedPortRef "3" SampleTime "-1" Status "OK" } Block { BlockType Reference Name "Master" Tag "dsPIC_MASTER" Ports [] Position [34, 25, 134, 75] BackgroundColor "lightBlue" DropShadow on Priority "1" List { ListType RTWdata NumBusyPort "-1" } SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "30f4011" fcy "8e6" Quartz_33f "5e6" PLLActive_33f off fcyDesired_33f "0" tmr1 "[1 7999 0]" tmr1Info "Time Step : 0.001 ; Error : 0% PR1=7999" tmr2345 "[1 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 6 6 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 11 0 11 10 0 1" "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 65495 65535 655" "35 ]" ADPCFG "48" MasterBusyPort "None" MasterOverloadPort "None" FOSC "FRC_PLL8" ClockSwitchMonitor "Both disabled" TempProtection_33f "TEMP_ON" FPBOR "PBOR_OFF" PWRT "PWRT_4" MCLR "MCLR_DIS" PowerSave off OverrideFcy off NewFcy "1e6" PR2345 "[65535 65535 65535 65535]" } Block { BlockType Reference Name "PWM Motor Output" Tag "dsPIC_PWM_Motor" Ports [2] Position [895, 191, 1045, 249] Priority "5" SourceBlock "dsPICdrivers/Peripheral I//O/PWM Motor Output" SourceType "PWM Motor Output" InputEnableChk off InputPeriodeChk on Channel "[1 ]" TPeriode ".001" PrescalerValue "1" PeriodeInteger "8000" MaxName "'PWM'" Centered off HChannelON off Info "Nbr Bits : 13.9658 || PWM = 16000 || Presca" "ler = 1" Delay "0" IntPriority "5" nbrPwmChannelPIC "3" Status "OK" } Block { BlockType Reference Name "PWM Motor Output1" Tag "dsPIC_PWM_Motor" Ports [2] Position [900, 711, 1050, 769] Priority "5" SourceBlock "dsPICdrivers/Peripheral I//O/PWM Motor Output" SourceType "PWM Motor Output" InputEnableChk off InputPeriodeChk on Channel "[2]" TPeriode ".001" PrescalerValue "1" PeriodeInteger "8000" MaxName "'PWM'" Centered off HChannelON off Info "Nbr Bits : 13.9658 || PWM = 16000 || Presca" "ler = 1" Delay "0" IntPriority "5" nbrPwmChannelPIC "3" Status "OK" } Block { BlockType RelationalOperator Name "Relational\nOperator" Position [510, 517, 540, 548] ShowName off InputSameDT off LogicOutDataTypeMode "Boolean" } Block { BlockType RelationalOperator Name "Relational\nOperator1" Position [515, 907, 545, 938] ShowName off InputSameDT off LogicOutDataTypeMode "Boolean" } Block { BlockType Sum Name "Sum" Ports [2, 1] Position [495, 300, 515, 320] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Sum Name "Sum1" Ports [2, 1] Position [500, 690, 520, 710] ShowName off IconShape "round" Inputs "|++" InputSameDT off OutDataTypeMode "Inherit via internal rule" SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch1" Position [455, 380, 485, 410] ShowName off Criteria "u2 ~= 0" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Switch Name "Switch2" Position [460, 770, 490, 800] ShowName off Criteria "u2 ~= 0" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Terminator Name "Terminator" Position [200, 260, 220, 280] ShowName off } Block { BlockType Terminator Name "Terminator1" Position [200, 280, 220, 300] ShowName off } Block { BlockType Terminator Name "Terminator2" Position [195, 650, 215, 670] ShowName off } Block { BlockType Terminator Name "Terminator3" Position [195, 670, 215, 690] ShowName off } Block { BlockType UnitDelay Name "Unit Delay1" Position [510, 428, 545, 462] Orientation "left" ShowName off SampleTime "-1" } Block { BlockType UnitDelay Name "Unit Delay2" Position [515, 818, 550, 852] Orientation "left" ShowName off SampleTime "-1" } Block { BlockType Constant Name "counter_reset" Position [355, 335, 400, 365] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "double" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^-2" SampleTime "inf" FramePeriod "inf" } Block { BlockType Constant Name "counter_reset1" Position [360, 725, 405, 755] Value "0" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "double" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^-2" SampleTime "inf" FramePeriod "inf" } Block { BlockType Constant Name "machine clock1" Position [130, 525, 210, 555] ShowName off Value "6" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "double" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^-2" SampleTime "inf" FramePeriod "inf" } Block { BlockType Constant Name "machine clock3" Position [135, 915, 215, 945] ShowName off Value "6" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "double" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^-2" SampleTime "inf" FramePeriod "inf" } Block { BlockType Constant Name "machine clock4" Position [215, 220, 295, 250] ShowName off Value "0.5" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "double" OutDataType "sfix(16)" ConRadixGroup "Use specified scaling" OutScaling "2^-2" SampleTime "inf" FramePeriod "inf" } Line { SrcBlock "Constant" SrcPort 1 Points [90, 0] Branch { DstBlock "Data Type Conversion4" DstPort 1 } Branch { Points [0, 50] DstBlock "Divide1" DstPort 1 } } Line { SrcBlock "Data Type Conversion4" SrcPort 1 DstBlock "Goto1" DstPort 1 } Line { SrcBlock "Input Capture" SrcPort 3 DstBlock "Data Type Conversion" DstPort 1 } Line { SrcBlock "counter_reset" SrcPort 1 Points [35, 0] DstBlock "Switch1" DstPort 1 } Line { SrcBlock "Switch1" SrcPort 1 Points [15, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "machine clock1" SrcPort 1 DstBlock "Relational\nOperator" DstPort 2 } Line { SrcBlock "Sum" SrcPort 1 Points [50, 0; 0, 135] DstBlock "Unit Delay1" DstPort 1 } Line { SrcBlock "Unit Delay1" SrcPort 1 Points [-65, 0] Branch { Points [0, 80] DstBlock "Relational\nOperator" DstPort 1 } Branch { DstBlock "Switch1" DstPort 3 } } Line { SrcBlock "Data Type Conversion" SrcPort 1 DstBlock "Sum" DstPort 1 } Line { SrcBlock "Relational\nOperator" SrcPort 1 Points [50, 0; 0, -15] Branch { Points [0, -50; -195, 0; 0, -75] DstBlock "Switch1" DstPort 2 } Branch { DstBlock "Digital Output Write" DstPort 1 } } Line { SrcBlock "From1" SrcPort 1 DstBlock "PWM Motor Output" DstPort 1 } Line { SrcBlock "machine clock4" SrcPort 1 DstBlock "Divide1" DstPort 2 } Line { SrcBlock "Divide1" SrcPort 1 DstBlock "Data Type Conversion3" DstPort 1 } Line { SrcBlock "Data Type Conversion3" SrcPort 1 DstBlock "Goto2" DstPort 1 } Line { SrcBlock "From2" SrcPort 1 DstBlock "PWM Motor Output" DstPort 2 } Line { SrcBlock "Input Capture1" SrcPort 3 DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "counter_reset1" SrcPort 1 Points [35, 0] DstBlock "Switch2" DstPort 1 } Line { SrcBlock "Switch2" SrcPort 1 Points [15, 0] DstBlock "Sum1" DstPort 2 } Line { SrcBlock "machine clock3" SrcPort 1 DstBlock "Relational\nOperator1" DstPort 2 } Line { SrcBlock "Sum1" SrcPort 1 Points [50, 0; 0, 135] DstBlock "Unit Delay2" DstPort 1 } Line { SrcBlock "Unit Delay2" SrcPort 1 Points [-65, 0] Branch { DstBlock "Switch2" DstPort 3 } Branch { Points [0, 80] DstBlock "Relational\nOperator1" DstPort 1 } } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Sum1" DstPort 1 } Line { SrcBlock "Relational\nOperator1" SrcPort 1 Points [50, 0; 0, -15] Branch { Points [0, -50; -195, 0; 0, -75] DstBlock "Switch2" DstPort 2 } Branch { DstBlock "Digital Output Write1" DstPort 1 } } Line { SrcBlock "From4" SrcPort 1 DstBlock "PWM Motor Output1" DstPort 2 } Line { SrcBlock "From3" SrcPort 1 DstBlock "PWM Motor Output1" DstPort 1 } Line { SrcBlock "Input Capture" SrcPort 1 DstBlock "Terminator" DstPort 1 } Line { SrcBlock "Input Capture" SrcPort 2 DstBlock "Terminator1" DstPort 1 } Line { SrcBlock "Input Capture1" SrcPort 1 DstBlock "Terminator2" DstPort 1 } Line { SrcBlock "Input Capture1" SrcPort 2 DstBlock "Terminator3" DstPort 1 } Annotation { Position [66, 161] UseDisplayTextAsClickCallback off } Annotation { Position [119, 162] UseDisplayTextAsClickCallback off } Annotation { Position [590, 259] UseDisplayTextAsClickCallback off } } }