Model { Name FlexBoard_Blinking_Led Version 6.4 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.143" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1252" SaveDefaultBlockParams on SampleTimeColors on LibraryLinkDisplay "none" WideLines on ShowLineDimensions on ShowPortDataTypes on ShowLoopsOnError on IgnoreBidirectionalLines off ShowStorageClass off ShowTestPointIcons on ShowViewerIcons on SortedOrder on 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 "Thu Nov 02 00:36:52 2006" Creator "Lubin" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Lubin" ModifiedDateFormat "%" LastModifiedDate "Sun Jun 15 16:35:25 2008" 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 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 "10.0" AbsTol "auto" FixedStep "0.002" 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 off AutoInsertRateTranBlk off SampleTimeConstraint "Unconstrained" RateTranMode "Deterministic" } Simulink.DataIOCC { $ObjectID 3 Version "1.4.0" Decimation "1" ExternalInput "[t, u]" FinalStateName "xFinal" InitialState "xInitial" LimitDataPoints on MaxDataPoints "1000" LoadExternalInput off LoadInitialState off SaveFinalState off SaveFormat "Array" SaveOutput off SaveState off SignalLogging on InspectSignalLogs off SaveTime off StateSaveName "xout" TimeSaveName "tout" OutputSaveName "yout" SignalLoggingName "logsout" OutputOption "RefineOutputTimes" OutputTimes "[]" Refine "1" } Simulink.OptimizationCC { $ObjectID 4 Version "1.4.0" BlockReduction on BooleanDataType on ConditionallyExecuteInputs on InlineParams on InlineInvariantSignals on OptimizeBlockIOStorage on BufferReuse on EnforceIntegerDowncast off ExpressionFolding on FoldNonRolledExpr on LocalBlockOutputs on RollThreshold 5 SystemCodeInlineAuto off StateBitsets on DataBitsets on UseTempVars on ZeroExternalMemoryAtStartup off ZeroInternalMemoryAtStartup off InitFltsAndDblsToZero off NoFixptDivByZeroProtection on EfficientFloat2IntCast on OptimizeModelRefInitCode on LifeSpan "1" BufferReusableBoundary on } Simulink.DebuggingCC { $ObjectID 5 Version "1.4.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.4.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.4.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.4.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-time)" GenerateReport on SaveLog off RTWVerbose off RetainRTWFile off ProfileTLC off TLCDebug off TLCCoverage off TLCAssert off ProcessScriptMode "Default" ConfigurationMode "Optimized" ProcessScript "dspic_make_rtw_hook" ConfigAtBuild off IncludeHyperlinkInReport on LaunchReport on TargetLang "C" IncludeBusHierarchyInRTWFileBlockHierarchyMap off IncludeERTFirstTime off Array { Type "Handle" Dimension 2 Simulink.CodeAppCC { $ObjectID 9 Version "1.4.0" ForceParamTrailComments on GenerateComments on IgnoreCustomStorageClasses off IncHierarchyInIds off MaxIdLength 31 PreserveName off PreserveNameWithParent off ShowEliminatedStatement off IncAutoGenComments off SimulinkDataObjDesc on SFDataObjDesc off IncDataTypeInIds off MangleLength 1 CustomSymbolStrGlobalVar "rt$N$M" CustomSymbolStrType "$N$M" CustomSymbolStrField "$N$M" CustomSymbolStrFcn "$N$M$F" CustomSymbolStrBlkIO "rtb_$N$M" CustomSymbolStrTmpVar "$N$M" CustomSymbolStrMacro "$N$M" DefineNamingRule "None" ParamNamingRule "None" SignalNamingRule "None" InsertBlockDesc on 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.4.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off CompOptLevelCompliant 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" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off AutosarCompliant off 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.4.0" TargetFcnLib "ansi_tfl_tmw.mat" TargetLibSuffix "" TargetPreCompLibLocation "" GenFloatMathFcnCalls "ANSI_C" UtilityFuncGeneration "Auto" GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant off CompOptLevelCompliant 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" PortableWordSizes off ModelStepFunctionPrototypeControlCompliant off AutosarCompliant off GenerateErtSFunction off 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" ModuleNamingRule "Unspecified" SignalDisplayLevel 10 ParamTuneLevel 10 GlobalDataDefinition "Auto" DataDefinitionFile "global.c" GlobalDataReference "Auto" DataReferenceFile "global.h" GRTInterface off PreserveExpressionOrder off PreserveIfCondition 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:\\PROGRA~1\\MATLAB\\R2008a\\bin\\win32\\gmake" } CustomProperty { DataType "string" Name "OPTIM_GCC" Value "-mcpu=33fJ256MC710 -O3 -fschedule-insns -fschedule-insns2" } 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~1\\support\\dsPIC33F\\gld\\p33fJ256MC710.gld" } CustomProperty { DataType "string" Name "LDLIBPIC" Value "C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\lib\\libpic30-coff.a C:\\PROGRA~1\\MICROC~1\\MPLAB" "C~1\\lib\\dsPIC33F\\libp33fJ256MC710-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\lib\\libc-coff.a C:\\PR" "OGRA~1\\MICROC~1\\MPLABC~1\\lib\\libm-coff.a" } CustomProperty { DataType "string" Name "PIC_INCLUDES" Value "-I C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\include" } CustomProperty { DataType "string" Name "PIC_REF" Value "33fJ256MC710" } } PropName "Components" } } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 " CurrentDlgPage "Solver" SimulationMode "normal" } 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 DataStoreMemory ReadBeforeWriteMsg "none" WriteAfterWriteMsg "none" WriteAfterReadMsg "none" StateMustResolveToSignalObject off ShowAdditionalParam off DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" SignalType "auto" } Block { BlockType DataStoreRead } Block { BlockType DataStoreWrite } Block { BlockType DataTypeConversion OutDataTypeMode "Inherit via back propagation" OutDataType "fixdt(1,16,0)" OutScaling "[]" LockScale off ConvertRealWorld "Real World Value (RWV)" RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType EnablePort StatesWhenEnabling "held" ShowOutputPort off ZeroCross on } Block { BlockType Ground } Block { BlockType Inport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" SignalType "auto" SamplingMode "auto" LatchByDelayingOutsideSignal off LatchByCopyingInsideSignal off Interpolate on } Block { BlockType Outport Port "1" UseBusObject off BusObject "BusObject" BusOutputAsStruct off PortDimensions "-1" SampleTime "-1" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" SignalType "auto" SamplingMode "auto" OutputWhenDisabled "held" InitialOutput "[]" } Block { BlockType Product Inputs "2" Multiplication "Element-wise(.*)" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" LockScale off RndMeth "Zero" SaturateOnIntegerOverflow on SampleTime "-1" } Block { BlockType RateTransition Integrity on Deterministic on X0 "0" OutPortSampleTimeOpt "Specify" OutPortSampleTimeMultiple "1" OutPortSampleTime "-1" } Block { BlockType SignalSpecification Dimensions "-1" SampleTime "-1" DataType "auto" OutDataType "fixdt(1,16,0)" OutScaling "[]" SignalType "auto" SamplingMode "auto" } Block { BlockType "S-Function" FunctionName "system" SFunctionModules "''" PortCounts "[]" SFunctionDeploymentMode off } Block { BlockType SubSystem ShowPortLabels "on" Permissions "ReadWrite" PermitHierarchicalResolution "All" TreatAsAtomicUnit off CheckFcnCallInpInsideContextMsg off SystemSampleTime "-1" RTWFcnNameOpts "Auto" RTWFileNameOpts "Auto" SimViewingDevice off DataTypeOverride "UseLocalSettings" MinMaxOverflowLogging "UseLocalSettings" } Block { BlockType Sum IconShape "rectangular" Inputs "++" InputSameDT on OutDataTypeMode "Same as first input" OutDataType "fixdt(1,16,0)" OutScaling "[]" 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" } Block { BlockType Constant Value "1" VectorParams1D on SamplingMode "Sample based" OutDataTypeMode "Inherit from 'Constant value'" OutDataType "fixdt(1,16,0)" ConRadixGroup "Use specified scaling" OutScaling "[]" SampleTime "inf" FramePeriod "inf" } Block { BlockType RelationalOperator Operator ">=" InputSameDT on LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimization)" LogicDataType "uint(8)" ZeroCross on SampleTime "-1" } Block { BlockType Sin SineType "Time based" TimeSource "Use simulation time" Amplitude "1" Bias "0" Frequency "1" Phase "0" Samples "10" Offset "0" SampleTime "-1" VectorParams1D on } } 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 FlexBoard_Blinking_Led Location [191, 145, 889, 605] Open off ModelBrowserVisibility off 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 "100" ReportName "simulink-default.rpt" Block { BlockType Reference Name "0.5Hz" Ports [0, 1] Position [30, 125, 60, 155] SourceBlock "simulink/Sources/Counter\nFree-Running" SourceType "Counter Free-Running" ShowPortLabels "on" SystemSampleTime "-1" NumBits "1" tsamp ".25" } Block { BlockType Reference Name "Blinking Orange Led @ 0.5Hz" Tag "dsPIC_Digital_Output" Ports [1] Position [255, 117, 380, 163] Priority "5" SourceBlock "dsPICdrivers/Digital I//O/Digital Output Write" SourceType "" PORT "B" Simultaneous off OrderingInOutPopup "None" } Block { BlockType Reference Name "Calculus Time Step" Tag "dsPIC_CalculusTimeStep" Ports [0, 1] Position [225, 350, 350, 390] SourceBlock "dsPICdrivers/OTHERS/Calculus Time Step" SourceType "Calculation Time" SampleTime "-1" PR1chk off } Block { BlockType Reference Name "Configure Model \nfor dsPIC" Ports [] Position [143, 15, 255, 71] BackgroundColor "yellow" DropShadow on SourceBlock "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC" SourceType "" } Block { BlockType DataStoreMemory Name "Data Store\nMemory1" Position [555, 75, 619, 101] DataStoreName "Variable62" ReadBeforeWriteMsg "warning" WriteAfterWriteMsg "warning" WriteAfterReadMsg "warning" RTWStateStorageClass "Auto" VectorParams1D on DataType "uint8" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType DataStoreMemory Name "Data Store\nMemory2" Position [485, 75, 549, 101] DataStoreName "Variable61" ReadBeforeWriteMsg "warning" WriteAfterWriteMsg "warning" WriteAfterReadMsg "warning" InitialValue "1" RTWStateStorageClass "Auto" VectorParams1D on DataType "uint8" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType DataStoreMemory Name "Data Store\nMemory3" Position [415, 75, 479, 101] DataStoreName "Variable60" ReadBeforeWriteMsg "warning" WriteAfterWriteMsg "warning" WriteAfterReadMsg "warning" InitialValue "255" RTWStateStorageClass "Auto" VectorParams1D on DataType "uint8" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType DataStoreRead Name "Data Store\nRead1" Position [230, 283, 305, 317] DataStoreName "Variable61" SampleTime ".01" } Block { BlockType DataStoreRead Name "Data Store\nRead2" Position [385, 383, 460, 417] DataStoreName "Variable62" SampleTime ".01" } Block { BlockType DataStoreRead Name "Data Store\nRead4" Position [15, 313, 90, 347] DataStoreName "Variable60" SampleTime ".01" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" Position [125, 123, 195, 157] OutDataTypeMode "boolean" OutDataType "sfix(16)" OutScaling "2^0" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" Position [120, 318, 170, 342] ShowName off OutDataTypeMode "double" OutDataType "sfix(16)" OutScaling "2^0" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion3" Position [305, 223, 355, 247] ShowName off OutDataTypeMode "int16" OutDataType "sfix(16)" OutScaling "2^0" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Master" Tag "dsPIC_MASTER" Ports [] Position [14, 15, 114, 65] BackgroundColor "lightBlue" DropShadow on Priority "1" List { ListType RTWdata NumBusyPort "-1" } SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "33fJ256MC710" fcy "9200000" Quartz_33f "4e6" PLLActive_33f on fcyDesired_33f "9.2e6" tmr1 "[1 18399 0]" tmr1Info "Time Step : 0.002 ; Error : 0% PR1=18399" tmr2345 "[0 0 0 0 0 0 0 0]" tmr2345cfg "[-1 -1 -1 -1 -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 0 0 0 0 0 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 4 5 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 49151 65535 65535 65535 65535 65535 ]" ADPCFG "16384" MasterBusyPort "None" MasterOverloadPort "None" FOSC "Quartz (XT - HS)" TempProtection_33f "TEMP_ON" FPBOR "" PWRT "32ms" MCLR "" PowerSave off } Block { BlockType Product Name "Product" Ports [2, 1] Position [220, 217, 250, 248] InputSameDT off OutDataTypeMode "Inherit via internal rule" OutDataType "sfix(16)" OutScaling "2^0" SaturateOnIntegerOverflow off } Block { BlockType RateTransition Name "Rate Transition" Position [179, 260, 201, 290] Orientation "up" Integrity off Deterministic off } Block { BlockType RateTransition Name "Rate Transition1" Position [355, 289, 380, 311] Integrity off Deterministic off } Block { BlockType RateTransition Name "Rate Transition2" Position [479, 355, 501, 380] Orientation "up" Integrity off Deterministic off } Block { BlockType Reference Name "Rx Input2" Tag "dsPIC_RX" Ports [0, 2] Position [415, 166, 485, 204] Priority "5" SourceBlock "dsPICdrivers/Serial PORT/Rx Input" SourceType "Rx" UART "1" SampleTime ".01" BlockingFctChk off OutputDefault "0" IsPresentFlagChk on } Block { BlockType Sin Name "Sine Wave" Ports [0, 1] Position [25, 210, 55, 240] SineType "Sample based" Frequency "6" Samples "500" SampleTime ".002" } Block { BlockType Switch Name "Switch" Position [420, 263, 455, 337] Criteria "u2 ~= 0" InputSameDT off SaturateOnIntegerOverflow off } Block { BlockType Reference Name "TX Output Multiplexed\nfor Matlab / Labview1" Tag "dsPIC_TX_Multiplexed" Ports [2] Position [530, 288, 680, 332] Priority "5" SourceBlock "dsPICdrivers/Serial PORT/TX Output Multiplexed\nfor Matlab // Labview" SourceType "send structured data frame to Matlab / Labview" UART "1" CleverSpreadingChk on CleverSpreading "1" CHANNEL "[0 1 ]" CHANNELBLOCKED "[]" CHANNELBLOCKED_BITEWISE "0" Status "OK" } Block { BlockType Reference Name "UART Configuration" Tag "dsPIC_config_UART" Ports [] Position [390, 15, 491, 45] BackgroundColor "lightBlue" Priority "2" List { ListType RTWdata RxBufferSize "32" } SourceBlock "dsPICdrivers/Serial PORT/UART Configuration" SourceType "Configure UART" UART "1" proposed_BAUD "115200" ALT_TX_RX off InterruptTxWhen "When Transmit Buffer is empty" TXInterruptPri "1" TxBufferSize "32" TXEN on InterruptRxWhen "When Receive Buffer is 3/4 full (contain 3 characters)" RXInterruptPri "5" RxBufferSize "32" BAUD "115200" UxBRG "4" Info "UxBRG = 4 || Real Baud : 115000 || % error : -0.17361 || max 23 Bytes / Step" RealBaud "0" } Block { BlockType SubSystem Name "Variables" Ports [1, 0, 1] Position [565, 154, 665, 196] TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Variables" Location [320, 510, 1153, 900] Open off ModelBrowserVisibility off 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 "100" Block { BlockType Inport Name "In1" Position [110, 103, 140, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType EnablePort Name "Enable" Ports [] Position [235, 20, 255, 40] } Block { BlockType Reference Name "Compare" Ports [1, 1] Position [290, 125, 320, 155] Orientation "down" NamePlacement "alternate" SourceBlock "simulink/Logic and Bit\nOperations/Compare\nTo Constant" SourceType "Compare To Constant" ShowPortLabels "on" SystemSampleTime "-1" relop "==" const "60" LogicOutDataTypeMode "boolean" ZeroCross off } Block { BlockType Reference Name "Compare1" Ports [1, 1] Position [470, 125, 500, 155] Orientation "down" NamePlacement "alternate" SourceBlock "simulink/Logic and Bit\nOperations/Compare\nTo Constant" SourceType "Compare To Constant" ShowPortLabels "on" SystemSampleTime "-1" relop "==" const "61" LogicOutDataTypeMode "boolean" ZeroCross off } Block { BlockType Reference Name "Compare2" Ports [1, 1] Position [645, 125, 675, 155] Orientation "down" NamePlacement "alternate" SourceBlock "simulink/Logic and Bit\nOperations/Compare\nTo Constant" SourceType "Compare To Constant" ShowPortLabels "on" SystemSampleTime "-1" relop "==" const "61" LogicOutDataTypeMode "boolean" ZeroCross off } Block { BlockType SubSystem Name "Enabled\nSubsystem" Ports [1, 0, 1] Position [255, 216, 355, 244] TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Enabled\nSubsystem" Location [439, 155, 937, 455] Open off ModelBrowserVisibility off 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 "100" Block { BlockType Inport Name "In1" Position [110, 103, 140, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType EnablePort Name "Enable" Ports [] Position [235, 20, 255, 40] } Block { BlockType DataStoreWrite Name "Data Store\nWrite2" Position [220, 83, 355, 137] DataStoreName "Variable60" SampleTime "-1" } Line { SrcBlock "In1" SrcPort 1 DstBlock "Data Store\nWrite2" DstPort 1 } } } Block { BlockType SubSystem Name "Enabled\nSubsystem1" Ports [1, 0, 1] Position [435, 216, 535, 244] TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Enabled\nSubsystem1" Location [439, 155, 937, 455] Open off ModelBrowserVisibility off 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 "100" Block { BlockType Inport Name "In1" Position [110, 103, 140, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType EnablePort Name "Enable" Ports [] Position [235, 20, 255, 40] } Block { BlockType DataStoreWrite Name "Data Store\nWrite2" Position [220, 83, 355, 137] DataStoreName "Variable61" SampleTime "-1" } Line { SrcBlock "In1" SrcPort 1 DstBlock "Data Store\nWrite2" DstPort 1 } } } Block { BlockType SubSystem Name "Enabled\nSubsystem2" Ports [1, 0, 1] Position [610, 216, 710, 244] TreatAsAtomicUnit on MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Enabled\nSubsystem2" Location [439, 155, 937, 455] Open off ModelBrowserVisibility off 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 "100" Block { BlockType Inport Name "In1" Position [110, 103, 140, 117] IconDisplay "Port number" OutDataType "sfix(16)" OutScaling "2^0" } Block { BlockType EnablePort Name "Enable" Ports [] Position [235, 20, 255, 40] } Block { BlockType DataStoreWrite Name "Data Store\nWrite2" Position [220, 83, 355, 137] DataStoreName "Variable62" SampleTime "-1" } Line { SrcBlock "In1" SrcPort 1 DstBlock "Data Store\nWrite2" DstPort 1 } } } Block { BlockType UnitDelay Name "Unit Delay" Position [195, 93, 230, 127] SampleTime "-1" } Line { SrcBlock "Compare2" SrcPort 1 DstBlock "Enabled\nSubsystem2" DstPort enable } Line { SrcBlock "In1" SrcPort 1 Points [15, 0] Branch { DstBlock "Unit Delay" DstPort 1 } Branch { Points [0, 115] Branch { Points [0, 65; 245, 0] Branch { Points [175, 0; 0, -60] DstBlock "Enabled\nSubsystem2" DstPort 1 } Branch { Points [0, -60] DstBlock "Enabled\nSubsystem1" DstPort 1 } } Branch { Points [0, 5] DstBlock "Enabled\nSubsystem" DstPort 1 } } } Line { SrcBlock "Unit Delay" SrcPort 1 Points [70, 0] Branch { Points [180, 0] Branch { DstBlock "Compare2" DstPort 1 } Branch { DstBlock "Compare1" DstPort 1 } } Branch { DstBlock "Compare" DstPort 1 } } Line { SrcBlock "Compare" SrcPort 1 DstBlock "Enabled\nSubsystem" DstPort enable } Line { SrcBlock "Compare1" SrcPort 1 DstBlock "Enabled\nSubsystem1" DstPort enable } } } Block { BlockType Reference Name "dbl-click to open\nGraphical interface" Ports [] Position [285, 15, 363, 48] BackgroundColor "cyan" SourceBlock "dsPICdrivers/Serial PORT/dbl-click to open\nGraphical interface" SourceType "" ShowPortLabels "on" SystemSampleTime "-1" Nothing "0" } Line { SrcBlock "0.5Hz" SrcPort 1 DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Blinking Orange Led @ 0.5Hz" DstPort 1 } Line { SrcBlock "Rx Input2" SrcPort 1 DstBlock "Variables" DstPort 1 } Line { SrcBlock "Rx Input2" SrcPort 2 Points [50, 0; 0, -56] DstBlock "Variables" DstPort enable } Line { SrcBlock "Sine Wave" SrcPort 1 DstBlock "Product" DstPort 1 } Line { SrcBlock "Data Store\nRead4" SrcPort 1 DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 Points [15, 0] DstBlock "Rate Transition" DstPort 1 } Line { SrcBlock "Product" SrcPort 1 DstBlock "Data Type Conversion3" DstPort 1 } Line { SrcBlock "Data Store\nRead1" SrcPort 1 DstBlock "Rate Transition1" DstPort 1 } Line { SrcBlock "Switch" SrcPort 1 DstBlock "TX Output Multiplexed\nfor Matlab / Labview1" DstPort 1 } Line { SrcBlock "Data Type Conversion3" SrcPort 1 Points [35, 0; 0, 40] DstBlock "Switch" DstPort 1 } Line { SrcBlock "Calculus Time Step" SrcPort 1 Points [30, 0; 0, -45] DstBlock "Switch" DstPort 3 } Line { SrcBlock "Data Store\nRead2" SrcPort 1 Points [25, 0] DstBlock "Rate Transition2" DstPort 1 } Line { SrcBlock "Rate Transition" SrcPort 1 Points [0, -15] DstBlock "Product" DstPort 2 } Line { SrcBlock "Rate Transition1" SrcPort 1 DstBlock "Switch" DstPort 2 } Line { SrcBlock "Rate Transition2" SrcPort 1 Points [0, -30] DstBlock "TX Output Multiplexed\nfor Matlab / Labview1" DstPort 2 } } }