Model {
  Name			  "Simurda_CAR4_dsPIC33_ACU44_inverse_direction"
  Version		  7.3
  MdlSubVersion		  0
  GraphicalInterface {
    NumRootInports	    0
    NumRootOutports	    0
    ParameterArgumentNames  ""
    ComputedModelVersion    "1.846"
    NumModelReferences	    0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  "windows-1252"
  SaveDefaultBlockParams  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  Created		  "Wed Mar 14 23:59:06 2007"
  Creator		  "Lubin"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "Matěj"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Wed May 26 14:53:13 2010"
  RTWModifiedTimeStamp	  196786387
  ModelVersionFormat	  "1.%<AutoIncrement:846>"
  ConfigurationManager	  "None"
  SampleTimeColors	  on
  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
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  CovReportOnPause	  on
  CovModelRefEnable	  "Off"
  CovExternalEMLEnable	  off
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating "auto"
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  BufferReuse		  on
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  Array {
    Type		    "Handle"
    Dimension		    1
    Simulink.ConfigSet {
      $ObjectID		      1
      Version		      "1.6.0"
      Array {
	Type			"Handle"
	Dimension		8
	Simulink.SolverCC {
	  $ObjectID		  2
	  Version		  "1.6.0"
	  StartTime		  "0.0"
	  StopTime		  "Inf"
	  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		  "Auto"
	  Solver		  "FixedStepDiscrete"
	  SolverName		  "FixedStepDiscrete"
	  ShapePreserveControl	  "DisableAll"
	  ZeroCrossControl	  "UseLocalSettings"
	  ZeroCrossAlgorithm	  "Nonadaptive"
	  AlgebraicLoopSolver	  "TrustRegion"
	  SolverResetMethod	  "Fast"
	  PositivePriorityOrder	  off
	  AutoInsertRateTranBlk	  off
	  SampleTimeConstraint	  "Unconstrained"
	  InsertRTBMode		  "Whenever possible"
	  SignalSizeVariationType "Allow only fixed size"
	}
	Simulink.DataIOCC {
	  $ObjectID		  3
	  Version		  "1.6.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
	  InspectSignalLogs	  off
	  SaveTime		  on
	  StateSaveName		  "xout"
	  TimeSaveName		  "tout"
	  OutputSaveName	  "yout"
	  SignalLoggingName	  "logsout"
	  OutputOption		  "RefineOutputTimes"
	  OutputTimes		  "[]"
	  Refine		  "1"
	}
	Simulink.OptimizationCC {
	  $ObjectID		  4
	  Version		  "1.6.0"
	  BlockReduction	  on
	  BooleanDataType	  on
	  ConditionallyExecuteInputs on
	  InlineParams		  on
	  InlineInvariantSignals  on
	  OptimizeBlockIOStorage  on
	  BufferReuse		  on
	  EnhancedBackFolding	  off
	  StrengthReduction	  off
	  EnforceIntegerDowncast  on
	  ExpressionFolding	  on
	  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	  on
	  NoFixptDivByZeroProtection off
	  EfficientFloat2IntCast  off
	  EfficientMapNaN2IntZero on
	  OptimizeModelRefInitCode on
	  LifeSpan		  "1"
	  BufferReusableBoundary  on
	  SimCompilerOptimization "Off"
	  AccelVerboseBuild	  off
	}
	Simulink.DebuggingCC {
	  $ObjectID		  5
	  Version		  "1.6.0"
	  RTPrefix		  "error"
	  ConsistencyChecking	  "none"
	  ArrayBoundsChecking	  "none"
	  SignalInfNanChecking	  "none"
	  SignalRangeChecking	  "none"
	  ReadBeforeWriteMsg	  "UseLocalSettings"
	  WriteAfterWriteMsg	  "UseLocalSettings"
	  WriteAfterReadMsg	  "UseLocalSettings"
	  AlgebraicLoopMsg	  "warning"
	  ArtificialAlgebraicLoopMsg "warning"
	  SaveWithDisabledLinksMsg "warning"
	  SaveWithParameterizedLinksMsg	"none"
	  CheckSSInitialOutputMsg on
	  UnderspecifiedInitializationDetection	"Classic"
	  MergeDetectMultiDrivingBlocksExec "none"
	  CheckExecutionContextPreStartOutputMsg off
	  CheckExecutionContextRuntimeOutputMsg	off
	  SignalResolutionControl "TryResolveAllWithWarning"
	  BlockPriorityViolationMsg "warning"
	  MinStepSizeMsg	  "warning"
	  TimeAdjustmentMsg	  "none"
	  MaxConsecutiveZCsMsg	  "error"
	  SolverPrmCheckMsg	  "warning"
	  InheritedTsInSrcMsg	  "warning"
	  DiscreteInheritContinuousMsg "warning"
	  MultiTaskDSMMsg	  "none"
	  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"
	  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"
	  UnknownTsInhSupMsg	  "warning"
	  ModelReferenceDataLoggingMessage "warning"
	  ModelReferenceSymbolNameMessage "warning"
	  ModelReferenceExtraNoncontSigs "error"
	  StateNameClashWarn	  "warning"
	  StrictBusMsg		  "Warning"
	  LoggingUnavailableSignals "error"
	  BlockIODiagnostic	  "none"
	}
	Simulink.HardwareCC {
	  $ObjectID		  6
	  Version		  "1.6.0"
	  Array {
	    Type		    "Cell"
	    Dimension		    2
	    Cell		    "ProdHWDeviceType"
	    Cell		    "ProdEqTarget"
	    PropName		    "DisabledProps"
	  }
	  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.6.0"
	  UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
	  CheckModelReferenceTargetMessage "error"
	  ModelReferenceNumInstancesAllowed "Multi"
	  ModelReferencePassRootInputsByReference on
	  ModelReferenceMinAlgLoopOccurrences off
	}
	Simulink.SFSimCC {
	  $ObjectID		  8
	  Version		  "1.6.0"
	  SFSimEnableDebug	  on
	  SFSimOverflowDetection  on
	  SFSimEcho		  on
	  SimBlas		  on
	  SimUseLocalCustomCode	  off
	  SimBuildMode		  "sf_incremental_build"
	}
	Simulink.RTWCC {
	  $BackupClass		  "Simulink.RTWCC"
	  $ObjectID		  9
	  Version		  "1.6.0"
	  Array {
	    Type		    "Cell"
	    Dimension		    1
	    Cell		    "TargetLang"
	    PropName		    "DisabledProps"
	  }
	  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	  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
	  CustomSource		  "custom_code/circBuffer.c\ncustom_code/ecanFunctions.c\ncustom_code/QEI_Functions.c\ncustom_code/i2"
	  "c_Func2.c"
	  IncludeHyperlinkInReport off
	  LaunchReport		  off
	  TargetLang		  "C"
	  IncludeBusHierarchyInRTWFileBlockHierarchyMap	off
	  IncludeERTFirstTime	  off
	  GenerateTraceInfo	  off
	  GenerateTraceReport	  off
	  GenerateTraceReportSl	  off
	  GenerateTraceReportSf	  off
	  GenerateTraceReportEml  off
	  GenerateCodeInfo	  off
	  RTWCompilerOptimization "Off"
	  CheckMdlBeforeBuild	  "Off"
	  Array {
	    Type		    "Handle"
	    Dimension		    2
	    Simulink.CodeAppCC {
	      $ObjectID		      10
	      Version		      "1.6.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
	      IncDataTypeInIds	      off
	      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
	      UseSimReservedNames     off
	    }
	    Simulink.STFCustomTargetCC {
	      $BackupClass	      "Simulink.TargetCC"
	      $ObjectID		      11
	      Version		      "1.6.0"
	      Array {
		Type			"Cell"
		Dimension		5
		Cell			"GenerateSampleERTMain"
		Cell			"MatFileLogging"
		Cell			"SupportNonInlinedSFcns"
		Cell			"UtilityFuncGeneration"
		Cell			"IncludeMdlTerminateFcn"
		PropName		"DisabledProps"
	      }
	      TargetFcnLib	      "ansi_tfl_table_tmw.mat"
	      TargetLibSuffix	      ""
	      TargetPreCompLibLocation ""
	      TargetFunctionLibrary   "ANSI_C"
	      UtilityFuncGeneration   "Auto"
	      ERTMultiwordTypeDef     "System defined"
	      ERTMultiwordLength      256
	      MultiwordLength	      2048
	      GenerateFullHeader      on
	      GenerateSampleERTMain   off
	      GenerateTestInterfaces  off
	      IsPILTarget	      off
	      ModelReferenceCompliant off
	      ParMdlRefBuildCompliant off
	      CompOptLevelCompliant   off
	      IncludeMdlTerminateFcn  off
	      CombineOutputUpdateFcns on
	      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
	      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.6.0"
		  Array {
		    Type		    "Cell"
		    Dimension		    8
		    Cell		    "GenerateSampleERTMain"
		    Cell		    "GenerateErtSFunction"
		    Cell		    "MatFileLogging"
		    Cell		    "GRTInterface"
		    Cell		    "ERTCustomFileTemplate"
		    Cell		    "SupportNonInlinedSFcns"
		    Cell		    "UtilityFuncGeneration"
		    Cell		    "IncludeMdlTerminateFcn"
		    PropName		    "DisabledProps"
		  }
		  TargetFcnLib		  "ansi_tfl_table_tmw.mat"
		  TargetLibSuffix	  ""
		  TargetPreCompLibLocation ""
		  TargetFunctionLibrary	  "ANSI_C"
		  UtilityFuncGeneration	  "Auto"
		  ERTMultiwordTypeDef	  "System defined"
		  ERTMultiwordLength	  256
		  MultiwordLength	  2048
		  GenerateFullHeader	  on
		  GenerateSampleERTMain	  off
		  GenerateTestInterfaces  off
		  IsPILTarget		  off
		  ModelReferenceCompliant off
		  ParMdlRefBuildCompliant off
		  CompOptLevelCompliant	  off
		  IncludeMdlTerminateFcn  off
		  CombineOutputUpdateFcns on
		  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
		  EnableShiftOperators	  on
		  ParenthesesLevel	  "Nominal"
		  PortableWordSizes	  off
		  ModelStepFunctionPrototypeControlCompliant off
		  CPPClassGenCompliant	  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			"D:\\PROGRA~1\\MATLAB\\R2009a\\bin\\win32\\gmake"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"OPTIM_GCC"
		Value			"-mcpu=33fj128MC804 -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 D:\\PROGRA~1\\MICROC~1\\MPLABC~2\\support\\dsPIC33F\\gld\\p33fj128MC804.gld"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"LDLIBPIC"
		Value			"  D:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libpic30-coff.a D:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\dsPIC33F\\l"
		"ibp33fj128MC804-coff.a D:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\libc-coff.a D:\\PROGRA~1\\MICROC~1\\MPLABC~2\\lib\\lib"
		"m-coff.a"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"PIC_INCLUDES"
		Value			"  -I D:\\PROGRA~1\\MICROC~1\\MPLABC~2\\include"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"PIC_REF"
		Value			"33fj128MC804"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"GCCPATH"
		Value			"''"
	      }
	    }
	    PropName		    "Components"
	  }
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      ExtraOptions	      "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 "
      CurrentDlgPage	      "Real-Time Workshop/Custom Code"
      ConfigPrmDlgPosition    " [ 289, 121, 1031, 830 ] "
    }
    PropName		    "ConfigurationSets"
  }
  Simulink.ConfigSet {
    $PropName		    "ActiveConfigurationSet"
    $ObjectID		    1
  }
  BlockDefaults {
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    NamePlacement	    "normal"
    FontName		    "Arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    ShowName		    on
    BlockRotation	    0
    BlockMirror		    off
  }
  AnnotationDefaults {
    HorizontalAlignment	    "center"
    VerticalAlignment	    "middle"
    ForegroundColor	    "black"
    BackgroundColor	    "white"
    DropShadow		    off
    FontName		    "Arial"
    FontSize		    10
    FontWeight		    "normal"
    FontAngle		    "normal"
    UseDisplayTextAsClickCallback off
  }
  LineDefaults {
    FontName		    "Arial"
    FontSize		    9
    FontWeight		    "normal"
    FontAngle		    "normal"
  }
  BlockParameterDefaults {
    Block {
      BlockType		      Abs
      ZeroCross		      on
      SampleTime	      "-1"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Same as input"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
    }
    Block {
      BlockType		      Constant
      Value		      "1"
      VectorParams1D	      on
      SamplingMode	      "Sample based"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Inherit from 'Constant value'"
      OutDataType	      "fixdt(1,16,0)"
      ConRadixGroup	      "Use specified scaling"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Inherit from 'Constant value'"
      LockScale		      off
      SampleTime	      "inf"
      FramePeriod	      "inf"
    }
    Block {
      BlockType		      DataStoreMemory
      ReadBeforeWriteMsg      "none"
      WriteAfterWriteMsg      "none"
      WriteAfterReadMsg	      "none"
      InitialValue	      "0"
      StateMustResolveToSignalObject off
      ShowAdditionalParam     off
      OutMin		      "[]"
      OutMax		      "[]"
      DataType		      "auto"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      SignalType	      "auto"
    }
    Block {
      BlockType		      DataStoreRead
    }
    Block {
      BlockType		      DataStoreWrite
    }
    Block {
      BlockType		      DataTypeConversion
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Inherit via back propagation"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Inherit via back propagation"
      LockScale		      off
      ConvertRealWorld	      "Real World Value (RWV)"
      RndMeth		      "Zero"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Demux
      Outputs		      "4"
      DisplayOption	      "none"
      BusSelectionMode	      off
    }
    Block {
      BlockType		      DiscretePulseGenerator
      PulseType		      "Sample based"
      TimeSource	      "Use simulation time"
      VectorParams1D	      on
    }
    Block {
      BlockType		      EnablePort
      StatesWhenEnabling      "held"
      SignalSizeVariationType "Allow only fixed size"
      ShowOutputPort	      off
      ZeroCross		      on
    }
    Block {
      BlockType		      From
      IconDisplay	      "Tag"
      TagVisibility	      "local"
    }
    Block {
      BlockType		      Gain
      Gain		      "1"
      Multiplication	      "Element-wise(K.*u)"
      ParamMin		      "[]"
      ParamMax		      "[]"
      ParameterDataTypeMode   "Same as input"
      ParameterDataType	      "fixdt(1,16,0)"
      ParameterScalingMode    "Best Precision: Matrix-wise"
      ParameterScaling	      "[]"
      ParamDataTypeStr	      "Inherit: Same as input"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Same as input"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Goto
      IconDisplay	      "Tag"
    }
    Block {
      BlockType		      Inport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      DataType		      "auto"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      SignalType	      "auto"
      SamplingMode	      "auto"
      LatchByDelayingOutsideSignal off
      LatchByCopyingInsideSignal off
      Interpolate	      on
      DimensionsMode	      "auto"
    }
    Block {
      BlockType		      Logic
      Operator		      "AND"
      Inputs		      "2"
      IconShape		      "rectangular"
      AllPortsSameDT	      on
      OutDataTypeMode	      "Logical (see Configuration Parameters: Optimization)"
      LogicDataType	      "uint(8)"
      OutDataTypeStr	      "Inherit: Logical (see Configuration Parameters: Optimization)"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Memory
      X0		      "0"
      InheritSampleTime	      off
      LinearizeMemory	      off
      LinearizeAsDelay	      off
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
      UseBusObject	      off
      BusObject		      "BusObject"
      NonVirtualBus	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      DataType		      "auto"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      SignalType	      "auto"
      SamplingMode	      "auto"
      SourceOfInitialOutputValue "Dialog"
      OutputWhenDisabled      "held"
      InitialOutput	      "[]"
      DimensionsMode	      "auto"
    }
    Block {
      BlockType		      RateTransition
      Integrity		      on
      Deterministic	      on
      X0		      "0"
      OutPortSampleTimeOpt    "Specify"
      OutPortSampleTimeMultiple	"1"
      OutPortSampleTime	      "-1"
    }
    Block {
      BlockType		      RelationalOperator
      Operator		      ">="
      InputSameDT	      on
      LogicOutDataTypeMode    "Logical (see Configuration Parameters: Optimization)"
      LogicDataType	      "uint(8)"
      OutDataTypeStr	      "Inherit: Logical (see Configuration Parameters: Optimization)"
      ZeroCross		      on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
      SFunctionDeploymentMode off
    }
    Block {
      BlockType		      Saturate
      UpperLimit	      "0.5"
      LowerLimit	      "-0.5"
      LinearizeAsGain	      on
      ZeroCross		      on
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Same as input"
      LockScale		      off
      RndMeth		      "Floor"
    }
    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"
      MinMaxOverflowLogging   "UseLocalSettings"
    }
    Block {
      BlockType		      Sum
      IconShape		      "rectangular"
      Inputs		      "++"
      CollapseMode	      "All dimensions"
      CollapseDim	      "1"
      InputSameDT	      on
      AccumDataTypeStr	      "Inherit: Inherit via internal rule"
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Same as first input"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Same as first input"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Switch
      Criteria		      "u2 >= Threshold"
      Threshold		      "0"
      InputSameDT	      on
      OutMin		      "[]"
      OutMax		      "[]"
      OutDataTypeMode	      "Inherit via internal rule"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: Inherit via internal rule"
      LockScale		      off
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	on
      ZeroCross		      on
      SampleTime	      "-1"
      OutputVariableDimensions off
    }
    Block {
      BlockType		      Terminator
    }
    Block {
      BlockType		      UnitDelay
      X0		      "0"
      SampleTime	      "1"
      StateMustResolveToSignalObject off
      RTWStateStorageClass    "Auto"
    }
  }
  System {
    Name		    "Simurda_CAR4_dsPIC33_ACU44_inverse_direction"
    Location		    [21, 82, 1358, 967]
    Open		    on
    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		      Constant
      Name		      "ADS1015_1"
      Position		      [670, 595, 700, 625]
      BackgroundColor	      "green"
      Value		      "144"
      OutDataTypeMode	      "uint8"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint8"
    }
    Block {
      BlockType		      Constant
      Name		      "ADS1015_2"
      Position		      [670, 645, 700, 675]
      BackgroundColor	      "green"
      Value		      "146"
      OutDataTypeMode	      "uint8"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint8"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Boolean: DISABLE"
      Position		      [20, 559, 127, 593]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "DISABLE"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "boolean"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "boolean"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Configure ECAN 1"
      Ports		      []
      Position		      [153, 100, 261, 150]
      BackgroundColor	      "orange"
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      MaskType		      "Initialize ECAN 1"
      MaskDescription	      "Initializes the ECAN 1 module on the dsPIC33f. Allows for configuration of almost all ECA"
      "N options to produce a usable system."
      MaskPromptString	      "Extended Frames (Standard if unchecked)|Mode|DMA Reception Channel|DMA Transmission Chan"
      "nel|Baud Rate (bps)|Phase Segment 1|Propagation Delay|Phase Segment 2|Sync Jump Width|Time Quanta|Triple-sample|"
      "DMA Buffer Size|Reception Buffers|Transmission Buffers|Buffer 0 Transmission Priority|Buffer 0 Remote Transmit E"
      "nable|Buffer 1 Transmission Priority|Buffer 1 Remote Transmit Enable|Buffer 2 Transmission Priority|Buffer 2 Rem"
      "ote Transmit Enable|Buffer 3 Transmission Priority|Buffer 3 Remote Transmit Enable|Buffer 4 Transmission Priorit"
      "y|Buffer 4 Remote Transmit Enable|Buffer 5 Transmission Priority|Buffer 5 Remote Transmit Enable|Buffer 6 Transm"
      "ission Priority|Buffer 6 Remote Transmit Enable|Buffer 7 Transmission Priority|Buffer 7 Remote Transmit Enable|M"
      "ask 0|Mask 0 Receive Mode|Mask 1|Mask 1 Receive Mode|Mask 2|Mask 2 Receive Mode|Filters|Filter 0|Filter 0 Mask|F"
      "ilter 0 Mode|Filter 0 Buffer|Filter 1|Filter 1 Mask|Filter 1 Mode|Filter 1 Buffer|Filter 2|Filter 2 Mask|Filter "
      "2 Mode|Filter 2 Buffer|Filter 3|Filter 3 Mask|Filter 3 Mode|Filter 3 Buffer|Filter 4|Filter 4 Mask|Filter 4 Mode"
      "|Filter 4 Buffer|Filter 5|Filter 5 Mask|Filter 5 Mode|Filter 5 Buffer|Filter 6|Filter 6 Mask|Filter 6 Mode|Filte"
      "r 6 Buffer|Filter 7|Filter 7 Mask|Filter 7 Mode|Filter 7 Buffer|Filter 8|Filter 8 Mask|Filter 8 Mode|Filter 8 Bu"
      "ffer|Filter 9|Filter 9 Mask|Filter 9 Mode|Filter 9 Buffer|Filter 10|Filter 10 Mask|Filter 10 Mode|Filter 10 Buff"
      "er|Filter 11|Filter 11 Mask|Filter 11 Mode|Filter 11 Buffer|Filter 12|Filter 12 Mask|Filter 12 Mode|Filter 12 Bu"
      "ffer|Filter 13|Filter 13 Mask|Filter 13 Mode|Filter 13 Buffer|Filter 14|Filter 14 Mask|Filter 14 Mode|Filter 14 "
      "Buffer|Filter 15|Filter 15 Mask|Filter 15 Mode|Filter 15 Buffer"
      MaskStyleString	      "checkbox,popup(Disabled|Listen all|Listen only|Loopback|Normal),edit,edit,edit,edit,edit,"
      "edit,popup(1|2|3|4),edit,checkbox,popup(4 buffers|6 buffers|8 buffers|12 buffers|16 buffers|24 buffers|32 buffer"
      "s),edit,edit,popup(Lowest|Low|High|Highest),popup(No|Yes),popup(Lowest|Low|High|Highest),popup(No|Yes),popup(Low"
      "est|Low|High|Highest),popup(No|Yes),popup(Lowest|Low|High|Highest),popup(No|Yes),popup(Lowest|Low|High|Highest),"
      "popup(No|Yes),popup(Lowest|Low|High|Highest),popup(No|Yes),popup(Lowest|Low|High|Highest),popup(No|Yes),popup(Lo"
      "west|Low|High|Highest),popup(No|Yes),edit,popup(Match std or ext|Obey filter mode),edit,popup(Match std or ext|O"
      "bey filter mode),edit,popup(Match std or ext|Obey filter mode),edit,edit,popup(--|0|1|2),popup(Match only standa"
      "rd|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),popup(Match only sta"
      "ndard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),popup(Match only "
      "standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),popup(Match on"
      "ly standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),popup(Match"
      " only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),popup(Ma"
      "tch only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),popup"
      "(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2),po"
      "pup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0|1|2)"
      ",popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(<empty"
      ">),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(--|0"
      "|1|2),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popup(-"
      "-|0|1|2),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,popu"
      "p(--|0|1|2),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edit,p"
      "opup(--|0|1|2),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),edi"
      "t,popup(--|0|1|2),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIFO),"
      "edit,popup(--|0|1|2),popup(Match only standard|Match only extended),popup(0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|FIF"
      "O)"
      MaskTunableValueString  "off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
      ",off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
      ",off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
      ",off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
      MaskCallbackString      "|||||tq = 1 + str2num(get_param(gcb, 'ps1')) + str2num(get_param(gcb, 'pd')) + str2num("
      "get_param(gcb, 'ps2'));\nset_param(gcb, 'tq', int2str(tq));|tq = 1 + str2num(get_param(gcb, 'ps1')) + str2num(ge"
      "t_param(gcb, 'pd')) + str2num(get_param(gcb, 'ps2'));\nset_param(gcb, 'tq', int2str(tq));|tq = 1 + str2num(get_p"
      "aram(gcb, 'ps1')) + str2num(get_param(gcb, 'pd')) + str2num(get_param(gcb, 'ps2'));\nset_param(gcb, 'tq', int2st"
      "r(tq));||||||filters = eval(get_param(gcb,'tx_bufs'));\nmVisibilities = get_param(gcb,'MaskVisibilities');\nmNam"
      "es = get_param(gcb,'MaskNames');\nfor i = 1:size(mNames);\n	n = mNames{i};\n    if size(n,2) > 4 && strcmp(n(1:4"
      "), 'buf_') == 1\n        filterNumber = sscanf(n, 'buf_%d');\n        if isempty(find(filters == filterNumber, 1"
      ")) == 0\n             mVisibilities{i} = 'on';\n        else\n             mVisibilities{i} = 'off';\n        en"
      "d\n    end\nend\nset_param(gcb, 'MaskVisibilities', mVisibilities);|||||||||||||||||||||||filters = eval(get_par"
      "am(gcb,'filters'));\nmVisibilities = get_param(gcb,'MaskVisibilities');\nmNames = get_param(gcb,'MaskNames');\nf"
      "or i = 1:size(mNames);\n	n = mNames{i};\n    if size(n,2) > 7 && strcmp(n(1:7), 'filter_') == 1\n        filterN"
      "umber = sscanf(n, 'filter_%d');\n        if isempty(find(filters == filterNumber, 1)) == 0\n             mVisibi"
      "lities{i} = 'on';\n        else\n             mVisibilities{i} = 'off';\n        end\n    end\nend\nset_param(gc"
      "b, 'MaskVisibilities', mVisibilities);||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||"
      MaskEnableString	      "on,on,on,on,on,on,on,on,on,off,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,"
      "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,o"
      "n,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskVisibilityString    "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,off,off,off,off,off,off,off,off,off,off"
      ",off,off,off,off,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,off,off,off,off,off,off,off,off,off,of"
      "f,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,off,of"
      "f,off,off,off,off,off,off,off,off,off,off,off,off,off,off"
      MaskToolTipString	      "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,"
      "on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,o"
      "n,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
      ",,,,,,,,,,,,,"
      MaskVariables	      "frame_setting=@1;mode=&2;dma_rx_chan=@3;dma_tx_chan=@4;baud=@5;ps1=@6;pd=@7;ps2=@8;sjw=@9;t"
      "q=&10;triple_sample=@11;dma_buf_size=@12;rx_bufs=@13;tx_bufs=@14;buf_0_tx_pri=@15;buf_0_rte=@16;buf_1_tx_pri=@17"
      ";buf_1_rte=@18;buf_2_tx_pri=@19;buf_2_rte=@20;buf_3_tx_pri=@21;buf_3_rte=@22;buf_4_tx_pri=@23;buf_4_rte=@24;buf_"
      "5_tx_pri=@25;buf_5_rte=@26;buf_6_tx_pri=@27;buf_6_rte=@28;buf_7_tx_pri=@29;buf_7_rte=@30;mask_0=@31;mask_0_mide="
      "@32;mask_1=@33;mask_1_mide=@34;mask_2=@35;mask_2_mide=@36;filters=@37;filter_0=@38;filter_0_mask=@39;filter_0_ex"
      "ide=@40;filter_0_buf=@41;filter_1=@42;filter_1_mask=@43;filter_1_exide=@44;filter_1_buf=@45;filter_2=@46;filter_"
      "2_mask=@47;filter_2_exide=@48;filter_2_buf=@49;filter_3=@50;filter_3_mask=@51;filter_3_exide=@52;filter_3_buf=@5"
      "3;filter_4=@54;filter_4_mask=@55;filter_4_exide=@56;filter_4_buf=@57;filter_5=@58;filter_5_mask=@59;filter_5_exi"
      "de=@60;filter_5_buf=@61;filter_6=@62;filter_6_mask=@63;filter_6_exide=@64;filter_6_buf=@65;filter_7=@66;filter_7"
      "_mask=@67;filter_7_exide=@68;filter_7_buf=@69;filter_8=@70;filter_8_mask=@71;filter_8_exide=@72;filter_8_buf=@73"
      ";filter_9=@74;filter_9_mask=@75;filter_9_exide=@76;filter_9_buf=@77;filter_10=@78;filter_10_mask=@79;filter_10_e"
      "xide=@80;filter_10_buf=@81;filter_11=@82;filter_11_mask=@83;filter_11_exide=@84;filter_11_buf=@85;filter_12=@86;"
      "filter_12_mask=@87;filter_12_exide=@88;filter_12_buf=@89;filter_13=@90;filter_13_mask=@91;filter_13_exide=@92;fi"
      "lter_13_buf=@93;filter_14=@94;filter_14_mask=@95;filter_14_exide=@96;filter_14_buf=@97;filter_15=@98;filter_15_m"
      "ask=@99;filter_15_exide=@100;filter_15_buf=@101;"
      MaskInitialization      "parameters = uint16(zeros(53,1));\n\n%% Generate parameter 1\nparameters(1) = frame_set"
      "ting;\nmode_id = 0;\nswitch mode\n    case 'Disabled'\n        mode_id = 1;\n    case 'Loopback'\n        mode_i"
      "d = 2;\n    case 'Listen only'\n        mode_id = 3;\n    case 'Listen all'\n        mode_id = 7;\nend\nparamete"
      "rs(1) = bitor(parameters(1), bitshift(mode_id, 2));\nparameters(1) = bitor(parameters(1), bitshift(dma_rx_chan, "
      "5));\nparameters(1) = bitor(parameters(1), bitshift(dma_tx_chan, 8));\n\n%% Generate parameter 2\nparameters(2) "
      "= baud / 100;\n\n%% Generate parameter 3\nh = find_system(bdroot(gcb),'FollowLinks','on','LookUnderMasks','all',"
      "'Tag','dsPIC_MASTER');\nfcy = 0;\nif ~isempty(h)\n    OverrideFcy = strcmp(get_param(h{1},'OverrideFcy'),'on');\n"
      "    if (OverrideFcy == 1)\n        fcy = str2num(get_param(h{1},'NewFcy'));     %% overridded fcy\n    else\n   "
      "     fcy = str2num(get_param(h{1},'fcy'));\n    end \nend\nparameters(3) = fcy / 1000;\n\n%% Generate parameter "
      "4\nparameters(4) = ps1 - 1;\nparameters(4) = bitor(parameters(4), bitshift(pd - 1, 3));\nparameters(4) = bitor(p"
      "arameters(4), bitshift(ps2 - 1, 6));\nparameters(4) = bitor(parameters(4), bitshift(sjw - 1, 9));\nif triple_sam"
      "ple == 1\n    parameters(4) = bitset(parameters(4),12);\nend\n\n%% Generate parameter 5\nfor k = 1:length(filter"
      "s)\n    parameters(5) = bitset(parameters(5),filters(k)+1);\nend;\n\n% Map filter mask values into proper values"
      "\nfilter_masks = [filter_0_mask; filter_1_mask; filter_2_mask; filter_3_mask; filter_4_mask; filter_5_mask; filt"
      "er_6_mask; filter_7_mask; filter_8_mask; filter_9_mask; filter_10_mask; filter_11_mask; filter_12_mask; filter_1"
      "3_mask; filter_14_mask; filter_15_mask;];\nfilter_masks = filter_masks - 2;\nfilter_masks(filter_masks == -1) = "
      "3;\n\n%% Generate parameters 6 and 7\nfor k = 1:length(filters);\n    filter = filters(k) + 1;\n    if filter < "
      "9\n        parameters(6) = bitor(parameters(6), bitshift(filter_masks(filter),2*(filter-1)));\n    else\n       "
      " parameters(7) = bitor(parameters(7), bitshift(filter_masks(filter),2*(filter-9)));\n    end\nend\n\n% Generate "
      "parameters 8 and 9\nparameters(8) = bitshift(bitand(mask_0,hex2dec('18000000')),-27); % EID17-16\nparameters(8) "
      "= bitor(parameters(8), bitshift(bitand(mask_0,hex2dec('7FF')), 5)); % SID\nparameters(8) = bitor(parameters(8), "
      "bitshift(mask_0_mide - 1, 3)); % MIDE\nparameters(9) = bitshift(bitand(mask_0,hex2dec('7FFF800')),-11); % EID15-"
      "0\n\n%% Generate parameters 10 and 11\nparameters(10) = bitshift(bitand(mask_1,hex2dec('18000000')),-27); % EID1"
      "7-16\nparameters(10) = bitor(parameters(10), bitshift(bitand(mask_1,hex2dec('7FF')), 5)); % SID\nparameters(10) "
      "= bitor(parameters(10), bitshift(mask_1_mide - 1, 3)); % MIDE\nparameters(11) = bitshift(bitand(mask_1,hex2dec('"
      "7FFF800')),-11); % EID15-0\n\n%% Generate parameters 12 and 13\nparameters(12) = bitshift(bitand(mask_2,hex2dec("
      "'18000000')),-27); % EID17-16\nparameters(12) = bitor(parameters(12), bitshift(bitand(mask_2,hex2dec('7FF')), 5)"
      "); % SID\nparameters(12) = bitor(parameters(12), bitshift(mask_2_mide - 1, 3)); % MIDE\nparameters(13) = bitshif"
      "t(bitand(mask_2,hex2dec('7FFF800')),-11); % EID15-0\n\n% Generate parameters 14-17\nbuf_priorities = [buf_0_tx_p"
      "ri;buf_1_tx_pri;buf_2_tx_pri;buf_3_tx_pri;buf_4_tx_pri;buf_5_tx_pri;buf_6_tx_pri;buf_7_tx_pri] - 1;\nbuf_rtes = "
      "[buf_0_rte;buf_1_rte;buf_2_rte;buf_3_rte;buf_4_rte;buf_5_rte;buf_6_rte;buf_7_rte] - 1;\n\n% Create a vector of c"
      "hars to modify\nregs = uint16(zeros(8,1));\n\n% Go through all enabled transmission buffers setting appropriate "
      "bits\nfor b = 1:size(tx_bufs,1)\n    \n    index = tx_bufs(b) + 1;\n    \n    % Set transmission bit\n    regs(i"
      "ndex) = bitset(regs(index),8);\n\n    % Set priority bits\n    regs(index) = bitor(regs(index), buf_priorities(i"
      "ndex));\n\n    % Set remote transmit enable bits\n    if buf_rtes(index) == 1\n        regs(index) = bitset(regs"
      "(index),3);\n    end\nend\n\nfor b = 1:size(rx_bufs,1)\n    \n    index = rx_bufs(b) + 1;\n\n    % Set priority "
      "bits\n    regs(index) = bitor(regs(index), buf_priorities(index));\n\n    % Set remote transmit enable bits\n   "
      " if buf_rtes(index) == 1\n        regs(index) = bitset(regs(index),3);\n    end\nend\n\n% Map our matrix into re"
      "gisters\nparameters(14) = bitor(bitshift(regs(2),8), regs(1));\nparameters(15) = bitor(bitshift(regs(4),8), regs"
      "(3));\nparameters(16) = bitor(bitshift(regs(6),8), regs(5));\nparameters(17) = bitor(bitshift(regs(8),8), regs(7"
      "));\n\n% Map the filter buffer values to corresponding bit values\nfilter_buffers = [filter_0_buf; filter_1_buf;"
      " filter_2_buf; filter_3_buf; filter_4_buf; filter_5_buf; filter_6_buf; filter_7_buf; filter_8_buf; filter_9_buf;"
      " filter_10_buf; filter_11_buf; filter_12_buf; filter_13_buf; filter_14_buf; filter_15_buf;];\nfilter_buffers = f"
      "ilter_buffers - 1;\n\n%% Generate parameter 18\nif bitget(parameters(5),1) == 1\n    parameters(18) = filter_buf"
      "fers(1);\nend\nif bitget(parameters(5),2) == 1\n    parameters(18) = bitor(parameters(18), bitshift(filter_buffe"
      "rs(2), 4));\nend\nif bitget(parameters(5),3) == 1\n    parameters(18) = bitor(parameters(18), bitshift(filter_bu"
      "ffers(3), 8));\nend\nif bitget(parameters(5),4) == 1\n    parameters(18) = bitor(parameters(18), bitshift(filter"
      "_buffers(4), 12));\nend\n\n%% Generate parameter 19\nif bitget(parameters(5),5) == 1\n    parameters(19) = filte"
      "r_buffers(5);\nend\nif bitget(parameters(5),6) == 1\n    parameters(19) = bitor(parameters(19), bitshift(filter_"
      "buffers(6), 4));\nend\nif bitget(parameters(5),7) == 1\n    parameters(19) = bitor(parameters(19), bitshift(filt"
      "er_buffers(7), 8));\nend\nif bitget(parameters(5),8) == 1\n    parameters(19) = bitor(parameters(19), bitshift(f"
      "ilter_buffers(8), 12));\nend\n\n%% Generate parameter 20\nif bitget(parameters(5),9) == 1\n    parameters(20) = "
      "filter_buffers(9);\nend\nif bitget(parameters(5),10) == 1\n    parameters(20) = bitor(parameters(20), bitshift(f"
      "ilter_buffers(10), 4));\nend\nif bitget(parameters(5),11) == 1\n    parameters(20) = bitor(parameters(20), bitsh"
      "ift(filter_buffers(11), 8));\nend\nif bitget(parameters(5),12) == 1\n    parameters(20) = bitor(parameters(20), "
      "bitshift(filter_buffers(12), 12));\nend\n\n%% Generate parameter 21\nif bitget(parameters(5),13) == 1\n    param"
      "eters(21) = filter_buffers(13);\nend\nif bitget(parameters(5),14) == 1\n    parameters(21) = bitor(parameters(21"
      "), bitshift(filter_buffers(14), 4));\nend\nif bitget(parameters(5),15) == 1\n    parameters(21) = bitor(paramete"
      "rs(21), bitshift(filter_buffers(15), 8));\nend\nif bitget(parameters(5),16) == 1\n    parameters(21) = bitor(par"
      "ameters(21), bitshift(filter_buffers(16), 12));\nend\n\n% Generate parameters 22 and 23\nparameters(22) = bitshi"
      "ft(bitand(filter_0,hex2dec('18000000')),-27); % EID17-16\nparameters(22) = bitor(parameters(22), bitshift(bitand"
      "(filter_0,hex2dec('7FF')), 5)); % SID\nparameters(22) = bitor(parameters(22), bitshift(filter_0_exide - 1, 3)); "
      "% EXIDE\nparameters(23) = bitshift(bitand(uint32(filter_0),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate pa"
      "rameters 24 and 25\nparameters(24) = bitshift(bitand(filter_1,hex2dec('18000000')),-27); % EID17-16\nparameters("
      "24) = bitor(parameters(24), bitshift(bitand(filter_1,hex2dec('7FF')), 5)); % SID\nparameters(24) = bitor(paramet"
      "ers(24), bitshift(filter_1_exide - 1, 3)); % EXIDE\nparameters(25) = bitshift(bitand(uint32(filter_1),hex2dec('7"
      "FFF800')),-11); % EID15-0\n\n%% Generate parameters 26 and 27\nparameters(26) = bitshift(bitand(filter_2,hex2dec"
      "('18000000')),-27); % EID17-16\nparameters(26) = bitor(parameters(26), bitshift(bitand(filter_2,hex2dec('7FF')),"
      " 5)); % SID\nparameters(26) = bitor(parameters(26), bitshift(filter_2_exide - 1, 3)); % EXIDE\nparameters(27) = "
      "bitshift(bitand(uint32(filter_2),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 28 and 29\nparame"
      "ters(28) = bitshift(bitand(filter_3,hex2dec('18000000')),-27); % EID17-16\nparameters(28) = bitor(parameters(28)"
      ", bitshift(bitand(filter_3,hex2dec('7FF')), 5)); % SID\nparameters(28) = bitor(parameters(28), bitshift(filter_3"
      "_exide - 1, 3)); % EXIDE\nparameters(29) = bitshift(bitand(uint32(filter_3),hex2dec('7FFF800')),-11); % EID15-0\n"
      "\n%% Generate parameters 30 and 31\nparameters(30) = bitshift(bitand(filter_4,hex2dec('18000000')),-27); % EID17"
      "-16\nparameters(30) = bitor(parameters(30), bitshift(bitand(filter_4,hex2dec('7FF')), 5)); % SID\nparameters(30)"
      " = bitor(parameters(30), bitshift(filter_4_exide - 1, 3)); % EXIDE\nparameters(31) = bitshift(bitand(uint32(filt"
      "er_4),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 32 and 33\nparameters(32) = bitshift(bitand("
      "filter_5,hex2dec('18000000')),-27); % EID17-16\nparameters(32) = bitor(parameters(32), bitshift(bitand(filter_5,"
      "hex2dec('7FF')), 5)); % SID\nparameters(32) = bitor(parameters(32), bitshift(filter_5_exide - 1, 3)); % EXIDE\np"
      "arameters(33) = bitshift(bitand(uint32(filter_5),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 3"
      "4 and 35\nparameters(34) = bitshift(bitand(filter_6,hex2dec('18000000')),-27); % EID17-16\nparameters(34) = bito"
      "r(parameters(34), bitshift(bitand(filter_6,hex2dec('7FF')), 5)); % SID\nparameters(34) = bitor(parameters(34), b"
      "itshift(filter_6_exide - 1, 3)); % EXIDE\nparameters(35) = bitshift(bitand(uint32(filter_6),hex2dec('7FFF800')),"
      "-11); % EID15-0\n\n%% Generate parameters 36 and 37\nparameters(36) = bitshift(bitand(filter_7,hex2dec('18000000"
      "')),-27); % EID17-16\nparameters(36) = bitor(parameters(36), bitshift(bitand(filter_7,hex2dec('7FF')), 5)); % SI"
      "D\nparameters(36) = bitor(parameters(36), bitshift(filter_7_exide - 1, 3)); % EXIDE\nparameters(37) = bitshift(b"
      "itand(uint32(filter_7),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 38 and 39\nparameters(38) ="
      " bitshift(bitand(filter_8,hex2dec('18000000')),-27); % EID17-16\nparameters(38) = bitor(parameters(38), bitshift"
      "(bitand(filter_8,hex2dec('7FF')), 5)); % SID\nparameters(38) = bitor(parameters(38), bitshift(filter_8_exide - 1"
      ", 3)); % EXIDE\nparameters(39) = bitshift(bitand(uint32(filter_8),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Gene"
      "rate parameters 40 and 41\nparameters(40) = bitshift(bitand(filter_9,hex2dec('18000000')),-27); % EID17-16\npara"
      "meters(40) = bitor(parameters(40), bitshift(bitand(filter_9,hex2dec('7FF')), 5)); % SID\nparameters(40) = bitor("
      "parameters(40), bitshift(filter_9_exide - 1, 3)); % EXIDE\nparameters(41) = bitshift(bitand(uint32(filter_9),hex"
      "2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 42 and 43\nparameters(42) = bitshift(bitand(filter_10"
      ",hex2dec('18000000')),-27); % EID17-16\nparameters(42) = bitor(parameters(42), bitshift(bitand(filter_10,hex2dec"
      "('7FF')), 5)); % SID\nparameters(42) = bitor(parameters(42), bitshift(filter_10_exide - 1, 3)); % EXIDE\nparamet"
      "ers(43) = bitshift(bitand(uint32(filter_10),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 44 and"
      " 45\nparameters(44) = bitshift(bitand(filter_11,hex2dec('18000000')),-27); % EID17-16\nparameters(44) = bitor(pa"
      "rameters(44), bitshift(bitand(filter_11,hex2dec('7FF')), 5)); % SID\nparameters(44) = bitor(parameters(44), bits"
      "hift(filter_11_exide - 1, 3)); % EXIDE\nparameters(45) = bitshift(bitand(uint32(filter_11),hex2dec('7FFF800')),-"
      "11); % EID15-0\n\n%% Generate parameters 46 and 47\nparameters(46) = bitshift(bitand(filter_12,hex2dec('18000000"
      "')),-27); % EID17-16\nparameters(46) = bitor(parameters(46), bitshift(bitand(filter_12,hex2dec('7FF')), 5)); % S"
      "ID\nparameters(46) = bitor(parameters(46), bitshift(filter_12_exide - 1, 3)); % EXIDE\nparameters(47) = bitshift"
      "(bitand(uint32(filter_12),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 48 and 49\nparameters(48"
      ") = bitshift(bitand(filter_13,hex2dec('18000000')),-27); % EID17-16\nparameters(48) = bitor(parameters(48), bits"
      "hift(bitand(filter_13,hex2dec('7FF')), 5)); % SID\nparameters(48) = bitor(parameters(48), bitshift(filter_13_exi"
      "de - 1, 3)); % EXIDE\nparameters(49) = bitshift(bitand(uint32(filter_13),hex2dec('7FFF800')),-11); % EID15-0\n\n"
      "%% Generate parameters 50 and 51\nparameters(50) = bitshift(bitand(filter_14,hex2dec('18000000')),-27); % EID17-"
      "16\nparameters(50) = bitor(parameters(50), bitshift(bitand(filter_14,hex2dec('7FF')), 5)); % SID\nparameters(50)"
      " = bitor(parameters(50), bitshift(filter_14_exide - 1, 3)); % EXIDE\nparameters(51) = bitshift(bitand(uint32(fil"
      "ter_14),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 52 and 53\nparameters(52) = bitshift(bitan"
      "d(filter_15,hex2dec('18000000')),-27); % EID17-16\nparameters(52) = bitor(parameters(52), bitshift(bitand(filter"
      "_15,hex2dec('7FF')), 5)); % SID\nparameters(52) = bitor(parameters(52), bitshift(filter_15_exide - 1, 3)); % EXI"
      "DE\nparameters(53) = bitshift(bitand(uint32(filter_15),hex2dec('7FFF800')),-11); % EID15-0"
      MaskDisplay	      "text(0.5,0.5,'Configure ECAN1','horizontalAlignment','center','verticalAlignment','middle');\n"
      MaskIconFrame	      on
      MaskIconOpaque	      on
      MaskIconRotate	      "none"
      MaskPortRotate	      "default"
      MaskIconUnits	      "normalized"
      MaskValueString	      "off|Normal|2|0|250000|8|5|6|3|20|on|6 buffers|[1]|[0]|Highest|No|Highest|No|Lowest|No|Low"
      "est|No|Lowest|No|Lowest|No|Lowest|No|Lowest|No|0|Match std or ext|0|Match std or ext|0|Match std or ext|[0 1 2]|"
      "hex2dec('300')|0|Match only standard|1|hex2dec('401')|0|Match only standard|2|hex2dec('402')|0|Match only standa"
      "rd|3|0|0|Match only standard|0|0|0|Match only standard|0|0|0|Match only standard|0|0|0|Match only standard|0|0|0"
      "|Match only standard|0|0|0|Match only standard|0|0|<empty>|Match only standard|0|0|0|Match only standard|0|0|0|M"
      "atch only standard|0|0|0|Match only standard|0|0|0|Match only standard|0|0|0|Match only standard|0|0|0|Match onl"
      "y standard|0"
      MaskTabNameString	      ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
      ",,,,,,,,,,,,,"
      System {
	Name			"Configure ECAN 1"
	Location		[41, 188, 446, 336]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Reference
	  Name			  "C Function Call\n[ecanFunctions.c]"
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [1]
	  Position		  [145, 40, 270, 80]
	  List {
	    ListType		    RTWdata
	    FctDeclaration	    "extern void ecan1_init(uint16_T* u1);"
	    FctCall		    "ecan1_init(*%u1);"
	    fctName		    "ecan1_init"
	    INPUT_SIZE		    "53"
	    OUTPUT_SIZE		    "1"
	    NBR_INPUT		    "1"
	    NBR_OUTPUT		    "0"
	  }
	  SourceBlock		  "dsPICdrivers/OTHERS/C Function Call"
	  SourceType		  "C Function Call"
	  fctName		  "'ecan1_init'"
	  INPUT_SIZE		  "53"
	  INPUT1		  "uint16"
	  INPUT2		  "--"
	  INPUT3		  "--"
	  OUTPUT_SIZE		  "1"
	  OUTPUT1		  "--"
	  SampleTime		  "Inf"
	  InputType		  "[ 4 ]"
	  OutputType		  "[ ]"
	  FctDeclaration	  "extern void ecan1_init(uint16_T* u1);"
	  FctCall		  "ecan1_init(*%u1);"
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [45, 53, 125, 67]
	  ShowName		  off
	  Value			  "parameters"
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  DstBlock		  "C Function Call\n[ecanFunctions.c]"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Configure Model \nfor dsPIC"
      Ports		      []
      Position		      [17, 97, 125, 147]
      BackgroundColor	      "yellow"
      SourceBlock	      "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC"
      SourceType	      ""
    }
    Block {
      BlockType		      Constant
      Name		      "Constant"
      Position		      [355, 675, 415, 705]
      BlockMirror	      on
      ShowName		      off
      Value		      "4000-40"
      OutDataTypeMode	      "int16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "int16"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      Constant
      Name		      "Constant1"
      Position		      [355, 800, 415, 830]
      BlockMirror	      on
      ShowName		      off
      Value		      "4000+40"
      OutDataTypeMode	      "int16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "int16"
      SampleTime	      "-1"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Current M3"
      Position		      [810, 488, 915, 522]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Current_M3"
      SampleTime	      "5e-3"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Current M4"
      Position		      [920, 523, 1025, 557]
      BackgroundColor	      "lightBlue"
      NamePlacement	      "alternate"
      DataStoreName	      "Current_M4"
      SampleTime	      "5e-3"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "DISABLE\nTs = 1e-2"
      Position		      [160, 348, 265, 382]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "DISABLE"
      SampleTime	      "1e-2"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Data Store\nMemory"
      Position		      [25, 830, 82, 879]
      BackgroundColor	      "green"
      DataStoreName	      "I2C_bf"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion"
      Position		      [1040, 768, 1115, 802]
      OutDataTypeMode	      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion1"
      Position		      [1040, 943, 1115, 977]
      OutDataTypeMode	      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Distance1"
      Position		      [25, 915, 82, 964]
      BackgroundColor	      "green"
      DataStoreName	      "distance_1"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Distance2"
      Position		      [100, 915, 157, 964]
      BackgroundColor	      "green"
      DataStoreName	      "distance_2"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Distance3"
      Position		      [175, 915, 232, 964]
      BackgroundColor	      "green"
      DataStoreName	      "distance_3"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Distance4"
      Position		      [250, 915, 307, 964]
      BackgroundColor	      "green"
      DataStoreName	      "distance_4"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Enabled\nSubsystem"
      Ports		      [1, 0, 1]
      Position		      [1055, 74, 1155, 116]
      TreatAsAtomicUnit	      on
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"Enabled\nSubsystem"
	Location		[307, 277, 973, 747]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [115, 218, 145, 232]
	  IconDisplay		  "Port number"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  EnablePort
	  Name			  "Enable"
	  Ports			  []
	  Position		  [235, 20, 255, 40]
	}
	Block {
	  BlockType		  DataStoreWrite
	  Name			  "Data Store\nWrite"
	  Position		  [460, 78, 560, 112]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "ct_turnsE3"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  DataStoreWrite
	  Name			  "Data Store\nWrite1"
	  Position		  [460, 158, 560, 192]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "ct_turnsE4"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  DataStoreWrite
	  Name			  "Data Store\nWrite2"
	  Position		  [460, 258, 560, 292]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "Current_M3"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  DataStoreWrite
	  Name			  "Data Store\nWrite3"
	  Position		  [460, 338, 560, 372]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "Current_M4"
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 8]
	  Position		  [210, 95, 225, 355]
	  ShowName		  off
	  Outputs		  "8"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Receiver Uint16 Current 1"
	  Ports			  [2, 1]
	  Position		  [310, 243, 415, 307]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Receiver Uint16 Current 1"
	    Location		    [422, 391, 1162, 542]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Lower Uint8"
	      Position		      [25, 33, 55, 47]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Higher Uint8"
	      Position		      [25, 98, 55, 112]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion4"
	      Position		      [80, 91, 115, 119]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion5"
	      Position		      [80, 26, 115, 54]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift up 1"
	      Ports		      [1, 1]
	      Position		      [160, 85, 240, 125]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "-8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "null lower 4 bites2"
	      Ports		      [2, 1]
	      Position		      [270, 31, 310, 69]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "OR"
	      UseBitMask	      off
	      NumInputPorts	      "2"
	      BitMask		      "bin2dec('11110000')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint16 Out"
	      Position		      [450, 43, 480, 57]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Shift up 1"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion5"
	      SrcPort		      1
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion4"
	      SrcPort		      1
	      DstBlock		      "Shift up 1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "null lower 4 bites2"
	      SrcPort		      1
	      DstBlock		      "Uint16 Out"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Lower Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Higher Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion4"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Receiver Uint16 Current 2"
	  Ports			  [2, 1]
	  Position		  [310, 323, 415, 387]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Receiver Uint16 Current 2"
	    Location		    [422, 391, 1162, 542]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Lower Uint8"
	      Position		      [25, 33, 55, 47]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Higher Uint8"
	      Position		      [25, 98, 55, 112]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion4"
	      Position		      [80, 91, 115, 119]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion5"
	      Position		      [80, 26, 115, 54]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift up 1"
	      Ports		      [1, 1]
	      Position		      [160, 85, 240, 125]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "-8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "null lower 4 bites2"
	      Ports		      [2, 1]
	      Position		      [270, 31, 310, 69]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "OR"
	      UseBitMask	      off
	      NumInputPorts	      "2"
	      BitMask		      "bin2dec('11110000')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint16 Out"
	      Position		      [450, 43, 480, 57]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Higher Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Lower Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "null lower 4 bites2"
	      SrcPort		      1
	      DstBlock		      "Uint16 Out"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion4"
	      SrcPort		      1
	      DstBlock		      "Shift up 1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion5"
	      SrcPort		      1
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift up 1"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Receiver Uint16 QEI 1"
	  Ports			  [2, 1]
	  Position		  [310, 63, 415, 127]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Receiver Uint16 QEI 1"
	    Location		    [422, 391, 1162, 542]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Lower Uint8"
	      Position		      [25, 33, 55, 47]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Higher Uint8"
	      Position		      [25, 98, 55, 112]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion4"
	      Position		      [80, 91, 115, 119]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion5"
	      Position		      [80, 26, 115, 54]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift up 1"
	      Ports		      [1, 1]
	      Position		      [160, 85, 240, 125]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "-8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "null lower 4 bites2"
	      Ports		      [2, 1]
	      Position		      [270, 31, 310, 69]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "OR"
	      UseBitMask	      off
	      NumInputPorts	      "2"
	      BitMask		      "bin2dec('11110000')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint16 Out"
	      Position		      [450, 43, 480, 57]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Shift up 1"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion5"
	      SrcPort		      1
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion4"
	      SrcPort		      1
	      DstBlock		      "Shift up 1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "null lower 4 bites2"
	      SrcPort		      1
	      DstBlock		      "Uint16 Out"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Lower Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Higher Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion4"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Receiver Uint16 QEI 2"
	  Ports			  [2, 1]
	  Position		  [310, 143, 415, 207]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Receiver Uint16 QEI 2"
	    Location		    [422, 391, 1162, 542]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Lower Uint8"
	      Position		      [25, 33, 55, 47]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Higher Uint8"
	      Position		      [25, 98, 55, 112]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion4"
	      Position		      [80, 91, 115, 119]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion5"
	      Position		      [80, 26, 115, 54]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift up 1"
	      Ports		      [1, 1]
	      Position		      [160, 85, 240, 125]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "-8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "null lower 4 bites2"
	      Ports		      [2, 1]
	      Position		      [270, 31, 310, 69]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "OR"
	      UseBitMask	      off
	      NumInputPorts	      "2"
	      BitMask		      "bin2dec('11110000')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint16 Out"
	      Position		      [450, 43, 480, 57]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Higher Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Lower Uint8"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "null lower 4 bites2"
	      SrcPort		      1
	      DstBlock		      "Uint16 Out"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion4"
	      SrcPort		      1
	      DstBlock		      "Shift up 1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion5"
	      SrcPort		      1
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift up 1"
	      SrcPort		      1
	      Points		      [10, 0]
	      DstBlock		      "null lower 4 bites2"
	      DstPort		      2
	    }
	  }
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  5
	  Points		  [50, 0; 0, 20]
	  DstBlock		  "Receiver Uint16 Current 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  6
	  Points		  [25, 0; 0, 20]
	  DstBlock		  "Receiver Uint16 Current 1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  7
	  Points		  [50, 0; 0, 40]
	  DstBlock		  "Receiver Uint16 Current 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  8
	  Points		  [25, 0; 0, 40]
	  DstBlock		  "Receiver Uint16 Current 2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [25, 0; 0, -40]
	  DstBlock		  "Receiver Uint16 QEI 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [50, 0; 0, -40]
	  DstBlock		  "Receiver Uint16 QEI 1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  Points		  [25, 0; 0, -20]
	  DstBlock		  "Receiver Uint16 QEI 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  4
	  Points		  [50, 0; 0, -20]
	  DstBlock		  "Receiver Uint16 QEI 2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Receiver Uint16 Current 1"
	  SrcPort		  1
	  DstBlock		  "Data Store\nWrite2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Receiver Uint16 Current 2"
	  SrcPort		  1
	  DstBlock		  "Data Store\nWrite3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Receiver Uint16 QEI 1"
	  SrcPort		  1
	  DstBlock		  "Data Store\nWrite"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Receiver Uint16 QEI 2"
	  SrcPort		  1
	  DstBlock		  "Data Store\nWrite1"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      From
      Name		      "From1"
      Position		      [915, 283, 1015, 307]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "Current_M1"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      From
      Name		      "From2"
      Position		      [915, 353, 1015, 377]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "QEI_M1"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      From
      Name		      "From3"
      Position		      [915, 388, 1015, 412]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "QEI_M2"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      From
      Name		      "From4"
      Position		      [915, 318, 1015, 342]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "Current_M2"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Gain
      Name		      "Gain"
      Position		      [325, 280, 340, 310]
      Gain		      "2"
      ParameterDataTypeMode   "Inherit via internal rule"
      ParameterDataType	      "fixdt(1, 16)"
      ParameterScaling	      "2^0"
      ParamDataTypeStr	      "Inherit: Inherit via internal rule"
      OutDataTypeMode	      "int16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "int16"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Goto
      Name		      "Goto1"
      Position		      [795, 283, 895, 307]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "Current_M1"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto10"
      Position		      [795, 318, 895, 342]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "Current_M2"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto2"
      Position		      [795, 353, 895, 377]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "QEI_M1"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Goto
      Name		      "Goto3"
      Position		      [795, 388, 895, 412]
      BackgroundColor	      "darkGreen"
      ShowName		      off
      GotoTag		      "QEI_M2"
      TagVisibility	      "global"
    }
    Block {
      BlockType		      Reference
      Name		      "Hex 300\nSlave QEI and Current1"
      Ports		      [1, 1]
      Position		      [945, 48, 990, 82]
      NamePlacement	      "alternate"
      SourceBlock	      "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
      SourceType	      "Compare To Constant"
      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"
      relop		      "=="
      const		      "hex2dec('300')"
      LogicOutDataTypeMode    "boolean"
      ZeroCross		      off
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Int16: Motor Momentum"
      Position		      [20, 455, 128, 490]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Motor_Momentum"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "int16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "int16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Int16: Steering Front"
      Position		      [20, 354, 127, 388]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Steering_Front"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "int16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "int16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Int16: Steering Rear"
      Position		      [20, 404, 127, 438]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Steering_Rear"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "int16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "int16"
    }
    Block {
      BlockType		      SubSystem
      Name		      "LED Indicator\nPort A8 1Hz"
      Ports		      []
      Position		      [287, 183, 395, 233]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"LED Indicator\nPort A8 1Hz"
	Location		[377, 175, 692, 267]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion11"
	  Position		  [95, 37, 150, 53]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Reference
	  Name			  "Op controlLED"
	  Tag			  "dsPIC_Digital_Output"
	  Ports			  [1]
	  Position		  [175, 25, 290, 65]
	  Priority		  "5"
	  SourceBlock		  "dsPICdrivers/Digital I//O/Digital Output Write"
	  SourceType		  ""
	  PORT			  "A"
	  Pin			  "[8]"
	  Simultaneous		  off
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  DiscretePulseGenerator
	  Name			  "Pulse\nGenerator4"
	  Ports			  [0, 1]
	  Position		  [25, 28, 70, 62]
	  ShowName		  off
	  Amplitude		  "1"
	  Period		  "100"
	  PulseWidth		  "50"
	  PhaseDelay		  "0"
	  SampleTime		  "1e-2"
	}
	Line {
	  SrcBlock		  "Data Type Conversion11"
	  SrcPort		  1
	  DstBlock		  "Op controlLED"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Pulse\nGenerator4"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion11"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Logic
      Name		      "Logical\nOperator"
      Ports		      [2, 1]
      Position		      [1087, 20, 1118, 50]
      BlockRotation	      270
      BlockMirror	      on
      ShowName		      off
      AllPortsSameDT	      off
      OutDataTypeMode	      "boolean"
      LogicDataType	      "fixdt(0, 8)"
      OutDataTypeStr	      "boolean"
    }
    Block {
      BlockType		      Reference
      Name		      "Master"
      Tag		      "dsPIC_MASTER"
      Ports		      []
      Position		      [15, 17, 124, 68]
      BackgroundColor	      "gray"
      Priority		      "1"
      List {
	ListType		RTWdata
	NumBusyPort		"-1"
      }
      SourceBlock	      "dsPICdrivers/Master"
      SourceType	      "Master"
      TimeStepType	      "Timer1"
      picType		      "33fj128MC804"
      fcy		      "20000000"
      Quartz_33f	      "20e6"
      PLLActive_33f	      on
      fcyDesired_33f	      "20000000"
      tmr1		      "[1  19999  0]"
      tmr1Info		      "Time Step : 0.001  ;   Error : 0%  PR1=19999"
      tmr2345		      "[0  8  0  0]"
      tmr2345cfg	      "[-1 -1 -1 -1]"
      IOautoConf	      on
      typePort		      "[ 8   8   0   0   0   0   0  10  10   0  10   0   0   0   0   0   0   0  22  22  23   0   0  23"
      "  22   0  10  23  23   0   0   0  22  22  22  23  22  23   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   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0"
      "   0   0   0   0 ]"
      TRIS		      "[ 64127  58223  64983  65535  65535  65535  65535 ]"
      ADPCFG		      "496"
      MasterBusyPort	      "None"
      MasterOverloadPort      "None"
      FOSC		      "Quartz (XT - HS)"
      ClockSwitchMonitor      "Both disabled"
      TempProtection_33f      "TEMP_ON"
      FPBOR		      "<empty>"
      PWRT		      "64ms"
      MCLR		      "MCLR_DIS"
      PowerSave		      off
      OverrideFcy	      off
      NewFcy		      "1e6"
      PR2345		      "[65535  49999  65535  65535]"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Motor Drive Control"
      Ports		      [5, 1]
      Position		      [425, 275, 550, 425]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"Motor Drive Control"
	Location		[429, 244, 1211, 943]
	Open			on
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "PWM 1 duty cycle with DIR"
	  Position		  [80, 113, 110, 127]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "PWM 2 duty cycle with DIR"
	  Position		  [80, 153, 110, 167]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "DIS 1"
	  Position		  [80, 298, 110, 312]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "DIS 2"
	  Position		  [80, 358, 110, 372]
	  Port			  "4"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "inverse_direction"
	  Position		  [25, 233, 55, 247]
	  BackgroundColor	  "green"
	  Port			  "5"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Abs
	  Name			  "Abs"
	  Position		  [210, 105, 240, 135]
	  ShowName		  off
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Abs
	  Name			  "Abs1"
	  Position		  [210, 145, 240, 175]
	  ShowName		  off
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Reference
	  Name			  "Compare\nTo Zero"
	  Ports			  [1, 1]
	  Position		  [170, 25, 200, 55]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Zero"
	  SourceType		  "Compare To Zero"
	  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"
	  relop			  "<="
	  LogicOutDataTypeMode	  "boolean"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  Reference
	  Name			  "Compare\nTo Zero1"
	  Ports			  [1, 1]
	  Position		  [165, 225, 195, 255]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Zero"
	  SourceType		  "Compare To Zero"
	  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"
	  relop			  "<="
	  LogicOutDataTypeMode	  "boolean"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  Reference
	  Name			  "DIR 1"
	  Tag			  "dsPIC_Digital_Output"
	  Ports			  [1]
	  Position		  [600, 20, 715, 60]
	  Priority		  "5"
	  SourceBlock		  "dsPICdrivers/Digital I//O/Digital Output Write"
	  SourceType		  ""
	  PORT			  "A"
	  Pin			  "[10]"
	  Simultaneous		  off
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Reference
	  Name			  "DIR 2"
	  Tag			  "dsPIC_Digital_Output"
	  Ports			  [1]
	  Position		  [595, 220, 710, 260]
	  Priority		  "5"
	  SourceBlock		  "dsPICdrivers/Digital I//O/Digital Output Write"
	  SourceType		  ""
	  PORT			  "B"
	  Pin			  "[10]"
	  Simultaneous		  off
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Reference
	  Name			  "DISable 1"
	  Tag			  "dsPIC_Digital_Output"
	  Ports			  [1]
	  Position		  [395, 285, 510, 325]
	  Priority		  "5"
	  SourceBlock		  "dsPICdrivers/Digital I//O/Digital Output Write"
	  SourceType		  ""
	  PORT			  "A"
	  Pin			  "[7]"
	  Simultaneous		  off
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Reference
	  Name			  "DISable 2"
	  Tag			  "dsPIC_Digital_Output"
	  Ports			  [1]
	  Position		  [395, 345, 510, 385]
	  Priority		  "5"
	  SourceBlock		  "dsPICdrivers/Digital I//O/Digital Output Write"
	  SourceType		  ""
	  PORT			  "C"
	  Pin			  "[9]"
	  Simultaneous		  off
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion"
	  Position		  [275, 112, 330, 128]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion1"
	  Position		  [270, 32, 325, 48]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion2"
	  Position		  [250, 232, 305, 248]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion3"
	  Position		  [275, 152, 330, 168]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion4"
	  Position		  [305, 297, 360, 313]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion5"
	  Position		  [305, 357, 360, 373]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion6"
	  Position		  [515, 32, 570, 48]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion7"
	  Position		  [510, 232, 565, 248]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator2"
	  Ports			  [1, 1]
	  Position		  [370, 14, 400, 46]
	  BackgroundColor	  "green"
	  Operator		  "NOT"
	  AllPortsSameDT	  off
	  OutDataTypeMode	  "boolean"
	  LogicDataType		  "fixdt(0, 8)"
	  OutDataTypeStr	  "boolean"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator3"
	  Ports			  [1, 1]
	  Position		  [370, 209, 400, 241]
	  BackgroundColor	  "green"
	  Operator		  "NOT"
	  AllPortsSameDT	  off
	  OutDataTypeMode	  "boolean"
	  LogicDataType		  "fixdt(0, 8)"
	  OutDataTypeStr	  "boolean"
	}
	Block {
	  BlockType		  Reference
	  Name			  "PWM Motor Output"
	  Tag			  "dsPIC_PWM_Motor"
	  Ports			  [2]
	  Position		  [415, 98, 565, 182]
	  Priority		  "5"
	  SourceBlock		  "dsPICdrivers/Peripheral I//O/PWM Motor Output"
	  SourceType		  "PWM Motor Output"
	  PWMref		  "1"
	  PWM12			  "2"
	  InputEnableChk	  off
	  InputPeriodeChk	  off
	  Channel		  "[1 2]"
	  TPeriode		  ".0001"
	  PrescalerValue	  "1"
	  PeriodeInteger	  "2000"
	  MaxName		  "'PWM'"
	  Centered		  off
	  HChannelON		  off
	  Info			  "Nbr Bits : 11.9658  ||  PWM = 4000  ||  Prescaler = 1"
	  Delay			  "0"
	  IntPriority		  "5"
	  nbrPwmChannelPIC	  "3"
	  Status		  "OK"
	  DeadTimePrescaleA	  "0"
	  DeadTimePrescaleB	  "0"
	  DeadTimeInfo		  "Dead Time A = 0  ||  Dead Time B = 0"
	  DTPWM1a		  "Prescaler A"
	  DTPWM1i		  "Prescaler A"
	  DTPWM2a		  "Prescaler A"
	  DTPWM2i		  "Prescaler A"
	  DTPWM3a		  "Prescaler A"
	  DTPWM3i		  "Prescaler A"
	  DTPWM4a		  "Prescaler A"
	  DTPWM4i		  "Prescaler A"
	  DTCON1		  "0"
	  DTCON2		  "0"
	}
	Block {
	  BlockType		  RateTransition
	  Name			  "Rate Transition1"
	  Position		  [215, 234, 230, 246]
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Deterministic		  off
	  OutPortSampleTime	  "5e-3"
	}
	Block {
	  BlockType		  RateTransition
	  Name			  "Rate Transition14"
	  Position		  [225, 34, 245, 46]
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Deterministic		  off
	  OutPortSampleTime	  "5e-3"
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch1"
	  Position		  [440, 19, 495, 71]
	  BackgroundColor	  "green"
	  Criteria		  "u2 ~= 0"
	  Threshold		  "1000"
	  InputSameDT		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch2"
	  Position		  [430, 214, 485, 266]
	  BackgroundColor	  "green"
	  Criteria		  "u2 ~= 0"
	  Threshold		  "1000"
	  InputSameDT		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "DIR"
	  Position		  [650, 83, 680, 97]
	  BackgroundColor	  "green"
	  IconDisplay		  "Port number"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	}
	Line {
	  SrcBlock		  "Data Type Conversion5"
	  SrcPort		  1
	  DstBlock		  "DISable 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion4"
	  SrcPort		  1
	  DstBlock		  "DISable 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DIS 2"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion5"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DIS 1"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion4"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion3"
	  SrcPort		  1
	  DstBlock		  "PWM Motor Output"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Compare\nTo Zero1"
	  SrcPort		  1
	  DstBlock		  "Rate Transition1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Abs1"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "PWM 2 duty cycle with DIR"
	  SrcPort		  1
	  Points		  [35, 0]
	  Branch {
	    DstBlock		    "Compare\nTo Zero1"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Abs1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Abs"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "PWM 1 duty cycle with DIR"
	  SrcPort		  1
	  Points		  [35, 0]
	  Branch {
	    DstBlock		    "Abs"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -80]
	    DstBlock		    "Compare\nTo Zero"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion"
	  SrcPort		  1
	  DstBlock		  "PWM Motor Output"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion1"
	  SrcPort		  1
	  Points		  [25, 0]
	  Branch {
	    DstBlock		    "Logical\nOperator2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 20]
	    DstBlock		    "Switch1"
	    DstPort		    3
	  }
	}
	Line {
	  SrcBlock		  "Switch1"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion6"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Switch2"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion7"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion2"
	  SrcPort		  1
	  Points		  [5, 0]
	  Branch {
	    Points		    [0, 15]
	    DstBlock		    "Switch2"
	    DstPort		    3
	  }
	  Branch {
	    Points		    [0, -15]
	    DstBlock		    "Logical\nOperator3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "inverse_direction"
	  SrcPort		  1
	  Points		  [55, 0]
	  Branch {
	    Points		    [0, 5; 300, 0]
	    DstBlock		    "Switch2"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [0, -55; -100, 0; 0, -100; 410, 0]
	    DstBlock		    "Switch1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Logical\nOperator2"
	  SrcPort		  1
	  DstBlock		  "Switch1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Logical\nOperator3"
	  SrcPort		  1
	  DstBlock		  "Switch2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Rate Transition14"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Compare\nTo Zero"
	  SrcPort		  1
	  Points		  [0, 0]
	  Branch {
	    DstBlock		    "Rate Transition14"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 30; 45, 0; 0, 20]
	    DstBlock		    "DIR"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Rate Transition1"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion6"
	  SrcPort		  1
	  DstBlock		  "DIR 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion7"
	  SrcPort		  1
	  DstBlock		  "DIR 2"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Motor_Momentum\nTs = 1e-2"
      Position		      [145, 277, 240, 313]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Motor_Momentum"
      SampleTime	      "1e-2"
    }
    Block {
      BlockType		      Reference
      Name		      "Output Compare HW"
      Tag		      "dsPIC_OC_HW_out"
      Ports		      [2]
      Position		      [425, 705, 550, 800]
      Priority		      "5"
      SourceBlock	      "dsPICdrivers/Peripheral I//O/Output Compare HW"
      SourceType	      "Output Capture Peripheral - Hardware only (without interrupt) "
      OC_Mode		      "PWM duty cycle (robust)"
      Timer		      "3"
      CHANNEL		      "[1 2] "
      Channel_UP_Down_Periode "[5  5]"
      PeriodeInput	      off
      MaxChannel	      "0.02"
      MaxName		      "' OCmax '"
      Precision		      "[15.6096]"
      Status		      "OK"
      SafeMarge		      "[0  0]"
      PortLetter	      "[66  66]"
      PortNumber	      "[12  11]"
      MaxValues		      "[49999]"
      NPORTS		      "2"
    }
    Block {
      BlockType		      Reference
      Name		      "PIN Mapping"
      Tag		      "dsPIC_PIN_Mapping"
      Ports		      []
      Position		      [20, 179, 128, 229]
      BackgroundColor	      "yellow"
      List {
	ListType		RTWdata
	RPINR0			"7936"
	RPINR1			"31"
	RPINR3			"7967"
	RPINR4			"7967"
	RPINR7			"7967"
	RPINR10			"7967"
	RPINR11			"31"
	RPINR12			"31"
	RPINR13			"31"
	RPINR14			"7967"
	RPINR15			"31"
	RPINR16			"7967"
	RPINR17			"31"
	RPINR18			"7967"
	RPINR19			"7967"
	RPINR20			"7967"
	RPINR21			"31"
	RPINR22			"7967"
	RPINR23			"31"
	RPINR26			"31"
	RPOR0			"65535"
	RPOR1			"65535"
	RPOR2			"65535"
	RPOR3			"65535"
	RPOR4			"65535"
	RPOR5			"65535"
	RPOR6			"65535"
	RPOR7			"65535"
	RPOR8			"65535"
	RPOR9			"65535"
	RPOR10			"65535"
	RPOR11			"65535"
	RPOR12			"65535"
      }
      SourceBlock	      "dsPICdrivers/Peripheral MAPPING/PIN Mapping"
      SourceType	      "Peripheral PIN Mapping"
      in_INT1		      "Not tied (VSS)"
      in_INT2		      "Not tied (VSS)"
      in_T2CK		      "Not tied (VSS)"
      in_T3CK		      "Not tied (VSS)"
      in_T4CK		      "Not tied (VSS)"
      in_T5CK		      "Not tied (VSS)"
      in_IC1		      "Not tied (VSS)"
      in_IC2		      "Not tied (VSS)"
      in_IC7		      "Not tied (VSS)"
      in_IC8		      "Not tied (VSS)"
      out_OC1		      "tied to RP12"
      out_OC2		      "tied to RP11"
      out_OC3		      "Not changed"
      out_OC4		      "Not changed"
      in_OCFA		      "Not tied (VSS)"
      in_FLTA1		      "Not tied (VSS)"
      in_FLTA2		      "Not tied (VSS)"
      in_QEA1		      "tied to RP16"
      in_QEB1		      "tied to RP17"
      in_INDX1		      "Not tied (VSS)"
      out_UPDN1		      "Not changed"
      out_UPDN2		      "Not changed"
      in_QEA2		      "tied to RP3"
      in_QEB2		      "tied to RP2"
      in_INDX2		      "Not tied (VSS)"
      in_U1RX		      "tied to RP18"
      out_U1TX		      "tied to RP4"
      in_U1CTS		      "Not tied (VSS)"
      out_U1RTS		      "Not changed"
      in_U2RX		      "Not changed"
      out_U2TX		      "Not changed"
      in_U2CTS		      "Not tied (VSS)"
      out_U2RTS		      "Not changed"
      in_SDI1		      "tied to RP8"
      out_SDO1		      "tied to RP19"
      in_SCK1		      "Not tied (VSS)"
      out_SCK1OUT	      "tied to RP7"
      in_SS1		      "Not tied (VSS)"
      out_SS1OUT	      "Not changed"
      in_SDI2		      "Not tied (VSS)"
      out_SDO2		      "Not changed"
      in_SCK2		      "Not tied (VSS)"
      out_SCK2OUT	      "Not changed"
      in_SS2		      "Not tied (VSS)"
      out_SS2OUT	      "Not changed"
      in_C1RX		      "tied to RP20"
      out_C1TX		      "tied to RP21"
      out_C1OUT		      "Not changed"
      out_C2OUT		      "Not changed"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "QEI 3"
      Position		      [810, 418, 915, 452]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "ct_turnsE3"
      SampleTime	      "5e-3"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "QEI 4"
      Position		      [920, 453, 1025, 487]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "ct_turnsE4"
      SampleTime	      "5e-3"
    }
    Block {
      BlockType		      Reference
      Name		      "QEI Inicialization"
      Tag		      "dsPIC_dsPIC_CFunctionCall"
      Ports		      []
      Position		      [288, 104, 396, 154]
      List {
	ListType		RTWdata
	FctDeclaration		"extern void QEIInit();"
	FctCall			"QEIInit();"
	fctName			"QEIInit"
	INPUT_SIZE		"1"
	OUTPUT_SIZE		"1"
	NBR_INPUT		"0"
	NBR_OUTPUT		"0"
      }
      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
      SourceType	      "C Function Call"
      fctName		      "'QEIInit'"
      INPUT_SIZE	      "1"
      INPUT1		      "--"
      INPUT2		      "--"
      INPUT3		      "--"
      OUTPUT_SIZE	      "1"
      OUTPUT1		      "--"
      SampleTime	      "inf"
      InputType		      "[ ]"
      OutputType	      "[ ]"
      FctDeclaration	      "extern void QEIInit();"
      FctCall		      "QEIInit();"
      OrderingInOutPopup      "None"
    }
    Block {
      BlockType		      SubSystem
      Name		      "QEI Ts = 1e-2\nCurrent Ts = 5e-3"
      Ports		      [0, 4]
      Position		      [580, 273, 705, 422]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      Port {
	PortNumber		1
	Name			"Current_M1"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		2
	Name			"Current_M2"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		3
	Name			"QEI_M1"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      Port {
	PortNumber		4
	Name			"QEI_M1"
	RTWStorageClass		"Auto"
	DataLoggingNameMode	"SignalName"
      }
      System {
	Name			"QEI Ts = 1e-2\nCurrent Ts = 5e-3"
	Location		[437, 495, 727, 721]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Reference
	  Name			  "Angle => Count by 1 roll = 1000\nQEI 500 mode x2\nwithout index chx"
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [0, 1]
	  Position		  [35, 25, 160, 65]
	  ShowName		  off
	  List {
	    ListType		    RTWdata
	    FctDeclaration	    "extern uint16_T GetQEI1();"
	    FctCall		    "%y1 = GetQEI1();"
	    fctName		    "GetQEI1"
	    INPUT_SIZE		    "1"
	    OUTPUT_SIZE		    "1"
	    NBR_INPUT		    "0"
	    NBR_OUTPUT		    "1"
	  }
	  SourceBlock		  "dsPICdrivers/OTHERS/C Function Call"
	  SourceType		  "C Function Call"
	  fctName		  "'GetQEI1'"
	  INPUT_SIZE		  "1"
	  INPUT1		  "--"
	  INPUT2		  "--"
	  INPUT3		  "--"
	  OUTPUT_SIZE		  "1"
	  OUTPUT1		  "uint16"
	  SampleTime		  "1e-2"
	  InputType		  "[ ]"
	  OutputType		  "[ 4 ]"
	  FctDeclaration	  "extern uint16_T GetQEI1();"
	  FctCall		  "%y1 = GetQEI1();"
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Angle => Count by 1 roll = 1000\nQEI 500 mode x2\nwithout index chx1"
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [0, 1]
	  Position		  [35, 80, 160, 120]
	  ShowName		  off
	  List {
	    ListType		    RTWdata
	    FctDeclaration	    "extern uint16_T GetQEI2();"
	    FctCall		    "%y1 = GetQEI2();"
	    fctName		    "GetQEI2"
	    INPUT_SIZE		    "1"
	    OUTPUT_SIZE		    "1"
	    NBR_INPUT		    "0"
	    NBR_OUTPUT		    "1"
	  }
	  SourceBlock		  "dsPICdrivers/OTHERS/C Function Call"
	  SourceType		  "C Function Call"
	  fctName		  "'GetQEI2'"
	  INPUT_SIZE		  "1"
	  INPUT1		  "--"
	  INPUT2		  "--"
	  INPUT3		  "--"
	  OUTPUT_SIZE		  "1"
	  OUTPUT1		  "uint16"
	  SampleTime		  "1e-2"
	  InputType		  "[ ]"
	  OutputType		  "[ 4 ]"
	  FctDeclaration	  "extern uint16_T GetQEI2();"
	  FctCall		  "%y1 = GetQEI2();"
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Reference
	  Name			  "current"
	  Tag			  "dsPIC_ADC"
	  Ports			  [0, 2]
	  Position		  [25, 141, 175, 199]
	  Priority		  "5"
	  List {
	    ListType		    RTWdata
	    DMAChannel		    "4"
	  }
	  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 1]"
	  MaxName		  "ANmax = 4095"
	  Rin			  "1e2"
	  ADCS			  "26"
	  SAMC			  "1"
	  Temperature		  "25"
	  DMAChannel		  "4"
	  SampleTime		  "5e-3"
	  Status		  "OK  |  Tsmp=6.750e-007 |  T/Channel=1.012e-005 |  Tall=2.025e-005"
	  SSRC			  "auto convert"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Current 1"
	  Position		  [235, 178, 265, 192]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Current 2"
	  Position		  [235, 148, 265, 162]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "QEI 1"
	  Position		  [235, 38, 265, 52]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "QEI 2"
	  Position		  [235, 93, 265, 107]
	  Port			  "4"
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "current"
	  SrcPort		  2
	  DstBlock		  "Current 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "current"
	  SrcPort		  1
	  DstBlock		  "Current 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Angle => Count by 1 roll = 1000\nQEI 500 mode x2\nwithout index chx"
	  SrcPort		  1
	  DstBlock		  "QEI 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Angle => Count by 1 roll = 1000\nQEI 500 mode x2\nwithout index chx1"
	  SrcPort		  1
	  DstBlock		  "QEI 2"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition"
      Position		      [1060, 561, 1100, 589]
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition1"
      Position		      [1060, 596, 1100, 624]
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition10"
      Position		      [1060, 491, 1100, 519]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition11"
      Position		      [1060, 526, 1100, 554]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition12"
      Position		      [1060, 281, 1100, 309]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition13"
      Position		      [1060, 316, 1100, 344]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition14"
      Position		      [556, 545, 584, 585]
      BlockRotation	      270
      BlockMirror	      on
      BackgroundColor	      "green"
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition2"
      Position		      [1060, 631, 1100, 659]
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition3"
      Position		      [1060, 666, 1100, 694]
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition4"
      Position		      [1060, 701, 1100, 729]
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition5"
      Position		      [1060, 736, 1100, 764]
      ShowName		      off
      Deterministic	      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition6"
      Position		      [1060, 351, 1100, 379]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition7"
      Position		      [1060, 386, 1100, 414]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition8"
      Position		      [1060, 421, 1100, 449]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      RateTransition
      Name		      "Rate Transition9"
      Position		      [1060, 456, 1100, 484]
      ShowName		      off
      OutPortSampleTime	      "5e-3"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Rear Unit Control Data:\nSteering, Motor momentum,\nButtons, DISABLE\nTs = 5e-3"
      Ports		      [0, 3]
      Position		      [435, 17, 550, 173]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"Rear Unit Control Data:\nSteering, Motor momentum,\nButtons, DISABLE\nTs = 5e-3"
	Location		[429, 211, 851, 813]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Buttons\nTs = 5e-3"
	  Position		  [25, 263, 130, 297]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "Buttons"
	  SampleTime		  "5e-3"
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "DISABLE\nTs = 5e-3"
	  Position		  [25, 333, 130, 367]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "DISABLE"
	  SampleTime		  "5e-3"
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion"
	  Position		  [170, 333, 245, 367]
	  ShowName		  off
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion1"
	  Position		  [170, 408, 245, 442]
	  ShowName		  off
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Motor_Momentum\nTs = 5e-3"
	  Position		  [25, 173, 130, 207]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "Motor_Momentum"
	  SampleTime		  "5e-3"
	}
	Block {
	  BlockType		  Mux
	  Name			  "Mux"
	  Ports			  [8, 1]
	  Position		  [315, 137, 325, 268]
	  ShowName		  off
	  Inputs		  "8"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Steering_Rear\nTs = 5e-3"
	  Position		  [25, 93, 130, 127]
	  BackgroundColor	  "lightBlue"
	  DataStoreName		  "Steering_Rear"
	  SampleTime		  "5e-3"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Transmiter Int16 1"
	  Ports			  [1, 2]
	  Position		  [155, 78, 260, 142]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Transmiter Int16 1"
	    Location		    [177, 386, 497, 526]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Int16 In"
	      Position		      [25, 38, 55, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion2"
	      Position		      [205, 31, 240, 59]
	      ShowName		      off
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion3"
	      Position		      [205, 96, 240, 124]
	      ShowName		      off
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Get Higher 4 bites"
	      Ports		      [1, 1]
	      Position		      [90, 90, 170, 130]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Get Lower Byte"
	      Ports		      [1, 1]
	      Position		      [110, 26, 150, 64]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "AND"
	      UseBitMask	      on
	      NumInputPorts	      "1"
	      BitMask		      "bin2dec('11111111')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint8 Out Lower"
	      Position		      [265, 38, 295, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint8 Out Higher"
	      Position		      [265, 103, 295, 117]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion3"
	      SrcPort		      1
	      DstBlock		      "Uint8 Out Higher"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion2"
	      SrcPort		      1
	      DstBlock		      "Uint8 Out Lower"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Int16 In"
	      SrcPort		      1
	      Points		      [15, 0]
	      Branch {
		DstBlock		"Get Lower Byte"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Get Higher 4 bites"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Get Higher 4 bites"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion3"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Get Lower Byte"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion2"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Transmiter Int16 2"
	  Ports			  [1, 2]
	  Position		  [155, 158, 260, 222]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Transmiter Int16 2"
	    Location		    [177, 386, 497, 526]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Int16 In"
	      Position		      [25, 38, 55, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion2"
	      Position		      [205, 31, 240, 59]
	      ShowName		      off
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion3"
	      Position		      [205, 96, 240, 124]
	      ShowName		      off
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Get Higher 4 bites"
	      Ports		      [1, 1]
	      Position		      [90, 90, 170, 130]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Get Lower Byte"
	      Ports		      [1, 1]
	      Position		      [110, 26, 150, 64]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "AND"
	      UseBitMask	      on
	      NumInputPorts	      "1"
	      BitMask		      "bin2dec('11111111')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint8 Out Lower"
	      Position		      [265, 38, 295, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint8 Out Higher"
	      Position		      [265, 103, 295, 117]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Get Lower Byte"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Get Higher 4 bites"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion3"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Int16 In"
	      SrcPort		      1
	      Points		      [15, 0]
	      Branch {
		DstBlock		"Get Higher 4 bites"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Get Lower Byte"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion2"
	      SrcPort		      1
	      DstBlock		      "Uint8 Out Lower"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion3"
	      SrcPort		      1
	      DstBlock		      "Uint8 Out Higher"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Transmiter Unit16"
	  Ports			  [1, 2]
	  Position		  [155, 248, 260, 312]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Transmiter Unit16"
	    Location		    [177, 386, 726, 733]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Uint16 In"
	      Position		      [25, 38, 55, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion2"
	      Position		      [205, 31, 240, 59]
	      ShowName		      off
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion3"
	      Position		      [205, 96, 240, 124]
	      ShowName		      off
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Get Higher 4 bites"
	      Ports		      [1, 1]
	      Position		      [90, 90, 170, 130]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Get Lower Byte"
	      Ports		      [1, 1]
	      Position		      [110, 26, 150, 64]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "AND"
	      UseBitMask	      on
	      NumInputPorts	      "1"
	      BitMask		      "bin2dec('11111111')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint8 Out Lower"
	      Position		      [265, 38, 295, 52]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Uint8 Out Higher"
	      Position		      [265, 103, 295, 117]
	      Port		      "2"
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Get Lower Byte"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Get Higher 4 bites"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion3"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Uint16 In"
	      SrcPort		      1
	      Points		      [15, 0]
	      Branch {
		DstBlock		"Get Higher 4 bites"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Get Lower Byte"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion2"
	      SrcPort		      1
	      DstBlock		      "Uint8 Out Lower"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion3"
	      SrcPort		      1
	      DstBlock		      "Uint8 Out Higher"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Reference
	  Name			  "Triggering"
	  Ports			  [1, 1]
	  Position		  [185, 523, 230, 557]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
	  SourceType		  "Compare To Constant"
	  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"
	  relop			  ">"
	  const			  "0"
	  LogicOutDataTypeMode	  "boolean"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  Constant
	  Name			  "data length - set maualy"
	  Position		  [25, 473, 130, 507]
	  Value			  "8"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	  SampleTime		  "5e-3"
	}
	Block {
	  BlockType		  Constant
	  Name			  "just a dummy"
	  Position		  [25, 408, 130, 442]
	  Value			  "211"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	  SampleTime		  "5e-3"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Trigger"
	  Position		  [305, 533, 335, 547]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "DATA"
	  Position		  [360, 198, 390, 212]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Data length"
	  Position		  [305, 483, 335, 497]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "Steering_Rear\nTs = 5e-3"
	  SrcPort		  1
	  DstBlock		  "Transmiter Int16 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Buttons\nTs = 5e-3"
	  SrcPort		  1
	  DstBlock		  "Transmiter Unit16"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Transmiter Int16 1"
	  SrcPort		  1
	  Points		  [15, 0; 0, 55]
	  DstBlock		  "Mux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Transmiter Int16 1"
	  SrcPort		  2
	  Points		  [5, 0; 0, 40]
	  DstBlock		  "Mux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Motor_Momentum\nTs = 5e-3"
	  SrcPort		  1
	  DstBlock		  "Transmiter Int16 2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Transmiter Int16 2"
	  SrcPort		  1
	  Points		  [0, 5]
	  DstBlock		  "Mux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Transmiter Int16 2"
	  SrcPort		  2
	  Points		  [0, -10]
	  DstBlock		  "Mux"
	  DstPort		  4
	}
	Line {
	  SrcBlock		  "Transmiter Unit16"
	  SrcPort		  1
	  Points		  [5, 0; 0, -55]
	  DstBlock		  "Mux"
	  DstPort		  5
	}
	Line {
	  SrcBlock		  "Transmiter Unit16"
	  SrcPort		  2
	  Points		  [15, 0; 0, -70]
	  DstBlock		  "Mux"
	  DstPort		  6
	}
	Line {
	  SrcBlock		  "DISABLE\nTs = 5e-3"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion"
	  SrcPort		  1
	  Points		  [40, 0; 0, -110]
	  DstBlock		  "Mux"
	  DstPort		  7
	}
	Line {
	  SrcBlock		  "just a dummy"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion1"
	  SrcPort		  1
	  Points		  [50, 0]
	  DstBlock		  "Mux"
	  DstPort		  8
	}
	Line {
	  SrcBlock		  "Mux"
	  SrcPort		  1
	  DstBlock		  "DATA"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "data length - set maualy"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    DstBlock		    "Data length"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 50]
	    DstBlock		    "Triggering"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Triggering"
	  SrcPort		  1
	  DstBlock		  "Trigger"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Receive ECAN1 Message\nTs = 5e-3"
      Ports		      [0, 5]
      Position		      [765, 47, 885, 203]
      BackgroundColor	      "orange"
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      MaskType		      "ECAN 1 Reception Block"
      MaskDescription	      "This block will receive CAN messages over the ECAN1 peripheral on the dsPIC33f.\nOutputs:"
      "\nidentifier - uint32 containing SID and EID\ndata - Variable-sized array (between 0 and 8) of uint8s\nremote - "
      "boolean value specifying if this is a remote transmit request"
      MaskPromptString	      "Sampling time"
      MaskStyleString	      "edit"
      MaskTunableValueString  "off"
      MaskEnableString	      "on"
      MaskVisibilityString    "on"
      MaskToolTipString	      "on"
      MaskVariables	      "ecan1_receive_sample_time=@1;"
      MaskDisplay	      "disp('ECAN1 RX');"
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskPortRotate	      "default"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "5e-3"
      System {
	Name			"Receive ECAN1 Message\nTs = 5e-3"
	Location		[167, 615, 827, 922]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Reference
	  Name			  "C Function Call\n[ecanFunctions.c]"
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [0, 1]
	  Position		  [25, 85, 150, 125]
	  List {
	    ListType		    RTWdata
	    FctDeclaration	    "extern void ecan1_receive_matlab(uint32_T* y1);"
	    FctCall		    "ecan1_receive_matlab(*%y1);"
	    fctName		    "ecan1_receive_matlab"
	    INPUT_SIZE		    "1"
	    OUTPUT_SIZE		    "4"
	    NBR_INPUT		    "0"
	    NBR_OUTPUT		    "1"
	  }
	  SourceBlock		  "dsPICdrivers/OTHERS/C Function Call"
	  SourceType		  "C Function Call"
	  fctName		  "'ecan1_receive_matlab'"
	  INPUT_SIZE		  "1"
	  INPUT1		  "--"
	  INPUT2		  "--"
	  INPUT3		  "--"
	  OUTPUT_SIZE		  "4"
	  OUTPUT1		  "uint32"
	  SampleTime		  "ecan1_receive_sample_time"
	  InputType		  "[ ]"
	  OutputType		  "[ 6 ]"
	  FctDeclaration	  "extern void ecan1_receive_matlab(uint32_T* y1);"
	  FctCall		  "ecan1_receive_matlab(*%y1);"
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Compare\nTo Zero"
	  Ports			  [1, 1]
	  Position		  [250, 15, 280, 45]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Zero"
	  SourceType		  "Compare To Zero"
	  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"
	  relop			  "~="
	  LogicOutDataTypeMode	  "uint8"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion"
	  Position		  [325, 142, 375, 158]
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Decompose uint64"
	  Ports			  [2, 1]
	  Position		  [235, 66, 315, 124]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Decompose uint64"
	    Location		    [79, 184, 943, 517]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "low-order\nuint32"
	      Position		      [35, 58, 65, 72]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "high-order\nuint1"
	      Position		      [35, 178, 65, 192]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits"
	      Ports		      [1, 1]
	      Position		      [90, 52, 170, 78]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[0 7]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits1"
	      Ports		      [1, 1]
	      Position		      [90, 82, 170, 108]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[8 15]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits2"
	      Ports		      [1, 1]
	      Position		      [90, 112, 170, 138]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[16 23]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits3"
	      Ports		      [1, 1]
	      Position		      [90, 142, 170, 168]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[24 31]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits4"
	      Ports		      [1, 1]
	      Position		      [90, 172, 170, 198]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[0 7]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits5"
	      Ports		      [1, 1]
	      Position		      [90, 202, 170, 228]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[8 15]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits6"
	      Ports		      [1, 1]
	      Position		      [90, 232, 170, 258]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[16 23]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits7"
	      Ports		      [1, 1]
	      Position		      [90, 262, 170, 288]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Extract Bits"
	      SourceType	      "Extract Bits"
	      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"
	      bitsToExtract	      "Range of bits"
	      numBits		      "8"
	      bitIdxRange	      "[24 31]"
	      outScalingMode	      "Treat bit field as an integer"
	    }
	    Block {
	      BlockType		      Mux
	      Name		      "Mux"
	      Ports		      [8, 1]
	      Position		      [290, 55, 295, 285]
	      ShowName		      off
	      Inputs		      "8"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "uint8 array"
	      Position		      [350, 163, 380, 177]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "Extract Bits6"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      7
	    }
	    Line {
	      SrcBlock		      "Extract Bits5"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      6
	    }
	    Line {
	      SrcBlock		      "Extract Bits4"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      5
	    }
	    Line {
	      SrcBlock		      "Extract Bits3"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      4
	    }
	    Line {
	      SrcBlock		      "Extract Bits2"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Extract Bits1"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Extract Bits7"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      8
	    }
	    Line {
	      SrcBlock		      "Extract Bits"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "high-order\nuint1"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		Points			[0, 30]
		Branch {
		  Points		  [0, 30]
		  Branch {
		    DstBlock		    "Extract Bits7"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Extract Bits6"
		    DstPort		    1
		  }
		}
		Branch {
		  DstBlock		  "Extract Bits5"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Extract Bits4"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Mux"
	      SrcPort		      1
	      DstBlock		      "uint8 array"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "low-order\nuint32"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		Points			[0, 30]
		Branch {
		  Points		  [0, 30]
		  Branch {
		    DstBlock		    "Extract Bits3"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Extract Bits2"
		    DstPort		    1
		  }
		}
		Branch {
		  DstBlock		  "Extract Bits1"
		  DstPort		  1
		}
	      }
	      Branch {
		DstBlock		"Extract Bits"
		DstPort			1
	      }
	    }
	  }
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  Ports			  [1, 4]
	  Position		  [185, 45, 190, 165]
	  BackgroundColor	  "black"
	  ShowName		  off
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Extract Bits"
	  Ports			  [1, 1]
	  Position		  [220, 137, 300, 163]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Extract Bits"
	  SourceType		  "Extract Bits"
	  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"
	  bitsToExtract		  "Lower half"
	  numBits		  "8"
	  bitIdxRange		  "[0 7]"
	  outScalingMode	  "Treat bit field as an integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Extract Bits1"
	  Ports			  [1, 1]
	  Position		  [220, 167, 300, 193]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Extract Bits"
	  SourceType		  "Extract Bits"
	  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"
	  bitsToExtract		  "Range of bits"
	  numBits		  "8"
	  bitIdxRange		  "[16 23]"
	  outScalingMode	  "Treat bit field as an integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Extract Bits2"
	  Ports			  [1, 1]
	  Position		  [335, 47, 415, 73]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Extract Bits"
	  SourceType		  "Extract Bits"
	  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"
	  bitsToExtract		  "Range ending with least significant bit"
	  numBits		  "29"
	  bitIdxRange		  "[0 7]"
	  outScalingMode	  "Treat bit field as an integer"
	}
	Block {
	  BlockType		  Outport
	  Name			  "identifier"
	  Position		  [470, 53, 500, 67]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "data"
	  Position		  [375, 88, 405, 102]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "remote"
	  Position		  [405, 143, 435, 157]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "new"
	  Position		  [300, 23, 330, 37]
	  Port			  "4"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "size"
	  Position		  [405, 173, 435, 187]
	  Port			  "5"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Line {
	  SrcBlock		  "Extract Bits1"
	  SrcPort		  1
	  DstBlock		  "size"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Compare\nTo Zero"
	  SrcPort		  1
	  DstBlock		  "new"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Extract Bits2"
	  SrcPort		  1
	  DstBlock		  "identifier"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Decompose uint64"
	  SrcPort		  1
	  DstBlock		  "data"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Extract Bits"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [25, 0]
	  DstBlock		  "Decompose uint64"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion"
	  SrcPort		  1
	  DstBlock		  "remote"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  4
	  Points		  [5, 0]
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Extract Bits1"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Extract Bits"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  Points		  [25, 0]
	  DstBlock		  "Decompose uint64"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [35, 0]
	  Branch {
	    Points		    [0, -30]
	    DstBlock		    "Compare\nTo Zero"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Extract Bits2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "C Function Call\n[ecanFunctions.c]"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Rx UART 1"
      Tag		      "dsPIC_RX"
      Ports		      [0, 1]
      Position		      [175, 583, 245, 637]
      BackgroundColor	      "orange"
      Priority		      "5"
      SourceBlock	      "dsPICdrivers/Serial PORT/Rx Input"
      SourceType	      "Rx"
      UART		      "1"
      SampleTime	      "1e-3"
      BlockingFctChk	      off
      OutputDefault	      "0"
      IsPresentFlagChk	      off
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "SF debugg"
      Position		      [810, 873, 915, 907]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Steering_Front"
      SampleTime	      "5e-3"
    }
    Block {
      BlockType		      Reference
      Name		      "SPI Configuration"
      Tag		      "dsPIC_config_SPI"
      Ports		      []
      Position		      [155, 176, 266, 231]
      BackgroundColor	      "orange"
      Priority		      "2"
      SourceBlock	      "dsPICdrivers/SPI PORT/SPI Configuration"
      SourceType	      "Configure SPI"
      ConfigurationTime	      "At boot time (only once)"
      OrderingInOutPopup      "None"
      SampleTime	      "-1"
      Frame_Enable	      "0"
      Frame_Sync	      "None"
      SPI		      "1"
      MODE		      "MASTER"
      USER_SCALER	      "    20"
      StartEnable	      "Enable"
      SDO_EN		      on
      DATA_LENGTH	      "16 bits"
      SS_EN		      off
      SMP		      "End of bit"
      CKP		      "high"
      CKE		      "Idle to Active"
      Status		      "Mode 1  -    Fsck= Not Available"
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "SR debugg"
      Position		      [810, 943, 915, 977]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Steering_Rear"
      SampleTime	      "5e-3"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation"
      Position		      [370, 715, 400, 745]
      ShowName		      off
      UpperLimit	      "4800"
      LowerLimit	      "3200"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation1"
      Position		      [370, 760, 400, 790]
      ShowName		      off
      UpperLimit	      "4800"
      LowerLimit	      "3200"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      Saturate
      Name		      "Saturation2"
      Position		      [355, 280, 385, 310]
      ShowName		      off
      UpperLimit	      "PWM*0.85"
      LowerLimit	      "-PWM*0.85"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Send ECAN1 Message"
      Ports		      [3]
      Position		      [595, 17, 705, 173]
      BackgroundColor	      "orange"
      ShowPortLabels	      "SignalName"
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      MaskType		      "Send ECAN Message"
      MaskDescription	      "This block allows for the transmission of a message over the ECAN module."
      MaskPromptString	      "Buffer|Identifier|Identifier from input|Ide|Remote|Data|Data length|Data from input|Samp"
      "le time|Trigger on input"
      MaskStyleString	      "edit,edit,checkbox,checkbox,checkbox,edit,edit,checkbox,edit,checkbox"
      MaskTunableValueString  "off,off,off,off,off,off,off,off,off,off"
      MaskCallbackString      "||mEnables = get_param(gcb,'MaskEnables');\nenabled = get_param(gcb, 'identifier_from_i"
      "nput');\nif strcmp(enabled,'on');\n    replace_block([gcb '/identifier'],'Constant','Inport','noprompt');\n    m"
      "Enables{2} = 'off';\n    set_param([gcb '/identifier'],'Port','1');\nelse\n    replace_block([gcb '/identifier']"
      ",'Inport','Constant','noprompt');\n    mEnables{2} = 'on';\n    set_param([gcb '/identifier'],'Value','identifie"
      "r');\nend\nset_param(gcb, 'MaskEnables', mEnables);\n|||data = eval(get_param(gcb, 'data'));\ny = size(data,1);\n"
      "x = size(data,2);\nif y > 1 && x > 1\n    error('Data must be a 1-dimensional vector')\nelse\n    if or(x > 8, y"
      " > 8)\n        error('Data cannot be larger than 8-bytes');\n    end\nend\n\nset_param(gcb, 'data_length', num2s"
      "tr(length(data)));|data_length = eval(get_param(gcb, 'data_length'));\nif or(data_length < 0, data_length > 9)\n"
      "    error('Data cannot be more than 8 bytes or less than 0.')\nend|mEnables = get_param(gcb,'MaskEnables');\nena"
      "bled = get_param(gcb, 'data_from_input');\nif strcmp(enabled,'on');\n    replace_block([gcb '/data'],'Constant',"
      "'Inport','noprompt');\n    replace_block([gcb '/data_length'],'Constant','Inport','noprompt');\n    mEnables{6} "
      "= 'off';\n    mEnables{7} = 'off';\n    port = 1;\n    if ~isempty(find_system(gcb,'LookUnderMasks','all','Name'"
      ",'identifier'))\n        port = 2;\n    end\n    set_param([gcb '/data'],'Port',num2str(port));\n    set_param(["
      "gcb '/data_length'],'Port',num2str(port+1));\nelse\n    replace_block([gcb '/data'],'Inport','Constant','nopromp"
      "t');\n    replace_block([gcb '/data_length'],'Inport','Constant','noprompt');\n    mEnables{6} = 'on';\n    mEna"
      "bles{7} = 'on';\n    set_param([gcb '/data'],'Value','data');\n    set_param([gcb '/data'],'OutDataTypeMode','ui"
      "nt8');\n    set_param([gcb '/data_length'],'Value','data_length');\n    set_param([gcb '/data_length'],'OutDataT"
      "ypeMode','uint8');\nend\nset_param(gcb, 'MaskEnables', mEnables);\n||mEnables = get_param(gcb,'MaskEnables');\ne"
      "nabled = get_param(gcb, 'trigger_on_input');\nc_func_blk = find_system(gcb,'LookUnderMasks','all','FunctionName'"
      ",'dsPIC_C_function_Call');\nif strcmp(enabled,'on');\n    mEnables{9} = 'off';\n    %set_param(c_func_blk,'Sampl"
      "eTime','-1');\n    replace_block([gcb '/trigger'],'Constant','Inport','noprompt');\nelse\n    mEnables{9} = 'on'"
      ";\n    %set_param(c_func_blk,'SampleTime','c_func_sample_time');\n    replace_block([gcb '/trigger'],'Inport','C"
      "onstant','noprompt');\n    %set_param([gcb '/trigger'],'Value','1');\nend\nset_param(gcb, 'MaskEnables', mEnable"
      "s);"
      MaskEnableString	      "on,on,on,on,on,off,off,on,off,on"
      MaskVisibilityString    "on,on,on,on,on,on,off,on,on,on"
      MaskToolTipString	      "on,on,on,on,on,on,on,on,on,on"
      MaskVarAliasString      ",,,,,,,,,"
      MaskVariables	      "buffer=@1;identifier=@2;identifier_from_input=&3;ide=@4;remote=@5;data=@6;data_length=@7;da"
      "ta_from_input=&8;c_func_sample_time=@9;trigger_on_input=@10;"
      MaskDisplay	      "disp('ECAN1 TX');"
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskPortRotate	      "default"
      MaskIconUnits	      "autoscale"
      MaskValueString	      "0|hex2dec('400')|off|off|off|[hex2dec('11') hex2dec('12') hex2dec('13') hex2dec('14')]|4|"
      "on|-1|on"
      MaskTabNameString	      ",,,,,,,,,"
      System {
	Name			"Send ECAN1 Message"
	Location		[1463, 731, 2106, 1133]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "trigger"
	  Position		  [400, 132, 465, 148]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "data"
	  Position		  [35, 227, 100, 243]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "data_length"
	  Position		  [30, 42, 95, 58]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "C-function Call"
	  Ports			  [1, 0, 1]
	  Position		  [485, 159, 560, 201]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "C-function Call"
	    Location		    [742, 195, 1106, 379]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "parameters"
	      Position		      [25, 78, 55, 92]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      EnablePort
	      Name		      "Enable"
	      Ports		      []
	      Position		      [125, 15, 145, 35]
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "ECAN1 Transmit\n[ecanFunctions.c]"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1]
	      Position		      [80, 65, 205, 105]
	      BackgroundColor	      "orange"
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void ecan1_transmit_matlab(uint16_T* u1);"
		FctCall			"ecan1_transmit_matlab(*%u1);"
		fctName			"ecan1_transmit_matlab"
		INPUT_SIZE		"8"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"1"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'ecan1_transmit_matlab'"
	      INPUT_SIZE	      "8"
	      INPUT1		      "uint16"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "c_func_sample_time"
	      InputType		      "[ 4 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void ecan1_transmit_matlab(uint16_T* u1);"
	      FctCall		      "ecan1_transmit_matlab(*%u1);"
	      OrderingInOutPopup      "None"
	    }
	    Line {
	      SrcBlock		      "parameters"
	      SrcPort		      1
	      DstBlock		      "ECAN1 Transmit\n[ecanFunctions.c]"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  Position		  [60, 17, 100, 33]
	  ShowName		  off
	  Value			  "buffer"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  Position		  [60, 152, 100, 168]
	  ShowName		  off
	  Value			  "ide"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant3"
	  Position		  [60, 172, 100, 188]
	  ShowName		  off
	  Value			  "remote"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Extract Bits"
	  Ports			  [1, 1]
	  Position		  [220, 107, 295, 143]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Extract Bits"
	  SourceType		  "Extract Bits"
	  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"
	  bitsToExtract		  "Upper half"
	  numBits		  "8"
	  bitIdxRange		  "[0 7]"
	  outScalingMode	  "Treat bit field as an integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Extract Bits1"
	  Ports			  [1, 1]
	  Position		  [220, 63, 295, 97]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Extract Bits"
	  SourceType		  "Extract Bits"
	  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"
	  bitsToExtract		  "Lower half"
	  numBits		  "8"
	  bitIdxRange		  "[0 7]"
	  outScalingMode	  "Preserve fixed-point scaling"
	}
	Block {
	  BlockType		  Constant
	  Name			  "identifier"
	  Position		  [25, 92, 100, 108]
	  Value			  "identifier"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "myMux"
	  Ports			  [5, 1]
	  Position		  [370, 74, 375, 236]
	  BackgroundColor	  "black"
	  ShowName		  off
	  PermitHierarchicalResolution "ExplicitOnly"
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  MaskType		  "Stateflow"
	  MaskDescription	  "Embedded MATLAB block"
	  MaskDisplay		  "disp('myMux');"
	  MaskSelfModifiable	  on
	  MaskIconFrame		  on
	  MaskIconOpaque	  off
	  MaskIconRotate	  "none"
	  MaskPortRotate	  "default"
	  MaskIconUnits		  "autoscale"
	  System {
	    Name		    "myMux"
	    Location		    [257, 457, 812, 717]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "u1"
	      Position		      [20, 101, 40, 119]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u2"
	      Position		      [20, 136, 40, 154]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u3"
	      Position		      [20, 171, 40, 189]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u4"
	      Position		      [20, 206, 40, 224]
	      Port		      "4"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u5"
	      Position		      [20, 246, 40, 264]
	      Port		      "5"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Demux
	      Name		      " Demux "
	      Ports		      [1, 1]
	      Position		      [270, 220, 320, 260]
	      Outputs		      "1"
	    }
	    Block {
	      BlockType		      "S-Function"
	      Name		      " SFunction "
	      Tag		      "Stateflow S-Function Simurda_CAR4_dsPIC33_ACU44_inverse_direction 8"
	      Ports		      [5, 2]
	      Position		      [180, 100, 230, 220]
	      FunctionName	      "sf_sfun"
	      PortCounts	      "[5 2]"
	      EnableBusSupport	      on
	      Port {
		PortNumber		2
		Name			"y"
		RTWStorageClass		"Auto"
		DataLoggingNameMode	"SignalName"
	      }
	    }
	    Block {
	      BlockType		      Terminator
	      Name		      " Terminator "
	      Position		      [460, 231, 480, 249]
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "y"
	      Position		      [460, 101, 480, 119]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      " SFunction "
	      SrcPort		      1
	      DstBlock		      " Demux "
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "u1"
	      SrcPort		      1
	      DstBlock		      " SFunction "
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "u2"
	      SrcPort		      1
	      DstBlock		      " SFunction "
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "u3"
	      SrcPort		      1
	      DstBlock		      " SFunction "
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "u4"
	      SrcPort		      1
	      DstBlock		      " SFunction "
	      DstPort		      4
	    }
	    Line {
	      SrcBlock		      "u5"
	      SrcPort		      1
	      DstBlock		      " SFunction "
	      DstPort		      5
	    }
	    Line {
	      Name		      "y"
	      Labels		      [0, 0]
	      SrcBlock		      " SFunction "
	      SrcPort		      2
	      DstBlock		      "y"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      " Demux "
	      SrcPort		      1
	      DstBlock		      " Terminator "
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "uint8 combiner1"
	  Ports			  [2, 1]
	  Position		  [220, 150, 295, 190]
	  ShowName		  off
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "uint8 combiner1"
	    Location		    [154, 422, 865, 512]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "high-order"
	      Position		      [25, 13, 55, 27]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "low-order"
	      Position		      [25, 48, 55, 62]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Bitwise\nOperator"
	      Ports		      [2, 1]
	      Position		      [305, 26, 345, 64]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "OR"
	      UseBitMask	      off
	      NumInputPorts	      "2"
	      BitMask		      "bin2dec('11011001')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion"
	      Position		      [85, 49, 135, 61]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion1"
	      Position		      [85, 14, 135, 26]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift\nArithmetic"
	      Ports		      [1, 1]
	      Position		      [185, 46, 265, 64]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "-8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "combined"
	      Position		      [370, 38, 400, 52]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "low-order"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Bitwise\nOperator"
	      SrcPort		      1
	      DstBlock		      "combined"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "high-order"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift\nArithmetic"
	      SrcPort		      1
	      DstBlock		      "Bitwise\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion"
	      SrcPort		      1
	      DstBlock		      "Shift\nArithmetic"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion1"
	      SrcPort		      1
	      Points		      [140, 0; 0, 15]
	      DstBlock		      "Bitwise\nOperator"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "uint8 combiner2"
	  Ports			  [2, 1]
	  Position		  [220, 15, 295, 55]
	  ShowName		  off
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "uint8 combiner2"
	    Location		    [262, 392, 973, 505]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "high-order"
	      Position		      [25, 13, 55, 27]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "low-order"
	      Position		      [25, 48, 55, 62]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Bitwise\nOperator"
	      Ports		      [2, 1]
	      Position		      [305, 26, 345, 64]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	      SourceType	      "Bitwise Operator"
	      logicop		      "OR"
	      UseBitMask	      off
	      NumInputPorts	      "2"
	      BitMask		      "bin2dec('11011001')"
	      BitMaskRealWorld	      "Stored Integer"
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion"
	      Position		      [85, 49, 135, 61]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      DataTypeConversion
	      Name		      "Data Type Conversion1"
	      Position		      [85, 14, 135, 26]
	      ShowName		      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      RndMeth		      "Floor"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift\nArithmetic"
	      Ports		      [1, 1]
	      Position		      [185, 46, 265, 64]
	      ShowName		      off
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "-8"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "combined"
	      Position		      [370, 38, 400, 52]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion1"
	      SrcPort		      1
	      Points		      [140, 0; 0, 15]
	      DstBlock		      "Bitwise\nOperator"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Data Type Conversion"
	      SrcPort		      1
	      DstBlock		      "Shift\nArithmetic"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift\nArithmetic"
	      SrcPort		      1
	      DstBlock		      "Bitwise\nOperator"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "high-order"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Bitwise\nOperator"
	      SrcPort		      1
	      DstBlock		      "combined"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "low-order"
	      SrcPort		      1
	      DstBlock		      "Data Type Conversion"
	      DstPort		      1
	    }
	  }
	}
	Line {
	  SrcBlock		  "trigger"
	  SrcPort		  1
	  Points		  [50, 0]
	  DstBlock		  "C-function Call"
	  DstPort		  enable
	}
	Line {
	  SrcBlock		  "myMux"
	  SrcPort		  1
	  Points		  [0, 25]
	  DstBlock		  "C-function Call"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "uint8 combiner2"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "myMux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant"
	  SrcPort		  1
	  DstBlock		  "uint8 combiner2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "data_length"
	  SrcPort		  1
	  Points		  [95, 0; 0, -5]
	  DstBlock		  "uint8 combiner2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Extract Bits"
	  SrcPort		  1
	  Points		  [25, 0; 0, 30]
	  DstBlock		  "myMux"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Extract Bits1"
	  SrcPort		  1
	  Points		  [35, 0; 0, 35; 20, 0]
	  DstBlock		  "myMux"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "identifier"
	  SrcPort		  1
	  Points		  [85, 0]
	  Branch {
	    Points		    [0, -20]
	    DstBlock		    "Extract Bits1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 25]
	    DstBlock		    "Extract Bits"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "uint8 combiner1"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "myMux"
	  DstPort		  4
	}
	Line {
	  SrcBlock		  "Constant3"
	  SrcPort		  1
	  DstBlock		  "uint8 combiner1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Constant2"
	  SrcPort		  1
	  DstBlock		  "uint8 combiner1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "data"
	  SrcPort		  1
	  Points		  [250, 0]
	  DstBlock		  "myMux"
	  DstPort		  5
	}
      }
    }
    Block {
      BlockType		      DataStoreRead
      Name		      "Steering_Front\nTs = 1e-2"
      Position		      [195, 738, 300, 772]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Steering_Front"
      SampleTime	      "1e-2"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem1"
      Ports		      [3, 5]
      Position		      [775, 597, 895, 723]
      BackgroundColor	      "green"
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"Subsystem1"
	Location		[165, 189, 1186, 859]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "In1"
	  Position		  [30, 93, 60, 107]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "In2"
	  Position		  [25, 368, 55, 382]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Inport
	  Name			  "DIR"
	  Position		  [30, 313, 60, 327]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Add"
	  Ports			  [2, 1]
	  Position		  [535, 251, 565, 284]
	  InputSameDT		  off
	  AccumDataTypeStr	  "uint16"
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^-10"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Add1"
	  Ports			  [2, 1]
	  Position		  [535, 461, 565, 494]
	  InputSameDT		  off
	  AccumDataTypeStr	  "uint16"
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^-10"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Reference
	  Name			  "Compare\nTo Constant"
	  Ports			  [1, 1]
	  Position		  [660, 253, 710, 287]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
	  SourceType		  "Compare To Constant"
	  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"
	  relop			  ">="
	  const			  "1"
	  LogicOutDataTypeMode	  "uint8"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Data Store\nRead"
	  Position		  [260, 29, 325, 91]
	  DataStoreName		  "distance_1"
	  SampleTime		  "0.005"
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Data Store\nRead1"
	  Position		  [260, 134, 325, 196]
	  DataStoreName		  "distance_2"
	  SampleTime		  "0.005"
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Data Store\nRead2"
	  Position		  [260, 369, 325, 431]
	  DataStoreName		  "distance_3"
	  SampleTime		  "0.005"
	}
	Block {
	  BlockType		  DataStoreRead
	  Name			  "Data Store\nRead3"
	  Position		  [260, 474, 325, 536]
	  DataStoreName		  "distance_4"
	  SampleTime		  "0.005"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Distance_filter_1"
	  Ports			  [1, 1]
	  Position		  [410, 173, 470, 247]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Distance_filter_1"
	    Location		    [569, 308, 1064, 701]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [15, 73, 45, 87]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Distance_test"
	      Ports		      [1, 1]
	      Position		      [80, 50, 120, 110]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Distance_test"
		Location		[97, 472, 720, 880]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 150, 255, 165]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [185, 160, 215, 190]
		  BlockRotation		  270
		  UpperLimit		  "5"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Threshold		  "1200"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [160, 208, 195, 242]
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 215; -170, 0]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  DstBlock		  "Saturation"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Noise_filter"
	      Ports		      [1, 1]
	      Position		      [80, 220, 120, 280]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Noise_filter"
		Location		[273, 512, 932, 888]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [40, 103, 70, 117]
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [175, 101, 205, 134]
		  Inputs		  "+-"
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add1"
		  Ports			  [2, 1]
		  Position		  [395, 141, 425, 174]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [250, 103, 300, 137]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "300"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant1"
		  Ports			  [1, 1]
		  Position		  [500, 143, 550, 177]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "2"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Memory
		  Name			  "Memory"
		  Position		  [120, 125, 150, 155]
		  InheritSampleTime	  on
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [185, 155, 215, 185]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [510, 245, 540, 275]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [310, 185, 340, 215]
		  BlockRotation		  270
		  UpperLimit		  "5"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch1"
		  Position		  [400, 219, 455, 271]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Criteria		  "u2 ~= 0"
		  Threshold		  "1000"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [340, 228, 375, 262]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out2"
		  Position		  [605, 153, 635, 167]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  DstBlock		  "Compare\nTo Constant"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  Points		  [50, 0; 0, 75; 120, 0; 0, 50]
		  DstBlock		  "Switch1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Memory"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [-10, 0]
		  DstBlock		  "Saturation"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Switch1"
		  SrcPort		  1
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  Points		  [20, 0]
		  Branch {
		    DstBlock		    "Add"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 30]
		    DstBlock		    "Memory"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant1"
		  SrcPort		  1
		  DstBlock		  "Out2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [95, 0; 0, -20]
		  DstBlock		  "Add1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add1"
		  SrcPort		  1
		  Points		  [40, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant1"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Switch1"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Switch1"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Add1"
		  DstPort		  2
		}
	      }
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [190, 305, 220, 335]
	      BlockMirror	      on
	      NamePlacement	      "alternate"
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem4"
	      Ports		      [1, 1]
	      Position		      [245, 25, 285, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem4"
		Location		[42, 398, 830, 866]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [127, 145, 163, 180]
		  BlockRotation		  270
		  UpperLimit		  "5"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [128, 200, 162, 235]
		  BlockRotation		  270
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  DstBlock		  "Saturation"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    Points		    [0, 215; -170, 0]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem5"
	      Ports		      [1, 1]
	      Position		      [335, 25, 375, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem5"
		Location		[212, 392, 1000, 860]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "10"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [160, 140, 190, 170]
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [315, 120, 345, 150]
		  BlockRotation		  270
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  UpperLimit		  "12"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [258, 180, 292, 215]
		  BlockRotation		  270
		  X0			  "11"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [10, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 60]
		    DstBlock		    "Saturation"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [30, 0]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [0, -15; -20, 0]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, 75]
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Annotation {
		  Position		  [46, 55]
		}
		Annotation {
		  Position		  [648, 7]
		}
		Annotation {
		  Position		  [504, 161]
		}
	      }
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch1"
	      Position		      [165, 94, 220, 146]
	      Criteria		      "u2 ~= 0"
	      Threshold		      "1000"
	      InputSameDT	      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [400, 48, 430, 62]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Distance_test"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Switch1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Noise_filter"
	      SrcPort		      1
	      Points		      [20, 0; 0, -130]
	      DstBlock		      "Switch1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      Points		      [-35, 0]
	      DstBlock		      "Switch1"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Switch1"
	      SrcPort		      1
	      Points		      [0, -65]
	      DstBlock		      "Subsystem4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem4"
	      SrcPort		      1
	      DstBlock		      "Subsystem5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem5"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		DstBlock		"Distance_test"
		DstPort			1
	      }
	      Branch {
		Points			[0, 170]
		DstBlock		"Noise_filter"
		DstPort			1
	      }
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Distance_filter_2"
	  Ports			  [1, 1]
	  Position		  [410, 278, 470, 352]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Distance_filter_2"
	    Location		    [569, 308, 1064, 701]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [15, 73, 45, 87]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Distance_test"
	      Ports		      [1, 1]
	      Position		      [80, 50, 120, 110]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Distance_test"
		Location		[97, 472, 604, 785]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 150, 255, 165]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Threshold		  "1200"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [185, 198, 220, 232]
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [10, 0; 0, -35; -15, 0; 0, -40]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    Points		    [0, 215; -155, 0; 0, -45]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Noise_filter"
	      Ports		      [1, 1]
	      Position		      [80, 220, 120, 280]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Noise_filter"
		Location		[246, 517, 905, 893]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [40, 103, 70, 117]
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [175, 101, 205, 134]
		  Inputs		  "+-"
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add1"
		  Ports			  [2, 1]
		  Position		  [395, 141, 425, 174]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [250, 103, 300, 137]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "300"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant1"
		  Ports			  [1, 1]
		  Position		  [500, 143, 550, 177]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "2"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Memory
		  Name			  "Memory"
		  Position		  [120, 125, 150, 155]
		  InheritSampleTime	  on
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [185, 155, 215, 185]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [510, 245, 540, 275]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch1"
		  Position		  [400, 219, 455, 271]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Criteria		  "u2 ~= 0"
		  Threshold		  "1000"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [340, 228, 375, 262]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out2"
		  Position		  [605, 153, 635, 167]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Switch1"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Add1"
		  SrcPort		  1
		  Points		  [40, 0]
		  Branch {
		    DstBlock		    "Switch1"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant1"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [95, 0; 0, -20]
		  DstBlock		  "Add1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant1"
		  SrcPort		  1
		  DstBlock		  "Out2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  Points		  [20, 0]
		  Branch {
		    Points		    [0, 30]
		    DstBlock		    "Memory"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Add"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch1"
		  SrcPort		  1
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [-10, 0; 0, -80]
		  DstBlock		  "Add1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Memory"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  Points		  [50, 0; 0, 75; 120, 0; 0, 50]
		  DstBlock		  "Switch1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  DstBlock		  "Compare\nTo Constant"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [190, 305, 220, 335]
	      BlockMirror	      on
	      NamePlacement	      "alternate"
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem4"
	      Ports		      [1, 1]
	      Position		      [245, 25, 285, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem4"
		Location		[447, 381, 1235, 849]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [128, 180, 162, 215]
		  BlockRotation		  270
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 215; -170, 0]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [0, -35]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem5"
	      Ports		      [1, 1]
	      Position		      [335, 25, 375, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem5"
		Location		[303, 386, 1091, 854]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "10"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [160, 140, 190, 170]
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [315, 120, 345, 150]
		  BlockRotation		  270
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  UpperLimit		  "12"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [258, 180, 292, 215]
		  BlockRotation		  270
		  X0			  "11"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, 75]
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [0, -15; -20, 0]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [30, 0]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [10, 0]
		  Branch {
		    Points		    [0, 60]
		    DstBlock		    "Saturation"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Annotation {
		  Position		  [504, 161]
		}
		Annotation {
		  Position		  [648, 7]
		}
		Annotation {
		  Position		  [46, 55]
		}
	      }
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch1"
	      Position		      [165, 94, 220, 146]
	      Criteria		      "u2 ~= 0"
	      Threshold		      "1000"
	      InputSameDT	      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [400, 48, 430, 62]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		Points			[0, 170]
		DstBlock		"Noise_filter"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Distance_test"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Subsystem5"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem4"
	      SrcPort		      1
	      DstBlock		      "Subsystem5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Switch1"
	      SrcPort		      1
	      Points		      [0, -65]
	      DstBlock		      "Subsystem4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      Points		      [-35, 0]
	      DstBlock		      "Switch1"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Noise_filter"
	      SrcPort		      1
	      Points		      [20, 0; 0, -130]
	      DstBlock		      "Switch1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Distance_test"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Switch1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Distance_filter_3"
	  Ports			  [1, 1]
	  Position		  [430, 408, 490, 482]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Distance_filter_3"
	    Location		    [569, 308, 1064, 701]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [15, 73, 45, 87]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Distance_test"
	      Ports		      [1, 1]
	      Position		      [80, 50, 120, 110]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Distance_test"
		Location		[97, 472, 720, 880]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 150, 255, 165]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [185, 160, 215, 190]
		  BlockRotation		  270
		  UpperLimit		  "5"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Threshold		  "1200"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [160, 208, 195, 242]
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 215; -170, 0]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  DstBlock		  "Saturation"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Noise_filter"
	      Ports		      [1, 1]
	      Position		      [80, 220, 120, 280]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Noise_filter"
		Location		[273, 512, 932, 888]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [40, 103, 70, 117]
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [175, 101, 205, 134]
		  Inputs		  "+-"
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add1"
		  Ports			  [2, 1]
		  Position		  [395, 141, 425, 174]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [250, 103, 300, 137]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "300"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant1"
		  Ports			  [1, 1]
		  Position		  [500, 143, 550, 177]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "2"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Memory
		  Name			  "Memory"
		  Position		  [120, 125, 150, 155]
		  InheritSampleTime	  on
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [185, 155, 215, 185]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [510, 245, 540, 275]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [310, 185, 340, 215]
		  BlockRotation		  270
		  UpperLimit		  "5"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch1"
		  Position		  [400, 219, 455, 271]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Criteria		  "u2 ~= 0"
		  Threshold		  "1000"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [340, 228, 375, 262]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out2"
		  Position		  [605, 153, 635, 167]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  DstBlock		  "Compare\nTo Constant"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  Points		  [50, 0; 0, 75; 120, 0; 0, 50]
		  DstBlock		  "Switch1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Memory"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [-10, 0]
		  DstBlock		  "Saturation"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Switch1"
		  SrcPort		  1
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  Points		  [20, 0]
		  Branch {
		    DstBlock		    "Add"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 30]
		    DstBlock		    "Memory"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant1"
		  SrcPort		  1
		  DstBlock		  "Out2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [95, 0; 0, -20]
		  DstBlock		  "Add1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add1"
		  SrcPort		  1
		  Points		  [40, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant1"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Switch1"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Switch1"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Add1"
		  DstPort		  2
		}
	      }
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [190, 305, 220, 335]
	      BlockMirror	      on
	      NamePlacement	      "alternate"
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem4"
	      Ports		      [1, 1]
	      Position		      [245, 25, 285, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem4"
		Location		[42, 398, 830, 866]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [127, 145, 163, 180]
		  BlockRotation		  270
		  UpperLimit		  "5"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [128, 200, 162, 235]
		  BlockRotation		  270
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  DstBlock		  "Saturation"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    Points		    [0, 215; -170, 0]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem5"
	      Ports		      [1, 1]
	      Position		      [335, 25, 375, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem5"
		Location		[212, 392, 1000, 860]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "10"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [160, 140, 190, 170]
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [315, 120, 345, 150]
		  BlockRotation		  270
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  UpperLimit		  "12"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [258, 180, 292, 215]
		  BlockRotation		  270
		  X0			  "11"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [10, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 60]
		    DstBlock		    "Saturation"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [30, 0]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [0, -15; -20, 0]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, 75]
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Annotation {
		  Position		  [46, 55]
		}
		Annotation {
		  Position		  [648, 7]
		}
		Annotation {
		  Position		  [504, 161]
		}
	      }
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch1"
	      Position		      [165, 94, 220, 146]
	      Criteria		      "u2 ~= 0"
	      Threshold		      "1000"
	      InputSameDT	      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [400, 48, 430, 62]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Distance_test"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Switch1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Noise_filter"
	      SrcPort		      1
	      Points		      [20, 0; 0, -130]
	      DstBlock		      "Switch1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      Points		      [-35, 0]
	      DstBlock		      "Switch1"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Switch1"
	      SrcPort		      1
	      Points		      [0, -65]
	      DstBlock		      "Subsystem4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem4"
	      SrcPort		      1
	      DstBlock		      "Subsystem5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem5"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		DstBlock		"Distance_test"
		DstPort			1
	      }
	      Branch {
		Points			[0, 170]
		DstBlock		"Noise_filter"
		DstPort			1
	      }
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Distance_filter_4"
	  Ports			  [1, 1]
	  Position		  [430, 513, 490, 587]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Distance_filter_4"
	    Location		    [569, 308, 1064, 701]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [15, 73, 45, 87]
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Distance_test"
	      Ports		      [1, 1]
	      Position		      [80, 50, 120, 110]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Distance_test"
		Location		[97, 472, 604, 785]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 150, 255, 165]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Threshold		  "1200"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [185, 198, 220, 232]
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [10, 0; 0, -35; -15, 0; 0, -40]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    Points		    [0, 215; -155, 0; 0, -45]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Noise_filter"
	      Ports		      [1, 1]
	      Position		      [80, 220, 120, 280]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Noise_filter"
		Location		[246, 517, 905, 893]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [40, 103, 70, 117]
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [175, 101, 205, 134]
		  Inputs		  "+-"
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add1"
		  Ports			  [2, 1]
		  Position		  [395, 141, 425, 174]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [250, 103, 300, 137]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "300"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant1"
		  Ports			  [1, 1]
		  Position		  [500, 143, 550, 177]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "2"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Memory
		  Name			  "Memory"
		  Position		  [120, 125, 150, 155]
		  InheritSampleTime	  on
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [185, 155, 215, 185]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [510, 245, 540, 275]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch1"
		  Position		  [400, 219, 455, 271]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Criteria		  "u2 ~= 0"
		  Threshold		  "1000"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [340, 228, 375, 262]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out2"
		  Position		  [605, 153, 635, 167]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Switch1"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Add1"
		  SrcPort		  1
		  Points		  [40, 0]
		  Branch {
		    DstBlock		    "Switch1"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant1"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [95, 0; 0, -20]
		  DstBlock		  "Add1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant1"
		  SrcPort		  1
		  DstBlock		  "Out2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  Points		  [20, 0]
		  Branch {
		    Points		    [0, 30]
		    DstBlock		    "Memory"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Add"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch1"
		  SrcPort		  1
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [-10, 0; 0, -80]
		  DstBlock		  "Add1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Memory"
		  SrcPort		  1
		  Points		  [0, -15]
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  Points		  [50, 0; 0, 75; 120, 0; 0, 50]
		  DstBlock		  "Switch1"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  DstBlock		  "Compare\nTo Constant"
		  DstPort		  1
		}
	      }
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [190, 305, 220, 335]
	      BlockMirror	      on
	      NamePlacement	      "alternate"
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem4"
	      Ports		      [1, 1]
	      Position		      [245, 25, 285, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem4"
		Location		[301, 422, 1089, 890]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  ">"
		  const			  "3"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [280, 160, 310, 190]
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [128, 180, 162, 215]
		  BlockRotation		  270
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [15, 0]
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		  Branch {
		    Points		    [0, 215; -170, 0]
		    DstBlock		    "Unit Delay"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [0, -35]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [0, 20; 65, 0; 0, -55]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
	      }
	    }
	    Block {
	      BlockType		      SubSystem
	      Name		      "Subsystem5"
	      Ports		      [1, 1]
	      Position		      [335, 25, 375, 85]
	      MinAlgLoopOccurrences   off
	      PropExecContextOutsideSubsystem off
	      RTWSystemCode	      "Auto"
	      FunctionWithSeparateData off
	      Opaque		      off
	      RequestExecContextInheritance off
	      MaskHideContents	      off
	      System {
		Name			"Subsystem5"
		Location		[303, 386, 1091, 854]
		Open			off
		ModelBrowserVisibility	off
		ModelBrowserWidth	200
		ScreenColor		"white"
		PaperOrientation	"landscape"
		PaperPositionMode	"auto"
		PaperType		"usletter"
		PaperUnits		"inches"
		TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
		TiledPageScale		1
		ShowPageBoundaries	off
		ZoomFactor		"100"
		Block {
		  BlockType		  Inport
		  Name			  "In1"
		  Position		  [225, 290, 255, 305]
		  BlockRotation		  270
		  IconDisplay		  "Port number"
		}
		Block {
		  BlockType		  Sum
		  Name			  "Add"
		  Ports			  [2, 1]
		  Position		  [265, 26, 295, 59]
		  InputSameDT		  off
		  AccumDataTypeStr	  "uint16"
		  OutDataTypeMode	  "uint16"
		  OutDataType		  "sfix(16)"
		  OutScaling		  "2^-10"
		  OutDataTypeStr	  "uint16"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  Reference
		  Name			  "Compare\nTo Constant"
		  Ports			  [1, 1]
		  Position		  [340, 28, 390, 62]
		  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
		  SourceType		  "Compare To Constant"
		  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"
		  relop			  "<"
		  const			  "10"
		  LogicOutDataTypeMode	  "uint8"
		  ZeroCross		  off
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read1"
		  Position		  [160, 140, 190, 170]
		  NamePlacement		  "alternate"
		  Value			  "0"
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Constant
		  Name			  "Pointer_to_read2"
		  Position		  [50, 35, 80, 65]
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		}
		Block {
		  BlockType		  Saturate
		  Name			  "Saturation"
		  Position		  [315, 120, 345, 150]
		  BlockRotation		  270
		  BlockMirror		  on
		  NamePlacement		  "alternate"
		  UpperLimit		  "12"
		  LowerLimit		  "0"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		}
		Block {
		  BlockType		  Switch
		  Name			  "Switch2"
		  Position		  [214, 70, 266, 125]
		  BlockRotation		  270
		  Criteria		  "u2 ~= 0"
		  Threshold		  "900"
		  InputSameDT		  off
		  OutDataTypeMode	  "uint8"
		  OutDataType		  "fixdt(1, 16)"
		  OutScaling		  "2^0"
		  OutDataTypeStr	  "uint8"
		  SaturateOnIntegerOverflow off
		}
		Block {
		  BlockType		  UnitDelay
		  Name			  "Unit Delay"
		  Position		  [258, 180, 292, 215]
		  BlockRotation		  270
		  X0			  "11"
		  SampleTime		  "-1"
		}
		Block {
		  BlockType		  Outport
		  Name			  "Out1"
		  Position		  [445, 38, 475, 52]
		  IconDisplay		  "Port number"
		}
		Line {
		  SrcBlock		  "Saturation"
		  SrcPort		  1
		  Points		  [0, 75]
		  DstBlock		  "Unit Delay"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Unit Delay"
		  SrcPort		  1
		  Points		  [0, -15; -20, 0]
		  DstBlock		  "Switch2"
		  DstPort		  3
		}
		Line {
		  SrcBlock		  "Pointer_to_read1"
		  SrcPort		  1
		  Points		  [30, 0]
		  DstBlock		  "Switch2"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Compare\nTo Constant"
		  SrcPort		  1
		  DstBlock		  "Out1"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Pointer_to_read2"
		  SrcPort		  1
		  DstBlock		  "Add"
		  DstPort		  2
		}
		Line {
		  SrcBlock		  "Switch2"
		  SrcPort		  1
		  Points		  [0, -30]
		  DstBlock		  "Add"
		  DstPort		  1
		}
		Line {
		  SrcBlock		  "Add"
		  SrcPort		  1
		  Points		  [10, 0]
		  Branch {
		    Points		    [0, 60]
		    DstBlock		    "Saturation"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Compare\nTo Constant"
		    DstPort		    1
		  }
		}
		Line {
		  SrcBlock		  "In1"
		  SrcPort		  1
		  DstBlock		  "Switch2"
		  DstPort		  2
		}
		Annotation {
		  Position		  [504, 161]
		}
		Annotation {
		  Position		  [648, 7]
		}
		Annotation {
		  Position		  [46, 55]
		}
	      }
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch1"
	      Position		      [165, 94, 220, 146]
	      Criteria		      "u2 ~= 0"
	      Threshold		      "1000"
	      InputSameDT	      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [400, 48, 430, 62]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [10, 0]
	      Branch {
		Points			[0, 170]
		DstBlock		"Noise_filter"
		DstPort			1
	      }
	      Branch {
		DstBlock		"Distance_test"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Subsystem5"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Subsystem4"
	      SrcPort		      1
	      DstBlock		      "Subsystem5"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Switch1"
	      SrcPort		      1
	      Points		      [0, -65]
	      DstBlock		      "Subsystem4"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      Points		      [-35, 0]
	      DstBlock		      "Switch1"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Noise_filter"
	      SrcPort		      1
	      Points		      [20, 0; 0, -130]
	      DstBlock		      "Switch1"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Distance_test"
	      SrcPort		      1
	      Points		      [25, 0]
	      DstBlock		      "Switch1"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Sharp1"
	  Ports			  [1, 1]
	  Position		  [125, 56, 210, 144]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Sharp1"
	    Location		    [58, 388, 1262, 720]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Address"
	      Position		      [130, 78, 160, 92]
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Config_slave"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [3, 1]
	      Position		      [220, 141, 365, 199]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
		FctCall			"LD_two_bytes_config_I2C(%u1, %u2, %u3);"
		fctName			"LD_two_bytes_config_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"3"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_two_bytes_config_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "uint8"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "0.005"
	      InputType		      "[ 2 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
	      FctCall		      "LD_two_bytes_config_I2C(%u1, %u2, %u3);"
	      OrderingInOutPopup      "Output"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite"
	      Position		      [1055, 115, 1120, 185]
	      DataStoreName	      "distance_1"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Init_reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [3, 1]
	      Position		      [440, 130, 565, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
		FctCall			"LD_prepare_read_I2C(%u1, %u2);"
		fctName			"LD_prepare_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"2"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_prepare_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
	      FctCall		      "LD_prepare_read_I2C(%u1, %u2);"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read"
	      Position		      [315, 75, 345, 105]
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [130, 155, 160, 185]
	      Value		      "70"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read4"
	      Position		      [130, 220, 160, 250]
	      Value		      "131"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 1]
	      Position		      [610, 130, 735, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void two_bytes_read_I2C();"
		FctCall			"two_bytes_read_I2C();"
		fctName			"two_bytes_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'two_bytes_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void two_bytes_read_I2C();"
	      FctCall		      "two_bytes_read_I2C();"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Sending_temperature"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 2]
	      Position		      [765, 130, 890, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern uint16_T recieve_I2C();"
		FctCall			"%y1 = recieve_I2C();"
		fctName			"recieve_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"1"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'recieve_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "uint16"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ 4 ]"
	      FctDeclaration	      "extern uint16_T recieve_I2C();"
	      FctCall		      "%y1 = recieve_I2C();"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift\nArithmetic"
	      Ports		      [1, 1]
	      Position		      [945, 130, 1025, 170]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "4"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Ordering"
	      Position		      [1145, 143, 1175, 157]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Reading"
	      SrcPort		      1
	      DstBlock		      "Sending_temperature"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Init_reading"
	      SrcPort		      1
	      DstBlock		      "Reading"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Config_slave"
	      SrcPort		      1
	      Points		      [55, 0]
	      DstBlock		      "Init_reading"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read"
	      SrcPort		      1
	      Points		      [45, 0; 0, 60]
	      DstBlock		      "Init_reading"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      DstBlock		      "Config_slave"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read4"
	      SrcPort		      1
	      Points		      [40, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Address"
	      SrcPort		      1
	      Points		      [30, 0]
	      Branch {
		Points			[90, 0; 0, -35; 140, 0]
		DstBlock		"Init_reading"
		DstPort			1
	      }
	      Branch {
		Points			[0, 65]
		DstBlock		"Config_slave"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Sending_temperature"
	      SrcPort		      1
	      Points		      [0, 10]
	      DstBlock		      "Shift\nArithmetic"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sending_temperature"
	      SrcPort		      2
	      Points		      [45, 0; 0, 55; 190, 0]
	      DstBlock		      "Ordering"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift\nArithmetic"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Sharp2"
	  Ports			  [2]
	  Position		  [120, 203, 205, 292]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Sharp2"
	    Location		    [2, 481, 1146, 813]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Address"
	      Position		      [115, 78, 145, 92]
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Ordering"
	      Position		      [65, 193, 95, 207]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Config_slave"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [4, 1]
	      Position		      [220, 139, 365, 196]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
		FctCall			"LD_two_bytes_config_I2C(%u1, %u2, %u3);"
		fctName			"LD_two_bytes_config_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"3"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_two_bytes_config_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "uint8"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ 2 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
	      FctCall		      "LD_two_bytes_config_I2C(%u1, %u2, %u3);"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite"
	      Position		      [1070, 115, 1135, 185]
	      DataStoreName	      "distance_2"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Init_reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [3, 1]
	      Position		      [440, 135, 565, 175]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
		FctCall			"LD_prepare_read_I2C(%u1, %u2);"
		fctName			"LD_prepare_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"2"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_prepare_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
	      FctCall		      "LD_prepare_read_I2C(%u1, %u2);"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read"
	      Position		      [315, 75, 345, 105]
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [130, 150, 160, 180]
	      Value		      "86"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read4"
	      Position		      [130, 220, 160, 250]
	      Value		      "131"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 1]
	      Position		      [610, 130, 735, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void two_bytes_read_I2C();"
		FctCall			"two_bytes_read_I2C();"
		fctName			"two_bytes_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'two_bytes_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void two_bytes_read_I2C();"
	      FctCall		      "two_bytes_read_I2C();"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Sending_temperature"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 1]
	      Position		      [775, 130, 900, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern uint16_T recieve_I2C();"
		FctCall			"%y1 = recieve_I2C();"
		fctName			"recieve_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"1"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'recieve_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "uint16"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ 4 ]"
	      FctDeclaration	      "extern uint16_T recieve_I2C();"
	      FctCall		      "%y1 = recieve_I2C();"
	      OrderingInOutPopup      "Input"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift\nArithmetic"
	      Ports		      [1, 1]
	      Position		      [945, 130, 1025, 170]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "4"
	      nBinPtShiftRight	      "0"
	    }
	    Line {
	      SrcBlock		      "Sending_temperature"
	      SrcPort		      1
	      DstBlock		      "Shift\nArithmetic"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Address"
	      SrcPort		      1
	      Points		      [45, 0]
	      Branch {
		Points			[0, 60]
		DstBlock		"Config_slave"
		DstPort			1
	      }
	      Branch {
		Points			[90, 0; 0, -35; 140, 0]
		DstBlock		"Init_reading"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read4"
	      SrcPort		      1
	      Points		      [40, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      Points		      [40, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read"
	      SrcPort		      1
	      Points		      [45, 0; 0, 65]
	      DstBlock		      "Init_reading"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Config_slave"
	      SrcPort		      1
	      DstBlock		      "Init_reading"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Init_reading"
	      SrcPort		      1
	      Points		      [0, -5]
	      DstBlock		      "Reading"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Reading"
	      SrcPort		      1
	      DstBlock		      "Sending_temperature"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift\nArithmetic"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Ordering"
	      SrcPort		      1
	      Points		      [105, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      4
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Sharp3"
	  Ports			  [1, 1]
	  Position		  [120, 331, 205, 419]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Sharp3"
	    Location		    [58, 388, 1262, 720]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Address"
	      Position		      [130, 78, 160, 92]
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Config_slave"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [3, 1]
	      Position		      [220, 141, 365, 199]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
		FctCall			"LD_two_bytes_config_I2C(%u1, %u2, %u3);"
		fctName			"LD_two_bytes_config_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"3"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_two_bytes_config_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "uint8"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "0.005"
	      InputType		      "[ 2 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
	      FctCall		      "LD_two_bytes_config_I2C(%u1, %u2, %u3);"
	      OrderingInOutPopup      "Output"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite"
	      Position		      [1055, 115, 1120, 185]
	      DataStoreName	      "distance_3"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Init_reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [3, 1]
	      Position		      [440, 130, 565, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
		FctCall			"LD_prepare_read_I2C(%u1, %u2);"
		fctName			"LD_prepare_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"2"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_prepare_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
	      FctCall		      "LD_prepare_read_I2C(%u1, %u2);"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read"
	      Position		      [315, 75, 345, 105]
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [130, 155, 160, 185]
	      Value		      "70"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read4"
	      Position		      [130, 220, 160, 250]
	      Value		      "131"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 1]
	      Position		      [610, 130, 735, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void two_bytes_read_I2C();"
		FctCall			"two_bytes_read_I2C();"
		fctName			"two_bytes_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'two_bytes_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void two_bytes_read_I2C();"
	      FctCall		      "two_bytes_read_I2C();"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Sending_temperature"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 2]
	      Position		      [765, 130, 890, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern uint16_T recieve_I2C();"
		FctCall			"%y1 = recieve_I2C();"
		fctName			"recieve_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"1"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'recieve_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "uint16"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ 4 ]"
	      FctDeclaration	      "extern uint16_T recieve_I2C();"
	      FctCall		      "%y1 = recieve_I2C();"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift\nArithmetic"
	      Ports		      [1, 1]
	      Position		      [945, 130, 1025, 170]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "4"
	      nBinPtShiftRight	      "0"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Ordering"
	      Position		      [1145, 143, 1175, 157]
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Reading"
	      SrcPort		      1
	      DstBlock		      "Sending_temperature"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Init_reading"
	      SrcPort		      1
	      DstBlock		      "Reading"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Config_slave"
	      SrcPort		      1
	      Points		      [55, 0]
	      DstBlock		      "Init_reading"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read"
	      SrcPort		      1
	      Points		      [45, 0; 0, 60]
	      DstBlock		      "Init_reading"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      DstBlock		      "Config_slave"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read4"
	      SrcPort		      1
	      Points		      [40, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Address"
	      SrcPort		      1
	      Points		      [30, 0]
	      Branch {
		Points			[90, 0; 0, -35; 140, 0]
		DstBlock		"Init_reading"
		DstPort			1
	      }
	      Branch {
		Points			[0, 65]
		DstBlock		"Config_slave"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Sending_temperature"
	      SrcPort		      1
	      Points		      [0, 10]
	      DstBlock		      "Shift\nArithmetic"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Sending_temperature"
	      SrcPort		      2
	      Points		      [45, 0; 0, 55; 190, 0]
	      DstBlock		      "Ordering"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift\nArithmetic"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Sharp4"
	  Ports			  [2]
	  Position		  [115, 478, 200, 567]
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Sharp4"
	    Location		    [2, 481, 1146, 813]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Address"
	      Position		      [115, 78, 145, 92]
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Ordering"
	      Position		      [65, 193, 95, 207]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Config_slave"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [4, 1]
	      Position		      [220, 139, 365, 196]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
		FctCall			"LD_two_bytes_config_I2C(%u1, %u2, %u3);"
		fctName			"LD_two_bytes_config_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"3"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_two_bytes_config_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "uint8"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ 2 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_two_bytes_config_I2C(uint8_T u1, uint8_T u2, uint8_T u3);"
	      FctCall		      "LD_two_bytes_config_I2C(%u1, %u2, %u3);"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite"
	      Position		      [1070, 115, 1135, 185]
	      DataStoreName	      "distance_4"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Init_reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [3, 1]
	      Position		      [440, 135, 565, 175]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
		FctCall			"LD_prepare_read_I2C(%u1, %u2);"
		fctName			"LD_prepare_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"2"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'LD_prepare_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "uint8"
	      INPUT2		      "uint8"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ 2 2 ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void LD_prepare_read_I2C(uint8_T u1, uint8_T u2);"
	      FctCall		      "LD_prepare_read_I2C(%u1, %u2);"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read"
	      Position		      [315, 75, 345, 105]
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read3"
	      Position		      [130, 150, 160, 180]
	      Value		      "86"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "Pointer_to_read4"
	      Position		      [130, 220, 160, 250]
	      Value		      "131"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Reading"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 1]
	      Position		      [610, 130, 735, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void two_bytes_read_I2C();"
		FctCall			"two_bytes_read_I2C();"
		fctName			"two_bytes_read_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"0"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'two_bytes_read_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "--"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ ]"
	      FctDeclaration	      "extern void two_bytes_read_I2C();"
	      FctCall		      "two_bytes_read_I2C();"
	      OrderingInOutPopup      "Input & Output"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Sending_temperature"
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1, 1]
	      Position		      [775, 130, 900, 170]
	      List {
		ListType		RTWdata
		FctDeclaration		"extern uint16_T recieve_I2C();"
		FctCall			"%y1 = recieve_I2C();"
		fctName			"recieve_I2C"
		INPUT_SIZE		"1"
		OUTPUT_SIZE		"1"
		NBR_INPUT		"0"
		NBR_OUTPUT		"1"
	      }
	      SourceBlock	      "dsPICdrivers/OTHERS/C Function Call"
	      SourceType	      "C Function Call"
	      fctName		      "'recieve_I2C'"
	      INPUT_SIZE	      "1"
	      INPUT1		      "--"
	      INPUT2		      "--"
	      INPUT3		      "--"
	      OUTPUT_SIZE	      "1"
	      OUTPUT1		      "uint16"
	      SampleTime	      "-1"
	      InputType		      "[ ]"
	      OutputType	      "[ 4 ]"
	      FctDeclaration	      "extern uint16_T recieve_I2C();"
	      FctCall		      "%y1 = recieve_I2C();"
	      OrderingInOutPopup      "Input"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Shift\nArithmetic"
	      Ports		      [1, 1]
	      Position		      [945, 130, 1025, 170]
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	      SourceType	      "Shift Arithmetic"
	      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"
	      nBitShiftRight	      "4"
	      nBinPtShiftRight	      "0"
	    }
	    Line {
	      SrcBlock		      "Sending_temperature"
	      SrcPort		      1
	      DstBlock		      "Shift\nArithmetic"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Address"
	      SrcPort		      1
	      Points		      [45, 0]
	      Branch {
		Points			[0, 60]
		DstBlock		"Config_slave"
		DstPort			1
	      }
	      Branch {
		Points			[90, 0; 0, -35; 140, 0]
		DstBlock		"Init_reading"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read4"
	      SrcPort		      1
	      Points		      [40, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read3"
	      SrcPort		      1
	      Points		      [40, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Pointer_to_read"
	      SrcPort		      1
	      Points		      [45, 0; 0, 65]
	      DstBlock		      "Init_reading"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Config_slave"
	      SrcPort		      1
	      DstBlock		      "Init_reading"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Init_reading"
	      SrcPort		      1
	      Points		      [0, -5]
	      DstBlock		      "Reading"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Reading"
	      SrcPort		      1
	      DstBlock		      "Sending_temperature"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Shift\nArithmetic"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Ordering"
	      SrcPort		      1
	      Points		      [105, 0]
	      DstBlock		      "Config_slave"
	      DstPort		      4
	    }
	  }
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch1"
	  Position		  [595, 324, 650, 376]
	  Criteria		  "u2 ~= 0"
	  Threshold		  "1000"
	  InputSameDT		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Outport
	  Name			  "distance_1"
	  Position		  [780, 63, 810, 77]
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "distance_2"
	  Position		  [775, 183, 805, 197]
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "distance_3"
	  Position		  [745, 343, 775, 357]
	  Port			  "3"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "distance_4"
	  Position		  [740, 433, 770, 447]
	  Port			  "4"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "stop_go"
	  Position		  [760, 253, 790, 267]
	  Port			  "5"
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "In1"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, 125]
	    DstBlock		    "Sharp2"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Sharp1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Store\nRead"
	  SrcPort		  1
	  Points		  [45, 0]
	  Branch {
	    Points		    [0, 150]
	    DstBlock		    "Distance_filter_1"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [350, 0; 0, 20; 40, 0]
	    DstBlock		    "distance_1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sharp1"
	  SrcPort		  1
	  Points		  [0, 215; -110, 0]
	  DstBlock		  "Sharp2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Data Store\nRead1"
	  SrcPort		  1
	  Points		  [25, 0]
	  Branch {
	    Points		    [0, 150]
	    DstBlock		    "Distance_filter_2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [370, 0; 0, 5; 35, 0]
	    DstBlock		    "distance_2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Distance_filter_1"
	  SrcPort		  1
	  Points		  [20, 0; 0, 50]
	  DstBlock		  "Add"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Distance_filter_2"
	  SrcPort		  1
	  Points		  [20, 0; 0, -40]
	  DstBlock		  "Add"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Compare\nTo Constant"
	  SrcPort		  1
	  Points		  [30, 0]
	  DstBlock		  "stop_go"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "In2"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, 125]
	    DstBlock		    "Sharp4"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Sharp3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Sharp3"
	  SrcPort		  1
	  Points		  [0, 215; -110, 0]
	  DstBlock		  "Sharp4"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Data Store\nRead2"
	  SrcPort		  1
	  Points		  [50, 0]
	  Branch {
	    Points		    [0, 45]
	    DstBlock		    "Distance_filter_3"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [345, 0; 0, -50]
	    DstBlock		    "distance_3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Store\nRead3"
	  SrcPort		  1
	  Points		  [50, 0]
	  Branch {
	    Points		    [0, 45]
	    DstBlock		    "Distance_filter_4"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [345, 0]
	    DstBlock		    "distance_4"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Distance_filter_3"
	  SrcPort		  1
	  Points		  [20, 0; 0, 25]
	  DstBlock		  "Add1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Distance_filter_4"
	  SrcPort		  1
	  Points		  [25, 0]
	  DstBlock		  "Add1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Add"
	  SrcPort		  1
	  Points		  [5, 0; 0, 65]
	  DstBlock		  "Switch1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Add1"
	  SrcPort		  1
	  Points		  [10, 0]
	  DstBlock		  "Switch1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Switch1"
	  SrcPort		  1
	  Points		  [0, -55; -10, 0]
	  DstBlock		  "Compare\nTo Constant"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "DIR"
	  SrcPort		  1
	  Points		  [30, 0; 0, 5; 300, 0; 0, 45; 175, 0; 0, -20]
	  DstBlock		  "Switch1"
	  DstPort		  2
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Subsystem2"
      Ports		      [1, 2]
      Position		      [423, 510, 492, 615]
      BlockRotation	      270
      BackgroundColor	      "green"
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"Subsystem2"
	Location		[157, 259, 639, 558]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "stop_go"
	  Position		  [400, 100, 430, 115]
	  BlockRotation		  270
	  BlockMirror		  on
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion6"
	  Position		  [290, 90, 350, 100]
	  BlockRotation		  270
	  ShowName		  off
	  OutDataTypeMode	  "boolean"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "boolean"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Inverse_direction\n_for_a_While"
	  Ports			  [1, 1]
	  Position		  [335, 145, 375, 205]
	  BlockMirror		  on
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Inverse_direction\n_for_a_While"
	    Location		    [672, 540, 1121, 817]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "In1"
	      Position		      [385, 38, 415, 52]
	      BlockMirror	      on
	      IconDisplay	      "Port number"
	    }
	    Block {
	      BlockType		      Sum
	      Name		      "Add"
	      Ports		      [2, 1]
	      Position		      [185, 34, 230, 76]
	      BlockMirror	      on
	      NamePlacement	      "alternate"
	      InputSameDT	      off
	      AccumDataTypeStr	      "uint16"
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^-10"
	      OutDataTypeStr	      "uint16"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Compare\nTo Constant2"
	      Ports		      [1, 1]
	      Position		      [95, 31, 145, 79]
	      BlockMirror	      on
	      NamePlacement	      "alternate"
	      SourceBlock	      "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
	      SourceType	      "Compare To Constant"
	      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"
	      relop		      "<"
	      const		      "13"
	      LogicOutDataTypeMode    "uint8"
	      ZeroCross		      off
	    }
	    Block {
	      BlockType		      Switch
	      Name		      "Switch3"
	      Position		      [269, 85, 321, 140]
	      BlockRotation	      270
	      Criteria		      "u2 ~= 0"
	      Threshold		      "1000"
	      InputSameDT	      off
	      OutDataTypeMode	      "uint16"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint16"
	      SaturateOnIntegerOverflow	off
	    }
	    Block {
	      BlockType		      UnitDelay
	      Name		      "Unit Delay2"
	      Position		      [185, 108, 220, 142]
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      Constant
	      Name		      "go3"
	      Position		      [295, 230, 325, 260]
	      BlockRotation	      270
	      Value		      "0"
	      OutDataTypeMode	      "uint8"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	      OutDataTypeStr	      "uint8"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "Out1"
	      Position		      [25, 48, 55, 62]
	      BlockMirror	      on
	      IconDisplay	      "Port number"
	    }
	    Line {
	      SrcBlock		      "Add"
	      SrcPort		      1
	      Points		      [-15, 0]
	      Branch {
		DstBlock		"Compare\nTo Constant2"
		DstPort			1
	      }
	      Branch {
		Points			[0, 70]
		DstBlock		"Unit Delay2"
		DstPort			1
	      }
	    }
	    Line {
	      SrcBlock		      "In1"
	      SrcPort		      1
	      Points		      [-20, 0]
	      Branch {
		DstBlock		"Add"
		DstPort			1
	      }
	      Branch {
		Points			[0, 110]
		DstBlock		"Switch3"
		DstPort			2
	      }
	    }
	    Line {
	      SrcBlock		      "Compare\nTo Constant2"
	      SrcPort		      1
	      DstBlock		      "Out1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "go3"
	      SrcPort		      1
	      DstBlock		      "Switch3"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Unit Delay2"
	      SrcPort		      1
	      Points		      [25, 0; 0, 30]
	      DstBlock		      "Switch3"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Switch3"
	      SrcPort		      1
	      Points		      [0, -15]
	      DstBlock		      "Add"
	      DstPort		      2
	    }
	  }
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator1"
	  Ports			  [1, 1]
	  Position		  [275, 39, 305, 71]
	  BlockMirror		  on
	  NamePlacement		  "alternate"
	  Operator		  "NOT"
	  AllPortsSameDT	  off
	  OutDataTypeMode	  "boolean"
	  LogicDataType		  "fixdt(0, 8)"
	  OutDataTypeStr	  "boolean"
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch1"
	  Position		  [120, 44, 175, 96]
	  BlockMirror		  on
	  NamePlacement		  "alternate"
	  Criteria		  "u2 ~= 0"
	  Threshold		  "1000"
	  InputSameDT		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Switch
	  Name			  "Switch3"
	  Position		  [215, 209, 270, 261]
	  BlockMirror		  on
	  NamePlacement		  "alternate"
	  Criteria		  "u2 ~= 0"
	  Threshold		  "1000"
	  InputSameDT		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Constant
	  Name			  "go1"
	  Position		  [215, 90, 245, 120]
	  BlockRotation		  270
	  Value			  "0"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Constant
	  Name			  "go3"
	  Position		  [410, 235, 440, 265]
	  BlockMirror		  on
	  NamePlacement		  "alternate"
	  Value			  "0"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Disable"
	  Position		  [25, 61, 60, 79]
	  BlockMirror		  on
	  NamePlacement		  "alternate"
	  IconDisplay		  "Port number"
	}
	Block {
	  BlockType		  Outport
	  Name			  "Inverse_direction"
	  Position		  [60, 228, 90, 242]
	  BlockMirror		  on
	  Port			  "2"
	  IconDisplay		  "Port number"
	}
	Line {
	  SrcBlock		  "go3"
	  SrcPort		  1
	  DstBlock		  "Switch3"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Inverse_direction\n_for_a_While"
	  SrcPort		  1
	  Points		  [0, 5; -35, 0]
	  Branch {
	    Points		    [0, 40]
	    DstBlock		    "Switch3"
	    DstPort		    1
	  }
	  Branch {
	    Labels		    [1, 0]
	    Points		    [0, -65]
	    DstBlock		    "Data Type Conversion6"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "go1"
	  SrcPort		  1
	  DstBlock		  "Switch1"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "Data Type Conversion6"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Logical\nOperator1"
	  SrcPort		  1
	  DstBlock		  "Switch1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "stop_go"
	  SrcPort		  1
	  Points		  [0, 15]
	  Branch {
	    Points		    [0, 45]
	    Branch {
	      Points		      [-25, 0]
	      DstBlock		      "Inverse_direction\n_for_a_While"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, 40; -15, 0; 0, 15]
	      DstBlock		      "Switch3"
	      DstPort		      2
	    }
	  }
	  Branch {
	    Points		    [-225, 0]
	    DstBlock		    "Switch1"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "Switch1"
	  SrcPort		  1
	  DstBlock		  "Disable"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Switch3"
	  SrcPort		  1
	  DstBlock		  "Inverse_direction"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Sum
      Name		      "Sum"
      Ports		      [2, 1]
      Position		      [325, 765, 345, 785]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "|++"
      InputSameDT	      off
      OutDataTypeMode	      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Sum
      Name		      "Sum1"
      Ports		      [2, 1]
      Position		      [325, 720, 345, 740]
      ShowName		      off
      IconShape		      "round"
      Inputs		      "++|"
      InputSameDT	      off
      OutDataTypeMode	      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Reference
      Name		      "TX Output\nTs = 5e-3"
      Tag		      "dsPIC_TX_Multiplexed"
      Ports		      [16]
      Position		      [1145, 271, 1260, 844]
      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 2 3 4 5 6 7 8 9 10 11 12 13 14 15]"
      CHANNELBLOCKED	      "[]"
      CHANNELBLOCKED_BITEWISE "0"
      Status		      "OK"
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator"
      Position		      [925, 115, 945, 135]
      ShowName		      off
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator1"
      Position		      [925, 175, 945, 195]
      ShowName		      off
    }
    Block {
      BlockType		      Reference
      Name		      "UART 1 Configuration"
      Tag		      "dsPIC_config_UART"
      Ports		      []
      Position		      [151, 19, 259, 69]
      BackgroundColor	      "orange"
      Priority		      "2"
      List {
	ListType		RTWdata
	RxBufferSize		"32"
      }
      SourceBlock	      "dsPICdrivers/Serial PORT/UART Configuration"
      SourceType	      "Configure UART"
      UART		      "1"
      proposed_BAUD	      "115200"
      ALT_TX_RX		      on
      InterruptTxWhen	      "When Transmit Buffer is empty"
      TXInterruptPri	      "1"
      TxBufferSize	      "64"
      TXEN		      on
      InterruptRxWhen	      "When a character is received"
      RXInterruptPri	      "4"
      RxBufferSize	      "128"
      BAUD		      "115200"
      UxBRG		      "10"
      Info		      "UxBRG = 10   ||  Real Baud : 113636   ||  % error : -1.3573  ||  max 11.3636 Bytes / Step"
      RealBaud		      "0"
    }
    Block {
      BlockType		      SubSystem
      Name		      "UART Depacketing\nwith CRC and Memory"
      Ports		      [1]
      Position		      [275, 581, 375, 639]
      MinAlgLoopOccurrences   off
      PropExecContextOutsideSubsystem off
      RTWSystemCode	      "Auto"
      FunctionWithSeparateData off
      Opaque		      off
      RequestExecContextInheritance off
      MaskHideContents	      off
      System {
	Name			"UART Depacketing\nwith CRC and Memory"
	Location		[165, 74, 1115, 1007]
	Open			off
	ModelBrowserVisibility	off
	ModelBrowserWidth	200
	ScreenColor		"white"
	PaperOrientation	"landscape"
	PaperPositionMode	"auto"
	PaperType		"usletter"
	PaperUnits		"inches"
	TiledPaperMargins	[0.500000, 0.500000, 0.500000, 0.500000]
	TiledPageScale		1
	ShowPageBoundaries	off
	ZoomFactor		"100"
	Block {
	  BlockType		  Inport
	  Name			  "Byte In"
	  Position		  [25, 818, 55, 832]
	  IconDisplay		  "Port number"
	  DataType		  "uint8"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "CRC Check\n1"
	  Position		  [365, 377, 395, 408]
	  Operator		  "=="
	  InputSameDT		  off
	  LogicOutDataTypeMode	  "boolean"
	  LogicDataType		  "fixdt(0, 8)"
	  OutDataTypeStr	  "boolean"
	}
	Block {
	  BlockType		  RelationalOperator
	  Name			  "CRC Check\n2"
	  Position		  [360, 782, 390, 813]
	  Operator		  "=="
	  InputSameDT		  off
	  LogicOutDataTypeMode	  "boolean"
	  LogicDataType		  "fixdt(0, 8)"
	  OutDataTypeStr	  "boolean"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant1"
	  Position		  [655, 160, 685, 190]
	  BlockRotation		  270
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Value			  "2^11"
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  Position		  [655, 310, 685, 340]
	  BlockRotation		  270
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Value			  "2^11"
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant3"
	  Position		  [650, 550, 680, 580]
	  BlockRotation		  270
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Value			  "2^11"
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion1"
	  Position		  [185, 181, 220, 209]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion2"
	  Position		  [185, 281, 220, 309]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion3"
	  Position		  [185, 91, 220, 119]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion4"
	  Position		  [185, 481, 220, 509]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion5"
	  Position		  [185, 586, 220, 614]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  DataTypeConversion
	  Name			  "Data Type Conversion6"
	  Position		  [185, 686, 220, 714]
	  ShowName		  off
	  OutDataTypeMode	  "uint16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint16"
	  RndMeth		  "Floor"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  From
	  Name			  "From"
	  Position		  [475, 336, 515, 364]
	  BackgroundColor	  "darkGreen"
	  ShowName		  off
	  GotoTag		  "A"
	}
	Block {
	  BlockType		  From
	  Name			  "From1"
	  Position		  [475, 381, 515, 409]
	  BackgroundColor	  "darkGreen"
	  ShowName		  off
	  GotoTag		  "B"
	}
	Block {
	  BlockType		  From
	  Name			  "From2"
	  Position		  [475, 426, 515, 454]
	  BackgroundColor	  "darkGreen"
	  ShowName		  off
	  GotoTag		  "C"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Get Lower 4 bites2"
	  Ports			  [1, 1]
	  Position		  [360, 236, 400, 274]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "AND"
	  UseBitMask		  on
	  NumInputPorts		  "1"
	  BitMask		  "bin2dec('00001111')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Get Lower 4 bites3"
	  Ports			  [1, 1]
	  Position		  [355, 641, 395, 679]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "AND"
	  UseBitMask		  on
	  NumInputPorts		  "1"
	  BitMask		  "bin2dec('00001111')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto"
	  Position		  [405, 25, 445, 55]
	  BackgroundColor	  "darkGreen"
	  ShowName		  off
	  GotoTag		  "A"
	  TagVisibility		  "local"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto1"
	  Position		  [425, 380, 465, 410]
	  BackgroundColor	  "darkGreen"
	  ShowName		  off
	  GotoTag		  "B"
	  TagVisibility		  "local"
	}
	Block {
	  BlockType		  Goto
	  Name			  "Goto2"
	  Position		  [420, 785, 460, 815]
	  BackgroundColor	  "darkGreen"
	  ShowName		  off
	  GotoTag		  "C"
	  TagVisibility		  "local"
	}
	Block {
	  BlockType		  Logic
	  Name			  "Logical\nOperator"
	  Ports			  [3, 1]
	  Position		  [560, 324, 600, 466]
	  NamePlacement		  "alternate"
	  ShowName		  off
	  Inputs		  "3"
	  AllPortsSameDT	  off
	  OutDataTypeMode	  "boolean"
	  LogicDataType		  "fixdt(0, 8)"
	  OutDataTypeStr	  "boolean"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "Memory Write \nIf Valid data received"
	  Ports			  [4, 0, 1]
	  Position		  [790, 458, 895, 702]
	  TreatAsAtomicUnit	  on
	  MinAlgLoopOccurrences	  off
	  PropExecContextOutsideSubsystem off
	  RTWSystemCode		  "Auto"
	  FunctionWithSeparateData off
	  Opaque		  off
	  RequestExecContextInheritance	off
	  MaskHideContents	  off
	  System {
	    Name		    "Memory Write \nIf Valid data received"
	    Location		    [421, 301, 828, 587]
	    Open		    off
	    ModelBrowserVisibility  off
	    ModelBrowserWidth	    200
	    ScreenColor		    "white"
	    PaperOrientation	    "landscape"
	    PaperPositionMode	    "auto"
	    PaperType		    "usletter"
	    PaperUnits		    "inches"
	    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
	    TiledPageScale	    1
	    ShowPageBoundaries	    off
	    ZoomFactor		    "100"
	    Block {
	      BlockType		      Inport
	      Name		      "Steering_Front"
	      Position		      [30, 63, 60, 77]
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Steering_Rear"
	      Position		      [30, 113, 60, 127]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Motor_Momentum"
	      Position		      [30, 163, 60, 177]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "Buttons"
	      Position		      [30, 213, 60, 227]
	      Port		      "4"
	      IconDisplay	      "Port number"
	      OutDataType	      "fixdt(1, 16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      EnablePort
	      Name		      "Enable"
	      Ports		      []
	      Position		      [165, 15, 185, 35]
	      ShowName		      off
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite"
	      Position		      [125, 53, 220, 87]
	      BackgroundColor	      "lightBlue"
	      ShowName		      off
	      DataStoreName	      "Steering_Front"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite1"
	      Position		      [125, 103, 220, 137]
	      BackgroundColor	      "lightBlue"
	      ShowName		      off
	      DataStoreName	      "Steering_Rear"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite2"
	      Position		      [125, 153, 220, 187]
	      BackgroundColor	      "lightBlue"
	      ShowName		      off
	      DataStoreName	      "Motor_Momentum"
	      SampleTime	      "-1"
	    }
	    Block {
	      BlockType		      DataStoreWrite
	      Name		      "Data Store\nWrite3"
	      Position		      [125, 203, 220, 237]
	      BackgroundColor	      "lightBlue"
	      ShowName		      off
	      DataStoreName	      "Buttons"
	      SampleTime	      "-1"
	    }
	    Line {
	      SrcBlock		      "Steering_Front"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Steering_Rear"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite1"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Motor_Momentum"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite2"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Buttons"
	      SrcPort		      1
	      DstBlock		      "Data Store\nWrite3"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Reference
	  Name			  "Null lower 4 bites_12b1"
	  Ports			  [1, 1]
	  Position		  [360, 176, 400, 214]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "AND"
	  UseBitMask		  on
	  NumInputPorts		  "1"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Null lower 4 bites_12b2"
	  Ports			  [1, 1]
	  Position		  [355, 581, 395, 619]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "AND"
	  UseBitMask		  on
	  NumInputPorts		  "1"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Shift up 1"
	  Ports			  [1, 1]
	  Position		  [445, 175, 525, 215]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	  SourceType		  "Shift Arithmetic"
	  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"
	  nBitShiftRight	  "-4"
	  nBinPtShiftRight	  "0"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Shift up 2"
	  Ports			  [1, 1]
	  Position		  [445, 275, 525, 315]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	  SourceType		  "Shift Arithmetic"
	  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"
	  nBitShiftRight	  "-4"
	  nBinPtShiftRight	  "0"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Shift up 3"
	  Ports			  [1, 1]
	  Position		  [440, 580, 520, 620]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	  SourceType		  "Shift Arithmetic"
	  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"
	  nBitShiftRight	  "-4"
	  nBinPtShiftRight	  "0"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Shift up 4"
	  Ports			  [1, 1]
	  Position		  [440, 680, 520, 720]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Shift\nArithmetic"
	  SourceType		  "Shift Arithmetic"
	  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"
	  nBitShiftRight	  "-4"
	  nBinPtShiftRight	  "0"
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum1"
	  Ports			  [2, 1]
	  Position		  [660, 105, 680, 125]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  AccumDataTypeStr	  "int16"
	  OutDataTypeMode	  "int16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "int16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum2"
	  Ports			  [2, 1]
	  Position		  [660, 255, 680, 275]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  AccumDataTypeStr	  "int16"
	  OutDataTypeMode	  "int16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "int16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  Sum
	  Name			  "Sum3"
	  Ports			  [2, 1]
	  Position		  [655, 495, 675, 515]
	  ShowName		  off
	  IconShape		  "round"
	  Inputs		  "|+-"
	  InputSameDT		  off
	  AccumDataTypeStr	  "int16"
	  OutDataTypeMode	  "int16"
	  OutDataType		  "fixdt(1, 16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "int16"
	  SaturateOnIntegerOverflow off
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay"
	  Position		  [93, 50, 127, 85]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay1"
	  Position		  [93, 125, 127, 160]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay2"
	  Position		  [93, 225, 127, 260]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay3"
	  Position		  [93, 335, 127, 370]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay4"
	  Position		  [93, 435, 127, 470]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay5"
	  Position		  [93, 535, 127, 570]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay6"
	  Position		  [93, 630, 127, 665]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  UnitDelay
	  Name			  "Unit Delay7"
	  Position		  [93, 730, 127, 765]
	  BlockRotation		  270
	  ShowName		  off
	  SampleTime		  "-1"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Valid Start"
	  Ports			  [1, 1]
	  Position		  [335, 25, 365, 55]
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Compare\nTo Constant"
	  SourceType		  "Compare To Constant"
	  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"
	  relop			  "=="
	  const			  "254"
	  LogicOutDataTypeMode	  "boolean"
	  ZeroCross		  off
	}
	Block {
	  BlockType		  Reference
	  Name			  "null lower 4 bites1"
	  Ports			  [3, 1]
	  Position		  [295, 746, 335, 784]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "XOR"
	  UseBitMask		  off
	  NumInputPorts		  "3"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "null lower 4 bites2"
	  Ports			  [2, 1]
	  Position		  [585, 96, 625, 134]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "OR"
	  UseBitMask		  off
	  NumInputPorts		  "2"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "null lower 4 bites3"
	  Ports			  [2, 1]
	  Position		  [585, 246, 625, 284]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "OR"
	  UseBitMask		  off
	  NumInputPorts		  "2"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "null lower 4 bites4"
	  Ports			  [2, 1]
	  Position		  [585, 486, 625, 524]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "OR"
	  UseBitMask		  off
	  NumInputPorts		  "2"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "null lower 4 bites5"
	  Ports			  [3, 1]
	  Position		  [300, 346, 340, 384]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "XOR"
	  UseBitMask		  off
	  NumInputPorts		  "3"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Block {
	  BlockType		  Reference
	  Name			  "null lower 4 bites6"
	  Ports			  [2, 1]
	  Position		  [580, 651, 620, 689]
	  ShowName		  off
	  SourceBlock		  "simulink/Logic and Bit\nOperations/Bitwise\nOperator"
	  SourceType		  "Bitwise Operator"
	  logicop		  "OR"
	  UseBitMask		  off
	  NumInputPorts		  "2"
	  BitMask		  "bin2dec('11110000')"
	  BitMaskRealWorld	  "Stored Integer"
	}
	Line {
	  SrcBlock		  "Unit Delay1"
	  SrcPort		  1
	  Points		  [0, -15]
	  Branch {
	    DstBlock		    "Data Type Conversion3"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Unit Delay"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay2"
	  SrcPort		  1
	  Points		  [0, -25]
	  Branch {
	    DstBlock		    "Data Type Conversion1"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Unit Delay1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay3"
	  SrcPort		  1
	  Points		  [0, -35]
	  Branch {
	    DstBlock		    "Data Type Conversion2"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Unit Delay2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay4"
	  SrcPort		  1
	  Points		  [0, -5]
	  Branch {
	    Points		    [240, 0]
	    DstBlock		    "CRC Check\n1"
	    DstPort		    2
	  }
	  Branch {
	    DstBlock		    "Unit Delay3"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay5"
	  SrcPort		  1
	  Points		  [0, -35]
	  Branch {
	    DstBlock		    "Data Type Conversion4"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Unit Delay4"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay6"
	  SrcPort		  1
	  Points		  [0, -25]
	  Branch {
	    DstBlock		    "Data Type Conversion5"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Unit Delay5"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Unit Delay7"
	  SrcPort		  1
	  Points		  [0, -25]
	  Branch {
	    DstBlock		    "Data Type Conversion6"
	    DstPort		    1
	  }
	  Branch {
	    DstBlock		    "Unit Delay6"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "null lower 4 bites4"
	  SrcPort		  1
	  DstBlock		  "Sum3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant3"
	  SrcPort		  1
	  DstBlock		  "Sum3"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Constant2"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "null lower 4 bites3"
	  SrcPort		  1
	  DstBlock		  "Sum2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Constant1"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "null lower 4 bites2"
	  SrcPort		  1
	  DstBlock		  "Sum1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Logical\nOperator"
	  SrcPort		  1
	  Points		  [235, 0]
	  DstBlock		  "Memory Write \nIf Valid data received"
	  DstPort		  enable
	}
	Line {
	  SrcBlock		  "From2"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "From1"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "From"
	  SrcPort		  1
	  DstBlock		  "Logical\nOperator"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Data Type Conversion6"
	  SrcPort		  1
	  Points		  [15, 0]
	  Branch {
	    Points		    [0, 75]
	    DstBlock		    "null lower 4 bites1"
	    DstPort		    3
	  }
	  Branch {
	    DstBlock		    "Shift up 4"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion5"
	  SrcPort		  1
	  Points		  [30, 0]
	  Branch {
	    Points		    [0, 165]
	    DstBlock		    "null lower 4 bites1"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [30, 0]
	    Branch {
	      DstBlock		      "Null lower 4 bites_12b2"
	      DstPort		      1
	    }
	    Branch {
	      Points		      [0, 60]
	      DstBlock		      "Get Lower 4 bites3"
	      DstPort		      1
	    }
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion4"
	  SrcPort		  1
	  Points		  [45, 0]
	  Branch {
	    DstBlock		    "null lower 4 bites4"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 260]
	    DstBlock		    "null lower 4 bites1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion2"
	  SrcPort		  1
	  Points		  [20, 0]
	  Branch {
	    Points		    [0, 80]
	    DstBlock		    "null lower 4 bites5"
	    DstPort		    3
	  }
	  Branch {
	    DstBlock		    "Shift up 2"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion1"
	  SrcPort		  1
	  Points		  [35, 0]
	  Branch {
	    Points		    [0, 170]
	    DstBlock		    "null lower 4 bites5"
	    DstPort		    2
	  }
	  Branch {
	    Points		    [30, 0]
	    Branch {
	      Points		      [0, 60]
	      DstBlock		      "Get Lower 4 bites2"
	      DstPort		      1
	    }
	    Branch {
	      DstBlock		      "Null lower 4 bites_12b1"
	      DstPort		      1
	    }
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion3"
	  SrcPort		  1
	  Points		  [50, 0]
	  Branch {
	    DstBlock		    "null lower 4 bites2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 250]
	    DstBlock		    "null lower 4 bites5"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "CRC Check\n2"
	  SrcPort		  1
	  DstBlock		  "Goto2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Shift up 4"
	  SrcPort		  1
	  Points		  [20, 0; 0, -20]
	  DstBlock		  "null lower 4 bites6"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Get Lower 4 bites3"
	  SrcPort		  1
	  DstBlock		  "null lower 4 bites6"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Shift up 3"
	  SrcPort		  1
	  Points		  [20, 0; 0, -85]
	  DstBlock		  "null lower 4 bites4"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Null lower 4 bites_12b2"
	  SrcPort		  1
	  DstBlock		  "Shift up 3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Byte In"
	  SrcPort		  1
	  Points		  [50, 0]
	  Branch {
	    DstBlock		    "Unit Delay7"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [235, 0]
	    DstBlock		    "CRC Check\n2"
	    DstPort		    2
	  }
	}
	Line {
	  SrcBlock		  "null lower 4 bites1"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "CRC Check\n2"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "CRC Check\n1"
	  SrcPort		  1
	  DstBlock		  "Goto1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Valid Start"
	  SrcPort		  1
	  DstBlock		  "Goto"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Shift up 2"
	  SrcPort		  1
	  Points		  [20, 0; 0, -20]
	  DstBlock		  "null lower 4 bites3"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Get Lower 4 bites2"
	  SrcPort		  1
	  DstBlock		  "null lower 4 bites3"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Shift up 1"
	  SrcPort		  1
	  Points		  [20, 0; 0, -70]
	  DstBlock		  "null lower 4 bites2"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Null lower 4 bites_12b1"
	  SrcPort		  1
	  DstBlock		  "Shift up 1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "null lower 4 bites5"
	  SrcPort		  1
	  Points		  [5, 0]
	  DstBlock		  "CRC Check\n1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Unit Delay"
	  SrcPort		  1
	  Points		  [0, -5]
	  DstBlock		  "Valid Start"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum1"
	  SrcPort		  1
	  Points		  [90, 0]
	  DstBlock		  "Memory Write \nIf Valid data received"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Sum2"
	  SrcPort		  1
	  Points		  [55, 0; 0, 285]
	  DstBlock		  "Memory Write \nIf Valid data received"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Sum3"
	  SrcPort		  1
	  Points		  [15, 0; 0, 105]
	  DstBlock		  "Memory Write \nIf Valid data received"
	  DstPort		  3
	}
	Line {
	  SrcBlock		  "null lower 4 bites6"
	  SrcPort		  1
	  DstBlock		  "Memory Write \nIf Valid data received"
	  DstPort		  4
	}
      }
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Buttons"
      Position		      [20, 509, 127, 543]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Buttons"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "fixdt(1, 16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Current M3"
      Position		      [20, 715, 127, 749]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Current_M3"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Current M4"
      Position		      [20, 765, 127, 799]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "Current_M4"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Encoder 1"
      Position		      [20, 250, 127, 284]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "ct_turnsE1"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Encoder 2"
      Position		      [20, 302, 127, 336]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "ct_turnsE2"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Encoder 3"
      Position		      [20, 610, 127, 644]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "ct_turnsE3"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      DataStoreMemory
      Name		      "Uint16: Encoder 4"
      Position		      [20, 662, 127, 696]
      BackgroundColor	      "lightBlue"
      DataStoreName	      "ct_turnsE4"
      ReadBeforeWriteMsg      "warning"
      WriteAfterWriteMsg      "warning"
      WriteAfterReadMsg	      "warning"
      RTWStateStorageClass    "ExportedGlobal"
      VectorParams1D	      on
      DataType		      "uint16"
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      OutDataTypeStr	      "uint16"
    }
    Block {
      BlockType		      Reference
      Name		      "dbl-click to open\nGraphical interface"
      Ports		      []
      Position		      [286, 18, 394, 68]
      BackgroundColor	      "gray"
      SourceBlock	      "dsPICdrivers/Serial PORT/dbl-click to open\nGraphical interface"
      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"
      Nothing		      "0"
    }
    Line {
      SrcBlock		      "Rx UART 1"
      SrcPort		      1
      DstBlock		      "UART Depacketing\nwith CRC and Memory"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rear Unit Control Data:\nSteering, Motor momentum,\nButtons, DISABLE\nTs = 5e-3"
      SrcPort		      1
      DstBlock		      "Send ECAN1 Message"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rear Unit Control Data:\nSteering, Motor momentum,\nButtons, DISABLE\nTs = 5e-3"
      SrcPort		      2
      DstBlock		      "Send ECAN1 Message"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Rear Unit Control Data:\nSteering, Motor momentum,\nButtons, DISABLE\nTs = 5e-3"
      SrcPort		      3
      DstBlock		      "Send ECAN1 Message"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Steering_Front\nTs = 1e-2"
      SrcPort		      1
      Points		      [5, 0]
      Branch {
	DstBlock		"Sum1"
	DstPort			2
      }
      Branch {
	DstBlock		"Sum"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Constant"
      SrcPort		      1
      Points		      [-15, 0]
      DstBlock		      "Sum1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Constant1"
      SrcPort		      1
      Points		      [-15, 0]
      DstBlock		      "Sum"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Sum1"
      SrcPort		      1
      DstBlock		      "Saturation"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Saturation"
      SrcPort		      1
      DstBlock		      "Output Compare HW"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Sum"
      SrcPort		      1
      DstBlock		      "Saturation1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Saturation1"
      SrcPort		      1
      DstBlock		      "Output Compare HW"
      DstPort		      2
    }
    Line {
      Name		      "QEI_M1"
      Labels		      [0, 0; 1, 0]
      SrcBlock		      "QEI Ts = 1e-2\nCurrent Ts = 5e-3"
      SrcPort		      3
      DstBlock		      "Goto2"
      DstPort		      1
    }
    Line {
      Name		      "QEI_M1"
      Labels		      [0, 0]
      SrcBlock		      "QEI Ts = 1e-2\nCurrent Ts = 5e-3"
      SrcPort		      4
      DstBlock		      "Goto3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "From2"
      SrcPort		      1
      DstBlock		      "Rate Transition6"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rate Transition6"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      3
    }
    Line {
      SrcBlock		      "From3"
      SrcPort		      1
      DstBlock		      "Rate Transition7"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rate Transition7"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      4
    }
    Line {
      SrcBlock		      "Rate Transition8"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      5
    }
    Line {
      SrcBlock		      "QEI 4"
      SrcPort		      1
      DstBlock		      "Rate Transition9"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rate Transition9"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      6
    }
    Line {
      SrcBlock		      "Rate Transition10"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      7
    }
    Line {
      SrcBlock		      "Rate Transition11"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      8
    }
    Line {
      SrcBlock		      "Rate Transition"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      9
    }
    Line {
      SrcBlock		      "Rate Transition1"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      10
    }
    Line {
      SrcBlock		      "Rate Transition2"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      11
    }
    Line {
      SrcBlock		      "Rate Transition3"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      12
    }
    Line {
      SrcBlock		      "Rate Transition4"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      13
    }
    Line {
      SrcBlock		      "Rate Transition5"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      14
    }
    Line {
      SrcBlock		      "Hex 300\nSlave QEI and Current1"
      SrcPort		      1
      Points		      [40, 0; 0, -60]
      DstBlock		      "Logical\nOperator"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message\nTs = 5e-3"
      SrcPort		      4
      Points		      [285, 0; 0, -150]
      DstBlock		      "Logical\nOperator"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message\nTs = 5e-3"
      SrcPort		      1
      DstBlock		      "Hex 300\nSlave QEI and Current1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Logical\nOperator"
      SrcPort		      1
      DstBlock		      "Enabled\nSubsystem"
      DstPort		      enable
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message\nTs = 5e-3"
      SrcPort		      3
      DstBlock		      "Terminator"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message\nTs = 5e-3"
      SrcPort		      5
      DstBlock		      "Terminator1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message\nTs = 5e-3"
      SrcPort		      2
      DstBlock		      "Enabled\nSubsystem"
      DstPort		      1
    }
    Line {
      SrcBlock		      "QEI 3"
      SrcPort		      1
      DstBlock		      "Rate Transition8"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Current M4"
      SrcPort		      1
      DstBlock		      "Rate Transition11"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Current M3"
      SrcPort		      1
      DstBlock		      "Rate Transition10"
      DstPort		      1
    }
    Line {
      SrcBlock		      "SF debugg"
      SrcPort		      1
      Points		      [105, 0]
      DstBlock		      "Data Type Conversion"
      DstPort		      1
    }
    Line {
      SrcBlock		      "SR debugg"
      SrcPort		      1
      DstBlock		      "Data Type Conversion1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Data Type Conversion"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      15
    }
    Line {
      SrcBlock		      "Data Type Conversion1"
      SrcPort		      1
      Points		      [10, 0]
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      16
    }
    Line {
      Name		      "Current_M1"
      Labels		      [0, 0]
      SrcBlock		      "QEI Ts = 1e-2\nCurrent Ts = 5e-3"
      SrcPort		      1
      DstBlock		      "Goto1"
      DstPort		      1
    }
    Line {
      Name		      "Current_M2"
      Labels		      [0, 0]
      SrcBlock		      "QEI Ts = 1e-2\nCurrent Ts = 5e-3"
      SrcPort		      2
      DstBlock		      "Goto10"
      DstPort		      1
    }
    Line {
      SrcBlock		      "From1"
      SrcPort		      1
      DstBlock		      "Rate Transition12"
      DstPort		      1
    }
    Line {
      SrcBlock		      "From4"
      SrcPort		      1
      DstBlock		      "Rate Transition13"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rate Transition12"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rate Transition13"
      SrcPort		      1
      DstBlock		      "TX Output\nTs = 5e-3"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Gain"
      SrcPort		      1
      DstBlock		      "Saturation2"
      DstPort		      1
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      "ADS1015_1"
      SrcPort		      1
      Points		      [0, 10]
      DstBlock		      "Subsystem1"
      DstPort		      1
    }
    Line {
      Labels		      [0, 0]
      SrcBlock		      "ADS1015_2"
      SrcPort		      1
      DstBlock		      "Subsystem1"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Subsystem1"
      SrcPort		      1
      Points		      [105, 0; 0, -35]
      DstBlock		      "Rate Transition"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem1"
      SrcPort		      2
      Points		      [120, 0; 0, -25]
      DstBlock		      "Rate Transition1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem1"
      SrcPort		      3
      Points		      [0, -15]
      DstBlock		      "Rate Transition2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem1"
      SrcPort		      4
      Points		      [0, -5]
      DstBlock		      "Rate Transition3"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Subsystem1"
      SrcPort		      5
      Points		      [25, 0]
      Branch {
	Points			[95, 0; 0, 5]
	DstBlock		"Rate Transition4"
	DstPort			1
      }
      Branch {
	Points			[0, 45; -360, 0; 0, -115; -105, 0]
	DstBlock		"Subsystem2"
	DstPort			1
      }
    }
    Line {
      SrcBlock		      "Motor_Momentum\nTs = 1e-2"
      SrcPort		      1
      DstBlock		      "Gain"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Saturation2"
      SrcPort		      1
      Points		      [10, 0]
      Branch {
	Points			[10, 0]
	DstBlock		"Motor Drive Control"
	DstPort			1
      }
      Branch {
	Points			[0, 25]
	DstBlock		"Motor Drive Control"
	DstPort			2
      }
    }
    Line {
      SrcBlock		      "Motor Drive Control"
      SrcPort		      1
      Points		      [15, 0]
      DstBlock		      "Rate Transition14"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Rate Transition14"
      SrcPort		      1
      Points		      [0, 110]
      DstBlock		      "Subsystem1"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Subsystem2"
      SrcPort		      1
      Points		      [0, -5; -60, 0; 0, -125]
      Branch {
	Points			[0, -25]
	DstBlock		"Motor Drive Control"
	DstPort			3
      }
      Branch {
	Points			[30, 0]
	DstBlock		"Motor Drive Control"
	DstPort			4
      }
    }
    Line {
      SrcBlock		      "Subsystem2"
      SrcPort		      2
      Points		      [0, -60; -65, 0]
      DstBlock		      "Motor Drive Control"
      DstPort		      5
    }
  }
}
# Finite State Machines
#
#    Stateflow Version 7.1 (R2009a) dated Jan 28 2009, 05:16:58
#
#


Stateflow {
  machine {
    id			    1
    name		    "Simurda_CAR4_dsPIC33_ACU44_inverse_direction"
    created		    "09-Jul-2008 17:05:56"
    isLibrary		    0
    firstTarget		    13
    sfVersion		    71014000.000008
  }
  chart {
    id			    2
    name		    "Send ECAN1 Message/myMux"
    windowPosition	    [401.813 209.45 200.25 189.75]
    viewLimits		    [0 156.75 0 153.75]
    screen		    [1 1 1280 1024 1.333333333333333]
    treeNode		    [0 3 0 0]
    firstTransition	    5
    firstJunction	    4
    viewObj		    2
    machine		    1
    ssIdHighWaterMark	    9
    decomposition	    CLUSTER_CHART
    type		    EML_CHART
    firstData		    6
    chartFileNumber	    8
    disableImplicitCasting  1
    eml {
      name		      "myMux"
      noDebugging	      1
    }
  }
  state {
    id			    3
    labelString		    "eML_blk_kernel()"
    position		    [18 64.5 118 66]
    fontSize		    12
    chart		    2
    treeNode		    [2 0 0 0]
    superState		    SUBCHART
    subviewer		    2
    ssIdNumber		    1
    type		    FUNC_STATE
    decomposition	    CLUSTER_STATE
    eml {
      isEML		      1
      script		      "function y = myMux(u1, u2, u3, u4, u5)\nu5_u16 = uint16(u5);\ny = uint16([u1(1); u2(1); u3(1); u4"
      "(1); 0; 0; 0; 0;]);\n\nlen = length(u5);\nif len > 1\n    y(5) = bitor(bitshift(u5_u16(1),8),u5_u16(2));\nelseif"
      " len > 0\n    y(5) = u5_u16(1);\nend\nif len > 3\n    y(6) = bitor(bitshift(u5_u16(3),8),u5_u16(4));\nelseif len"
      " > 2\n    y(6) = u5_u16(3);\nend\nif len > 5\n    y(7) = bitor(bitshift(u5_u16(5),8),u5_u16(6));\nelseif len > 4"
      "\n    y(7) = u5_u16(5);\nend\nif len > 7\n    y(8) = bitor(bitshift(u5_u16(7),8),u5_u16(8));\nelseif len > 6\n  "
      "  y(8) = u5_u16(7);\nend"
      editorLayout	      "100 M4x1[30 228 545 643]"
      fimathForFiConstructors FimathMatlabFactoryDefault
    }
  }
  junction {
    id			    4
    position		    [23.5747 49.5747 7]
    chart		    2
    linkNode		    [2 0 0]
    subviewer		    2
    ssIdNumber		    3
    type		    CONNECTIVE_JUNCTION
  }
  transition {
    id			    5
    labelString		    "{eML_blk_kernel();}"
    labelPosition	    [32.125 19.875 102.544 14.964]
    fontSize		    12
    src {
      intersection	      [0 0 1 0 23.5747 14.625 0 0]
    }
    dst {
      id		      4
      intersection	      [7 0 -1 -1 23.5747 42.5747 0 0]
    }
    midPoint		    [23.5747 24.9468]
    chart		    2
    linkNode		    [2 0 0]
    dataLimits		    [23.575 23.575 14.625 34.575]
    subviewer		    2
    drawStyle		    SMART
    executionOrder	    1
    ssIdNumber		    2
  }
  data {
    id			    6
    ssIdNumber		    4
    name		    "u1"
    linkNode		    [2 0 7]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
      }
      complexity	      SF_COMPLEX_INHERITED
    }
    dataType		    "Inherit: Same as Simulink"
  }
  data {
    id			    7
    ssIdNumber		    5
    name		    "y"
    linkNode		    [2 6 8]
    scope		    OUTPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
      }
      complexity	      SF_COMPLEX_INHERITED
      frame		      SF_FRAME_NO
    }
    dataType		    "Inherit: Same as Simulink"
  }
  data {
    id			    8
    ssIdNumber		    6
    name		    "u2"
    linkNode		    [2 7 9]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
	isSigned		1
	wordLength		"16"
      }
      complexity	      SF_COMPLEX_INHERITED
      frame		      SF_FRAME_INHERITED
    }
    dataType		    "Inherit: Same as Simulink"
  }
  data {
    id			    9
    ssIdNumber		    7
    name		    "u3"
    linkNode		    [2 8 10]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
	isSigned		1
	wordLength		"16"
      }
      complexity	      SF_COMPLEX_INHERITED
      frame		      SF_FRAME_INHERITED
    }
    dataType		    "Inherit: Same as Simulink"
  }
  data {
    id			    10
    ssIdNumber		    8
    name		    "u4"
    linkNode		    [2 9 11]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
	isSigned		1
	wordLength		"16"
      }
      complexity	      SF_COMPLEX_INHERITED
      frame		      SF_FRAME_INHERITED
    }
    dataType		    "Inherit: Same as Simulink"
  }
  data {
    id			    11
    ssIdNumber		    9
    name		    "u5"
    linkNode		    [2 10 0]
    scope		    INPUT_DATA
    machine		    1
    props {
      array {
	size			"-1"
      }
      type {
	method			SF_INHERITED_TYPE
	primitive		SF_DOUBLE_TYPE
	isSigned		1
	wordLength		"16"
      }
      complexity	      SF_COMPLEX_INHERITED
      frame		      SF_FRAME_INHERITED
    }
    dataType		    "Inherit: Same as Simulink"
  }
  instance {
    id			    12
    name		    "Send ECAN1 Message/myMux"
    machine		    1
    chart		    2
  }
  target {
    id			    13
    name		    "sfun"
    codeFlags		    ""
    machine		    1
    linkNode		    [1 0 14]
  }
  target {
    id			    14
    name		    "rtw"
    codeFlags		    " comments=1 statebitsets=1 databitsets=1 emitlogicalops=1 elseifdetection=1 constantfolding=1 redu"
    "ndantloadelimination=0 preservenames=0 preservenameswithparent=0 exportcharts=0"
    machine		    1
    linkNode		    [1 13 0]
  }
}
