Model { Name "ex8" Version 7.6 MdlSubVersion 0 GraphicalInterface { NumRootInports 0 NumRootOutports 0 ParameterArgumentNames "" ComputedModelVersion "1.130" NumModelReferences 0 NumTestPointedSignals 0 } SavedCharacterEncoding "windows-1255" SaveDefaultBlockParams on ScopeRefreshTime 0.035000 OverrideScopeRefreshTime on DisableAllScopes off DataTypeOverride "UseLocalSettings" DataTypeOverrideAppliesTo "AllNumericTypes" MinMaxOverflowLogging "UseLocalSettings" MinMaxOverflowArchiveMode "Overwrite" MaxMDLFileLineLength 120 Created "Fri Dec 16 08:52:35 2011" Creator "Lior" UpdateHistory "UpdateHistoryNever" ModifiedByFormat "%" LastModifiedBy "Lior" ModifiedDateFormat "%" LastModifiedDate "Mon Jan 02 16:32:14 2012" RTWModifiedTimeStamp 247406640 ModelVersionFormat "1.%" ConfigurationManager "None" SampleTimeColors off SampleTimeAnnotations off LibraryLinkDisplay "none" WideLines off ShowLineDimensions off ShowPortDataTypes on 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 off 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 off BooleanDataType on ConditionallyExecuteInputs on InlineParams on UseIntDivNetSlope off UseSpecifiedMinMax off InlineInvariantSignals off OptimizeBlockIOStorage on BufferReuse off 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 "1" 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" Array { Type "Cell" Dimension 2 Cell "ProdHWDeviceType" Cell "ProdEqTarget" PropName "DisabledProps" } ProdBitPerChar 8 ProdBitPerShort 16 ProdBitPerInt 16 ProdBitPerLong 32 ProdBitPerFloat 32 ProdBitPerDouble 64 ProdBitPerPointer 16 ProdLargestAtomicInteger "Char" ProdLargestAtomicFloat "None" ProdIntDivRoundTo "Undefined" ProdEndianess "LittleEndian" ProdWordSize 16 ProdShiftRightIntArith on ProdHWDeviceType "16-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.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" Array { Type "Cell" Dimension 1 Cell "TargetLang" PropName "DisabledProps" } SystemTargetFile "dspic.tlc" GenCodeOnly off MakeCommand "make_CreateMPLAB" GenerateMakefile on TemplateMakefile "dspic_pic30_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 "dspic_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 6 Cell "GenerateSampleERTMain" Cell "MatFileLogging" Cell "SupportNonInlinedSFcns" Cell "UtilityFuncGeneration" Cell "IncludeMdlTerminateFcn" Cell "ModelReferenceCompliant" 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 on ParMdlRefBuildCompliant off CompOptLevelCompliant 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 SystemTargetFile "dspic.tlc" DialogCategory 0 Array { Type "Handle" Dimension 1 Simulink.ERTTargetCC { $BackupClass "Simulink.TargetCC" $ObjectID 12 Version "1.10.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 "" TargetFunctionLibrary "ANSI_C" UtilityFuncGeneration "Auto" ERTMultiwordTypeDef "System defined" ERTCodeCoverageTool "None" ERTMultiwordLength 256 MultiwordLength 2048 GenerateFullHeader on GenerateSampleERTMain off GenerateTestInterfaces off IsPILTarget off ModelReferenceCompliant on ParMdlRefBuildCompliant off CompOptLevelCompliant 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 GenerateErtSFunction off CreateSILPILBlock "None" GenerateASAP2 off ExtMode off ExtModeTransport 0 ExtModeStaticAlloc off ExtModeStaticAllocSize 1000000 ExtModeTesting off ExtModeMexFile "ext_serial_win32_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 "GMAKE_PLACE" Value "C:\\PROGRA~1\\MATLAB\\R2010b\\bin\\win64\\gmake" } CustomProperty { DataType "string" Name "OPTIM_GCC" Value "-mcpu=33fJ256MC710 -O3 -fschedule-insns -fschedule-insns2" } CustomProperty { DataType "string" Name "LDFLAGS" Value " -Xlinker -t -Xlinker --report-mem -Xlinker -Map=../untitled.map -Xlinker --heap=0 -Xlinker -cref" } CustomProperty { DataType "string" Name "LDPICTYPE" Value " -Xlinker --script=C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\support\\dsPIC33F\\gld\\p33fJ256MC710.gld" } CustomProperty { DataType "string" Name "LDLIBPIC" Value " C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\libpic30-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\dsPIC33F\\li" "bp33fJ256MC710-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\libc-coff.a C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\lib\\libm" "-coff.a" } CustomProperty { DataType "string" Name "PIC_INCLUDES" Value " -I C:\\PROGRA~2\\MICROC~1\\MPLABC~1\\include" } CustomProperty { DataType "string" Name "PIC_REF" Value "33fJ256MC710" } CustomProperty { DataType "string" Name "GCCPATH" Value "''" } } PropName "Components" } } PropName "Components" } Name "Configuration" ExtraOptions "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 " CurrentDlgPage "Real-Time Workshop" ConfigPrmDlgPosition " [ 200, 85, 1080, 715 ] " } 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 DiscretePulseGenerator PulseType "Sample based" TimeSource "Use simulation time" Amplitude "1" Period "2" PulseWidth "1" PhaseDelay "0" SampleTime "1" VectorParams1D on } 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" 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 Mux Inputs "4" DisplayOption "none" UseBusObject off BusObject "BusObject" NonVirtualBus off } 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 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" Variant off GeneratePreprocessorConditionals off } } System { Name "ex8" Location [517, 97, 1259, 726] Open on ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" ReportName "simulink-default.rpt" SIDHighWatermark "442" Block { BlockType DiscretePulseGenerator Name "2Hz Clock" SID "1" Ports [0, 1] Position [465, 184, 495, 216] PulseType "Time based" Period "0.2" PulseWidth "50" } Block { BlockType Reference Name "Configuration" SID "2" Ports [] Position [545, 75, 645, 125] BackgroundColor "lightBlue" DropShadow on LibraryVersion "3.44" SourceBlock "dsPICdrivers/Configuration" SourceType "" 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 double64 off } Block { BlockType Reference Name "Configure Model \nfor dsPIC" SID "3" Ports [] Position [100, 69, 212, 125] ForegroundColor "blue" BackgroundColor "yellow" LibraryVersion "3.44" SourceBlock "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC" SourceType "" } Block { BlockType Reference Name "Generate Code" SID "8" Ports [] Position [235, 69, 347, 125] ForegroundColor "blue" BackgroundColor "yellow" DropShadow on LibraryVersion "3.44" SourceBlock "dsPICdrivers/Simulink Configuration/Generate Code" SourceType "" } Block { BlockType SubSystem Name "LED" SID "14" Ports [1] Position [585, 185, 630, 215] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "LED" Location [639, 293, 1009, 385] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "Red" SID "15" Position [25, 38, 55, 52] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion" SID "5" Position [80, 31, 155, 59] ShowName off OutDataTypeStr "boolean" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Red LED" SID "11" Tag "dsPIC_Digital_Output" Ports [1] Position [230, 25, 345, 65] Priority "5" LibraryVersion "3.44" SourceBlock "dsPICdrivers/Digital I//O/Digital Output Write" SourceType "" PORT "E" Pin "[4]" Simultaneous off OrderingInOutPopup "None" } Line { SrcBlock "Data Type Conversion" SrcPort 1 DstBlock "Red LED" DstPort 1 } Line { SrcBlock "Red" SrcPort 1 DstBlock "Data Type Conversion" DstPort 1 } } } Block { BlockType SubSystem Name "Lior's Mux" SID "423" Ports [6, 1] Position [480, 339, 525, 496] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Lior's Mux" Location [922, 312, 1262, 704] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "In1" SID "424" Position [25, 78, 55, 92] IconDisplay "Port number" } Block { BlockType Inport Name "In2" SID "425" Position [25, 128, 55, 142] Port "2" IconDisplay "Port number" } Block { BlockType Inport Name "In3" SID "426" Position [25, 178, 55, 192] Port "3" IconDisplay "Port number" } Block { BlockType Inport Name "In4" SID "428" Position [25, 228, 55, 242] Port "4" IconDisplay "Port number" } Block { BlockType Inport Name "In5" SID "429" Position [25, 278, 55, 292] Port "5" IconDisplay "Port number" } Block { BlockType Inport Name "In6" SID "430" Position [25, 328, 55, 342] Port "6" IconDisplay "Port number" } Block { BlockType Constant Name "Constant" SID "442" Position [180, 27, 210, 43] ShowName off Value "55" OutDataTypeStr "uint8" SampleTime "0.01" } Block { BlockType Mux Name "Mux" SID "368" Ports [7, 1] Position [265, 14, 275, 356] ShowName off Inputs "7" DisplayOption "bar" } Block { BlockType SubSystem Name "convert 2 bytes to vector" SID "369" Ports [1, 1] Position [80, 73, 200, 97] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "convert 2 bytes to vector" Location [567, 425, 1160, 650] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "uint16" SID "370" Position [30, 123, 60, 137] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "371" Position [420, 139, 470, 151] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "372" Position [420, 104, 470, 116] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain" SID "373" Position [270, 74, 325, 106] Gain "1/256" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint8" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Keep high Byte" SID "374" Ports [1, 1] Position [135, 71, 175, 109] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('FF00')" BitMaskRealWorld "Stored Integer" } Block { BlockType Reference Name "Keep low Byte" SID "375" Ports [1, 1] Position [135, 141, 175, 179] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('00FF')" BitMaskRealWorld "Stored Integer" } Block { BlockType Mux Name "Mux1" SID "376" Ports [2, 1] Position [500, 93, 505, 162] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "uint8 " SID "377" Position [550, 123, 580, 137] IconDisplay "Port number" } Line { SrcBlock "uint16" SrcPort 1 Points [15, 0] Branch { Points [0, 30] DstBlock "Keep low Byte" DstPort 1 } Branch { Points [0, -40] DstBlock "Keep high Byte" DstPort 1 } } Line { SrcBlock "Keep high Byte" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [75, 0] DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Keep low Byte" SrcPort 1 Points [225, 0] DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uint8 " DstPort 1 } Annotation { Name "This Block Convert 'uint16' into a vector of two 'uint8'" Position [294, 25] } } } Block { BlockType SubSystem Name "convert 2 bytes to vector1" SID "378" Ports [1, 1] Position [80, 123, 200, 147] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "convert 2 bytes to vector1" Location [567, 425, 1160, 650] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "uint16" SID "379" Position [30, 123, 60, 137] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "380" Position [420, 139, 470, 151] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "381" Position [420, 104, 470, 116] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain" SID "382" Position [270, 74, 325, 106] Gain "1/256" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint8" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Keep high Byte" SID "383" Ports [1, 1] Position [135, 71, 175, 109] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('FF00')" BitMaskRealWorld "Stored Integer" } Block { BlockType Reference Name "Keep low Byte" SID "384" Ports [1, 1] Position [135, 141, 175, 179] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('00FF')" BitMaskRealWorld "Stored Integer" } Block { BlockType Mux Name "Mux1" SID "385" Ports [2, 1] Position [500, 93, 505, 162] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "uint8 " SID "386" Position [550, 123, 580, 137] IconDisplay "Port number" } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uint8 " DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Keep low Byte" SrcPort 1 Points [225, 0] DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [75, 0] DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Keep high Byte" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "uint16" SrcPort 1 Points [15, 0] Branch { Points [0, -40] DstBlock "Keep high Byte" DstPort 1 } Branch { Points [0, 30] DstBlock "Keep low Byte" DstPort 1 } } Annotation { Name "This Block Convert 'uint16' into a vector of two 'uint8'" Position [294, 25] } } } Block { BlockType SubSystem Name "convert 2 bytes to vector2" SID "387" Ports [1, 1] Position [80, 173, 200, 197] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "convert 2 bytes to vector2" Location [567, 425, 1160, 650] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "uint16" SID "388" Position [30, 123, 60, 137] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "389" Position [420, 139, 470, 151] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "390" Position [420, 104, 470, 116] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain" SID "391" Position [270, 74, 325, 106] Gain "1/256" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint8" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Keep high Byte" SID "392" Ports [1, 1] Position [135, 71, 175, 109] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('FF00')" BitMaskRealWorld "Stored Integer" } Block { BlockType Reference Name "Keep low Byte" SID "393" Ports [1, 1] Position [135, 141, 175, 179] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('00FF')" BitMaskRealWorld "Stored Integer" } Block { BlockType Mux Name "Mux1" SID "394" Ports [2, 1] Position [500, 93, 505, 162] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "uint8 " SID "395" Position [550, 123, 580, 137] IconDisplay "Port number" } Line { SrcBlock "uint16" SrcPort 1 Points [15, 0] Branch { Points [0, 30] DstBlock "Keep low Byte" DstPort 1 } Branch { Points [0, -40] DstBlock "Keep high Byte" DstPort 1 } } Line { SrcBlock "Keep high Byte" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [75, 0] DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Keep low Byte" SrcPort 1 Points [225, 0] DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uint8 " DstPort 1 } Annotation { Name "This Block Convert 'uint16' into a vector of two 'uint8'" Position [294, 25] } } } Block { BlockType SubSystem Name "convert 2 bytes to vector3" SID "396" Ports [1, 1] Position [80, 223, 200, 247] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "convert 2 bytes to vector3" Location [567, 425, 1160, 650] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "uint16" SID "397" Position [30, 123, 60, 137] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "398" Position [420, 139, 470, 151] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "399" Position [420, 104, 470, 116] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain" SID "400" Position [270, 74, 325, 106] Gain "1/256" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint8" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Keep high Byte" SID "401" Ports [1, 1] Position [135, 71, 175, 109] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('FF00')" BitMaskRealWorld "Stored Integer" } Block { BlockType Reference Name "Keep low Byte" SID "402" Ports [1, 1] Position [135, 141, 175, 179] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('00FF')" BitMaskRealWorld "Stored Integer" } Block { BlockType Mux Name "Mux1" SID "403" Ports [2, 1] Position [500, 93, 505, 162] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "uint8 " SID "404" Position [550, 123, 580, 137] IconDisplay "Port number" } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uint8 " DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Keep low Byte" SrcPort 1 Points [225, 0] DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [75, 0] DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Keep high Byte" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "uint16" SrcPort 1 Points [15, 0] Branch { Points [0, -40] DstBlock "Keep high Byte" DstPort 1 } Branch { Points [0, 30] DstBlock "Keep low Byte" DstPort 1 } } Annotation { Name "This Block Convert 'uint16' into a vector of two 'uint8'" Position [294, 25] } } } Block { BlockType SubSystem Name "convert 2 bytes to vector4" SID "405" Ports [1, 1] Position [80, 273, 200, 297] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "convert 2 bytes to vector4" Location [567, 425, 1160, 650] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "uint16" SID "406" Position [30, 123, 60, 137] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "407" Position [420, 139, 470, 151] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "408" Position [420, 104, 470, 116] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain" SID "409" Position [270, 74, 325, 106] Gain "1/256" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint8" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Keep high Byte" SID "410" Ports [1, 1] Position [135, 71, 175, 109] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('FF00')" BitMaskRealWorld "Stored Integer" } Block { BlockType Reference Name "Keep low Byte" SID "411" Ports [1, 1] Position [135, 141, 175, 179] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('00FF')" BitMaskRealWorld "Stored Integer" } Block { BlockType Mux Name "Mux1" SID "412" Ports [2, 1] Position [500, 93, 505, 162] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "uint8 " SID "413" Position [550, 123, 580, 137] IconDisplay "Port number" } Line { SrcBlock "uint16" SrcPort 1 Points [15, 0] Branch { Points [0, 30] DstBlock "Keep low Byte" DstPort 1 } Branch { Points [0, -40] DstBlock "Keep high Byte" DstPort 1 } } Line { SrcBlock "Keep high Byte" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [75, 0] DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Keep low Byte" SrcPort 1 Points [225, 0] DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uint8 " DstPort 1 } Annotation { Name "This Block Convert 'uint16' into a vector of two 'uint8'" Position [294, 25] } } } Block { BlockType SubSystem Name "convert 2 bytes to vector5" SID "414" Ports [1, 1] Position [80, 323, 200, 347] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "convert 2 bytes to vector5" Location [567, 425, 1160, 650] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Inport Name "uint16" SID "415" Position [30, 123, 60, 137] IconDisplay "Port number" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "416" Position [420, 139, 470, 151] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "417" Position [420, 104, 470, 116] ShowName off OutDataTypeStr "uint8" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Gain Name "Gain" SID "418" Position [270, 74, 325, 106] Gain "1/256" ParamDataTypeStr "Inherit: Inherit via internal rule" OutDataTypeStr "uint8" SaturateOnIntegerOverflow off } Block { BlockType Reference Name "Keep high Byte" SID "419" Ports [1, 1] Position [135, 71, 175, 109] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('FF00')" BitMaskRealWorld "Stored Integer" } Block { BlockType Reference Name "Keep low Byte" SID "420" Ports [1, 1] Position [135, 141, 175, 179] LibraryVersion "1.225" SourceBlock "simulink/Logic and Bit\nOperations/Bitwise\nOperator" SourceType "Bitwise Operator" logicop "AND" UseBitMask on NumInputPorts "1" BitMask "hex2dec('00FF')" BitMaskRealWorld "Stored Integer" } Block { BlockType Mux Name "Mux1" SID "421" Ports [2, 1] Position [500, 93, 505, 162] ShowName off Inputs "2" DisplayOption "bar" } Block { BlockType Outport Name "uint8 " SID "422" Position [550, 123, 580, 137] IconDisplay "Port number" } Line { SrcBlock "Mux1" SrcPort 1 DstBlock "uint8 " DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "Mux1" DstPort 2 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 DstBlock "Mux1" DstPort 1 } Line { SrcBlock "Keep low Byte" SrcPort 1 Points [225, 0] DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "Gain" SrcPort 1 Points [75, 0] DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "Keep high Byte" SrcPort 1 DstBlock "Gain" DstPort 1 } Line { SrcBlock "uint16" SrcPort 1 Points [15, 0] Branch { Points [0, -40] DstBlock "Keep high Byte" DstPort 1 } Branch { Points [0, 30] DstBlock "Keep low Byte" DstPort 1 } } Annotation { Name "This Block Convert 'uint16' into a vector of two 'uint8'" Position [294, 25] } } } Block { BlockType Outport Name "Out1" SID "427" Position [300, 178, 330, 192] IconDisplay "Port number" } Line { SrcBlock "In1" SrcPort 1 DstBlock "convert 2 bytes to vector" DstPort 1 } Line { SrcBlock "In2" SrcPort 1 DstBlock "convert 2 bytes to vector1" DstPort 1 } Line { SrcBlock "In3" SrcPort 1 DstBlock "convert 2 bytes to vector2" DstPort 1 } Line { SrcBlock "Mux" SrcPort 1 DstBlock "Out1" DstPort 1 } Line { SrcBlock "In4" SrcPort 1 DstBlock "convert 2 bytes to vector3" DstPort 1 } Line { SrcBlock "In5" SrcPort 1 DstBlock "convert 2 bytes to vector4" DstPort 1 } Line { SrcBlock "In6" SrcPort 1 DstBlock "convert 2 bytes to vector5" DstPort 1 } Line { SrcBlock "Constant" SrcPort 1 DstBlock "Mux" DstPort 1 } Line { SrcBlock "convert 2 bytes to vector" SrcPort 1 DstBlock "Mux" DstPort 2 } Line { SrcBlock "convert 2 bytes to vector1" SrcPort 1 DstBlock "Mux" DstPort 3 } Line { SrcBlock "convert 2 bytes to vector2" SrcPort 1 DstBlock "Mux" DstPort 4 } Line { SrcBlock "convert 2 bytes to vector3" SrcPort 1 DstBlock "Mux" DstPort 5 } Line { SrcBlock "convert 2 bytes to vector4" SrcPort 1 DstBlock "Mux" DstPort 6 } Line { SrcBlock "convert 2 bytes to vector5" SrcPort 1 DstBlock "Mux" DstPort 7 } } } Block { BlockType Reference Name "Master" SID "10" Tag "dsPIC_MASTER" Ports [] Position [394, 75, 494, 125] BackgroundColor "lightBlue" DropShadow on Priority "1" LibraryVersion "3.44" List { ListType RTWdata NumBusyPort "-1" } SourceBlock "dsPICdrivers/Master" SourceType "Master" TimeStepType "Timer1" picType "33fJ256MC710" fcy "7500000" Quartz_33f "15e6" PLLActive_33f off fcyDesired_33f "0" tmr1 "[1 7499 0]" tmr1Info "Time Step : 0.001 ; Error : 0% PR1=7499" 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 8 8 0 0 8 8 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 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 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 65535 65535 65535 65519 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 65535 65535 65535 65535 65535 65535 65535]" } Block { BlockType SubSystem Name "Subsystem1" SID "353" Ports [0, 6] Position [235, 340, 320, 495] MinAlgLoopOccurrences off PropExecContextOutsideSubsystem off RTWSystemCode "Auto" FunctionWithSeparateData off Opaque off RequestExecContextInheritance off MaskHideContents off System { Name "Subsystem1" Location [642, 343, 1125, 640] Open off ModelBrowserVisibility off ModelBrowserWidth 200 ScreenColor "white" PaperOrientation "landscape" PaperPositionMode "auto" PaperType "A4" PaperUnits "centimeters" TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000] TiledPageScale 1 ShowPageBoundaries off ZoomFactor "100" Block { BlockType Reference Name "ADC Input" SID "354" Tag "dsPIC_ADC" Ports [0, 6] Position [25, 29, 130, 261] Priority "5" LibraryVersion "3.44" List { ListType RTWdata DMAChannel "0" } SourceBlock "dsPICdrivers/Peripheral I//O/ADC Input" SourceType "dsPIC : ADC10" ADC_TYPE "12 bits" ADC_MODE "Continuous sampling & get last channel value" NbrSampleStep "1" VoltRefpopup "AVdd - AVss" OutFormatBitspopup "0000 dddd dddd dddd : Integer" InterruptPriority "6" ANCHANNELS "[0 6 1 7 4 5]" MaxName "ANmax = 4095" Rin "1e2" ADCS "9" SAMC "1" Temperature "25" DMAChannel "4" SampleTime "0.004" Status "OK | Tsmp=6.667e-007 | T/Channel=1.000e-005 | Tall=6.000e-005" SSRC "auto convert" } Block { BlockType DataTypeConversion Name "Data Type Conversion1" SID "355" Position [165, 37, 210, 53] ShowName off OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion2" SID "356" Position [165, 77, 210, 93] ShowName off OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion3" SID "357" Position [165, 117, 210, 133] ShowName off OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion4" SID "358" Position [165, 157, 210, 173] ShowName off OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion5" SID "359" Position [165, 197, 210, 213] ShowName off OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType DataTypeConversion Name "Data Type Conversion6" SID "360" Position [165, 237, 210, 253] ShowName off OutDataTypeStr "uint16" RndMeth "Floor" SaturateOnIntegerOverflow off } Block { BlockType Outport Name "X_Acc" SID "361" Position [390, 38, 420, 52] IconDisplay "Port number" } Block { BlockType Outport Name "Y_Acc" SID "362" Position [390, 78, 420, 92] Port "2" IconDisplay "Port number" } Block { BlockType Outport Name "Z_Acc" SID "363" Position [390, 118, 420, 132] Port "3" IconDisplay "Port number" } Block { BlockType Outport Name "X_Gyro" SID "364" Position [390, 158, 420, 172] Port "4" IconDisplay "Port number" } Block { BlockType Outport Name "Y_Gyro" SID "365" Position [390, 198, 420, 212] Port "5" IconDisplay "Port number" } Block { BlockType Outport Name "Z_Gyro" SID "366" Position [390, 238, 420, 252] Port "6" IconDisplay "Port number" } Line { SrcBlock "ADC Input" SrcPort 1 DstBlock "Data Type Conversion1" DstPort 1 } Line { SrcBlock "ADC Input" SrcPort 2 DstBlock "Data Type Conversion2" DstPort 1 } Line { SrcBlock "ADC Input" SrcPort 3 DstBlock "Data Type Conversion3" DstPort 1 } Line { SrcBlock "ADC Input" SrcPort 4 DstBlock "Data Type Conversion4" DstPort 1 } Line { SrcBlock "ADC Input" SrcPort 5 DstBlock "Data Type Conversion5" DstPort 1 } Line { SrcBlock "ADC Input" SrcPort 6 DstBlock "Data Type Conversion6" DstPort 1 } Line { SrcBlock "Data Type Conversion1" SrcPort 1 DstBlock "X_Acc" DstPort 1 } Line { SrcBlock "Data Type Conversion2" SrcPort 1 Points [105, 0; 0, 30; 55, 0] DstBlock "Z_Acc" DstPort 1 } Line { SrcBlock "Data Type Conversion3" SrcPort 1 Points [120, 0; 0, 80] DstBlock "Y_Gyro" DstPort 1 } Line { SrcBlock "Data Type Conversion4" SrcPort 1 Points [15, 0; 0, 70; 145, 0] DstBlock "Z_Gyro" DstPort 1 } Line { SrcBlock "Data Type Conversion5" SrcPort 1 Points [70, 0; 0, -135; 90, 0] DstBlock "Y_Acc" DstPort 1 } Line { SrcBlock "Data Type Conversion6" SrcPort 1 Points [115, 0; 0, -80] DstBlock "X_Gyro" DstPort 1 } } } Block { BlockType Reference Name "Tx Output" SID "431" Tag "dsPIC_TX" Ports [1] Position [590, 404, 660, 436] Priority "5" LibraryVersion "3.44" SourceBlock "dsPICdrivers/Serial PORT/Tx Output" SourceType "Serial Transmition" UART "1" OrderingInOutPopup "None" } Block { BlockType Reference Name "UART Configuration" SID "265" Tag "dsPIC_config_UART" Ports [] Position [105, 163, 205, 213] BackgroundColor "lightBlue" DropShadow on Priority "2" LibraryVersion "3.44" List { ListType RTWdata RxBufferSize "32" DoNotImplementRxInterrupt "0" DoNotImplementTxInterrupt "0" } SourceBlock "dsPICdrivers/Serial PORT/UART Configuration" SourceType "Configure UART" UART "1" proposed_BAUD "115200" BAUD "115200" ALT_TX_RX on InterruptTxWhen "When Transmit Buffer is empty" TXInterruptPri "1" TxBufferSize "32" TXEN on InterruptRxWhen "When Receive Buffer is full (contain 4 characters)" RXInterruptPri "2" RxBufferSize "32" DoNotImplementRxInterrupt off DoNotImplementTxInterrupt off UxBRG "3" Info "UxBRG = 3 || Real Baud : 117188 || % error : 1.7253 || max 11.7188 Bytes / Step" RealBaud "0" ERROR "1.7253" BYTES_STEP "11.7188" } Block { BlockType Reference Name "dbl-click to open\nGraphical interface" SID "267" Ports [] Position [291, 174, 363, 221] DropShadow on LibraryVersion "3.44" SourceBlock "dsPICdrivers/Serial PORT/dbl-click to open\nGraphical interface" SourceType "" Nothing "0" } Line { SrcBlock "2Hz Clock" SrcPort 1 DstBlock "LED" DstPort 1 } Line { SrcBlock "Lior's Mux" SrcPort 1 DstBlock "Tx Output" DstPort 1 } Line { SrcBlock "Subsystem1" SrcPort 1 DstBlock "Lior's Mux" DstPort 1 } Line { SrcBlock "Subsystem1" SrcPort 2 DstBlock "Lior's Mux" DstPort 2 } Line { SrcBlock "Subsystem1" SrcPort 3 DstBlock "Lior's Mux" DstPort 3 } Line { SrcBlock "Subsystem1" SrcPort 4 DstBlock "Lior's Mux" DstPort 4 } Line { SrcBlock "Subsystem1" SrcPort 5 DstBlock "Lior's Mux" DstPort 5 } Line { SrcBlock "Subsystem1" SrcPort 6 DstBlock "Lior's Mux" DstPort 6 } } } # Finite State Machines # # Stateflow Version 7.5 (R2010a) dated Jul 24 2010, 06:19:54 # # Stateflow { machine { id 1 name "ex8" created "17-Dec-2011 15:22:21" isLibrary 0 firstTarget 2 sfVersion 75014000.000003 } target { id 2 name "sfun" description "Default Simulink S-Function Target." machine 1 linkNode [1 0 3] } target { id 3 name "rtw" machine 1 linkNode [1 2 0] } }