Model {
  Name			  "Main"
  Version		  7.5
  MdlSubVersion		  0
  GraphicalInterface {
    NumRootInports	    0
    NumRootOutports	    0
    ParameterArgumentNames  ""
    ComputedModelVersion    "1.628"
    NumModelReferences	    0
    NumTestPointedSignals   0
  }
  SavedCharacterEncoding  "windows-1252"
  SaveDefaultBlockParams  on
  ScopeRefreshTime	  0.035000
  OverrideScopeRefreshTime on
  DisableAllScopes	  off
  DataTypeOverride	  "UseLocalSettings"
  MinMaxOverflowLogging	  "UseLocalSettings"
  MinMaxOverflowArchiveMode "Overwrite"
  MaxMDLFileLineLength	  120
  CloseFcn		  "rtwprivate ssgencode ModelCloseRequest Main"
  Created		  "Sat Jan 23 12:08:37 2010"
  Creator		  "bwmairs"
  UpdateHistory		  "UpdateHistoryNever"
  ModifiedByFormat	  "%<Auto>"
  LastModifiedBy	  "bwmairs"
  ModifiedDateFormat	  "%<Auto>"
  LastModifiedDate	  "Fri Jul 30 15:21:40 2010"
  RTWModifiedTimeStamp	  202404099
  ModelVersionFormat	  "1.%<AutoIncrement:628>"
  ConfigurationManager	  "None"
  SampleTimeColors	  on
  SampleTimeAnnotations	  off
  LibraryLinkDisplay	  "none"
  WideLines		  off
  ShowLineDimensions	  on
  ShowPortDataTypes	  on
  ShowLoopsOnError	  on
  IgnoreBidirectionalLines off
  ShowStorageClass	  off
  ShowTestPointIcons	  on
  ShowSignalResolutionIcons on
  ShowViewerIcons	  on
  SortedOrder		  off
  ExecutionContextIcon	  off
  ShowLinearizationAnnotations on
  BlockNameDataTip	  off
  BlockParametersDataTip  off
  BlockDescriptionStringDataTip	off
  ToolBar		  on
  StatusBar		  on
  BrowserShowLibraryLinks off
  BrowserLookUnderMasks	  off
  SimulationMode	  "normal"
  LinearizationMsg	  "none"
  Profile		  off
  ParamWorkspaceSource	  "MATLABWorkspace"
  AccelSystemTargetFile	  "accel.tlc"
  AccelTemplateMakefile	  "accel_default_tmf"
  AccelMakeCommand	  "make_rtw"
  TryForcingSFcnDF	  off
  RecordCoverage	  off
  CovPath		  "/"
  CovSaveName		  "covdata"
  CovMetricSettings	  "dw"
  CovNameIncrementing	  off
  CovHtmlReporting	  on
  CovForceBlockReductionOff on
  covSaveCumulativeToWorkspaceVar on
  CovSaveSingleToWorkspaceVar on
  CovCumulativeVarName	  "covCumulativeData"
  CovCumulativeReport	  off
  CovReportOnPause	  on
  CovModelRefEnable	  "Off"
  CovExternalEMLEnable	  off
  ExtModeBatchMode	  off
  ExtModeEnableFloating	  on
  ExtModeTrigType	  "manual"
  ExtModeTrigMode	  "normal"
  ExtModeTrigPort	  "1"
  ExtModeTrigElement	  "any"
  ExtModeTrigDuration	  1000
  ExtModeTrigDurationFloating "auto"
  ExtModeTrigHoldOff	  0
  ExtModeTrigDelay	  0
  ExtModeTrigDirection	  "rising"
  ExtModeTrigLevel	  0
  ExtModeArchiveMode	  "off"
  ExtModeAutoIncOneShot	  off
  ExtModeIncDirWhenArm	  off
  ExtModeAddSuffixToVar	  off
  ExtModeWriteAllDataToWs off
  ExtModeArmWhenConnect	  on
  ExtModeSkipDownloadWhenConnect off
  ExtModeLogAll		  on
  ExtModeAutoUpdateStatusClock on
  BufferReuse		  on
  ShowModelReferenceBlockVersion off
  ShowModelReferenceBlockIO off
  Array {
    Type		    "Handle"
    Dimension		    1
    Simulink.ConfigSet {
      $ObjectID		      1
      Version		      "1.10.0"
      Array {
	Type			"Handle"
	Dimension		9
	Simulink.SolverCC {
	  $ObjectID		  2
	  Version		  "1.10.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"
	  SolverJacobianMethodControl "auto"
	  ShapePreserveControl	  "DisableAll"
	  ZeroCrossControl	  "UseLocalSettings"
	  ZeroCrossAlgorithm	  "Nonadaptive"
	  AlgebraicLoopSolver	  "TrustRegion"
	  SolverResetMethod	  "Fast"
	  PositivePriorityOrder	  off
	  AutoInsertRateTranBlk	  off
	  SampleTimeConstraint	  "Unconstrained"
	  InsertRTBMode		  "Whenever possible"
	}
	Simulink.DataIOCC {
	  $ObjectID		  3
	  Version		  "1.10.0"
	  Decimation		  "1"
	  ExternalInput		  "[t, u]"
	  FinalStateName	  "xFinal"
	  InitialState		  "xInitial"
	  LimitDataPoints	  on
	  MaxDataPoints		  "1000"
	  LoadExternalInput	  off
	  LoadInitialState	  off
	  SaveFinalState	  off
	  SaveCompleteFinalSimState off
	  SaveFormat		  "Array"
	  SaveOutput		  on
	  SaveState		  off
	  SignalLogging		  on
	  DSMLogging		  on
	  InspectSignalLogs	  off
	  SaveTime		  on
	  ReturnWorkspaceOutputs  off
	  StateSaveName		  "xout"
	  TimeSaveName		  "tout"
	  OutputSaveName	  "yout"
	  SignalLoggingName	  "logsout"
	  DSMLoggingName	  "dsmout"
	  OutputOption		  "RefineOutputTimes"
	  OutputTimes		  "[]"
	  ReturnWorkspaceOutputsName "out"
	  Refine		  "1"
	}
	Simulink.OptimizationCC {
	  $ObjectID		  4
	  Version		  "1.10.0"
	  BlockReduction	  on
	  BooleanDataType	  on
	  ConditionallyExecuteInputs on
	  InlineParams		  on
	  UseIntDivNetSlope	  off
	  InlineInvariantSignals  off
	  OptimizeBlockIOStorage  on
	  BufferReuse		  on
	  EnhancedBackFolding	  off
	  StrengthReduction	  off
	  EnforceIntegerDowncast  on
	  ExpressionFolding	  on
	  BooleansAsBitfields	  off
	  BitfieldContainerType	  "uint_T"
	  EnableMemcpy		  on
	  MemcpyThreshold	  64
	  PassReuseOutputArgsAs	  "Structure reference"
	  ExpressionDepthLimit	  2147483647
	  FoldNonRolledExpr	  on
	  LocalBlockOutputs	  on
	  RollThreshold		  5
	  SystemCodeInlineAuto	  off
	  StateBitsets		  off
	  DataBitsets		  off
	  UseTempVars		  off
	  ZeroExternalMemoryAtStartup on
	  ZeroInternalMemoryAtStartup on
	  InitFltsAndDblsToZero	  on
	  NoFixptDivByZeroProtection off
	  EfficientFloat2IntCast  off
	  EfficientMapNaN2IntZero on
	  OptimizeModelRefInitCode on
	  LifeSpan		  "1"
	  MaxStackSize		  "Inherit from target"
	  BufferReusableBoundary  on
	  SimCompilerOptimization "Off"
	  AccelVerboseBuild	  off
	}
	Simulink.DebuggingCC {
	  $ObjectID		  5
	  Version		  "1.10.0"
	  RTPrefix		  "error"
	  ConsistencyChecking	  "none"
	  ArrayBoundsChecking	  "none"
	  SignalInfNanChecking	  "none"
	  SignalRangeChecking	  "none"
	  ReadBeforeWriteMsg	  "UseLocalSettings"
	  WriteAfterWriteMsg	  "UseLocalSettings"
	  WriteAfterReadMsg	  "UseLocalSettings"
	  AlgebraicLoopMsg	  "warning"
	  ArtificialAlgebraicLoopMsg "warning"
	  SaveWithDisabledLinksMsg "warning"
	  SaveWithParameterizedLinksMsg	"none"
	  CheckSSInitialOutputMsg on
	  UnderspecifiedInitializationDetection	"Classic"
	  MergeDetectMultiDrivingBlocksExec "none"
	  CheckExecutionContextPreStartOutputMsg off
	  CheckExecutionContextRuntimeOutputMsg	off
	  SignalResolutionControl "UseLocalSettings"
	  BlockPriorityViolationMsg "warning"
	  MinStepSizeMsg	  "warning"
	  TimeAdjustmentMsg	  "none"
	  MaxConsecutiveZCsMsg	  "error"
	  SolverPrmCheckMsg	  "warning"
	  InheritedTsInSrcMsg	  "warning"
	  DiscreteInheritContinuousMsg "warning"
	  MultiTaskDSMMsg	  "error"
	  MultiTaskCondExecSysMsg "error"
	  MultiTaskRateTransMsg	  "error"
	  SingleTaskRateTransMsg  "none"
	  TasksWithSamePriorityMsg "warning"
	  SigSpecEnsureSampleTimeMsg "warning"
	  CheckMatrixSingularityMsg "none"
	  IntegerOverflowMsg	  "warning"
	  Int32ToFloatConvMsg	  "warning"
	  ParameterDowncastMsg	  "error"
	  ParameterOverflowMsg	  "error"
	  ParameterUnderflowMsg	  "none"
	  ParameterPrecisionLossMsg "warning"
	  ParameterTunabilityLossMsg "warning"
	  FixptConstUnderflowMsg  "none"
	  FixptConstOverflowMsg	  "none"
	  FixptConstPrecisionLossMsg "none"
	  UnderSpecifiedDataTypeMsg "none"
	  UnnecessaryDatatypeConvMsg "none"
	  VectorMatrixConversionMsg "none"
	  InvalidFcnCallConnMsg	  "error"
	  FcnCallInpInsideContextMsg "Use local settings"
	  SignalLabelMismatchMsg  "none"
	  UnconnectedInputMsg	  "warning"
	  UnconnectedOutputMsg	  "warning"
	  UnconnectedLineMsg	  "warning"
	  SFcnCompatibilityMsg	  "none"
	  UniqueDataStoreMsg	  "none"
	  BusObjectLabelMismatch  "warning"
	  RootOutportRequireBusObject "warning"
	  AssertControl		  "UseLocalSettings"
	  EnableOverflowDetection off
	  ModelReferenceIOMsg	  "none"
	  ModelReferenceVersionMismatchMessage "none"
	  ModelReferenceIOMismatchMessage "none"
	  ModelReferenceCSMismatchMessage "none"
	  UnknownTsInhSupMsg	  "warning"
	  ModelReferenceDataLoggingMessage "warning"
	  ModelReferenceSymbolNameMessage "warning"
	  ModelReferenceExtraNoncontSigs "error"
	  StateNameClashWarn	  "warning"
	  SimStateInterfaceChecksumMismatchMsg "warning"
	  StrictBusMsg		  "Warning"
	  BusNameAdapt		  "WarnAndRepair"
	  NonBusSignalsTreatedAsBus "none"
	  LoggingUnavailableSignals "error"
	  BlockIODiagnostic	  "none"
	}
	Simulink.HardwareCC {
	  $ObjectID		  6
	  Version		  "1.10.0"
	  Array {
	    Type		    "Cell"
	    Dimension		    2
	    Cell		    "ProdHWDeviceType"
	    Cell		    "ProdEqTarget"
	    PropName		    "DisabledProps"
	  }
	  ProdBitPerChar	  8
	  ProdBitPerShort	  16
	  ProdBitPerInt		  16
	  ProdBitPerLong	  32
	  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.10.0"
	  UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
	  CheckModelReferenceTargetMessage "error"
	  EnableParallelModelReferenceBuilds off
	  ParallelModelReferenceMATLABWorkerInit "None"
	  ModelReferenceNumInstancesAllowed "Multi"
	  PropagateVarSize	  "Infer from blocks in model"
	  ModelReferencePassRootInputsByReference on
	  ModelReferenceMinAlgLoopOccurrences off
	  PropagateSignalLabelsOutOfModel off
	  SupportModelReferenceSimTargetCustomCode off
	}
	Simulink.SFSimCC {
	  $ObjectID		  8
	  Version		  "1.10.0"
	  SFSimEnableDebug	  on
	  SFSimOverflowDetection  on
	  SFSimEcho		  on
	  SimBlas		  on
	  SimCtrlC		  on
	  SimExtrinsic		  on
	  SimIntegrity		  on
	  SimUseLocalCustomCode	  off
	  SimBuildMode		  "sf_incremental_build"
	}
	Simulink.RTWCC {
	  $BackupClass		  "Simulink.RTWCC"
	  $ObjectID		  9
	  Version		  "1.10.0"
	  Array {
	    Type		    "Cell"
	    Dimension		    1
	    Cell		    "TargetLang"
	    PropName		    "DisabledProps"
	  }
	  SystemTargetFile	  "dspic.tlc"
	  GenCodeOnly		  off
	  MakeCommand		  "make_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		  "../../cBuffer.c\n../../ecanFunctions.c\n../../sbrk.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"
	  CustomRebuildMode	  "OnUpdate"
	  Array {
	    Type		    "Handle"
	    Dimension		    2
	    Simulink.CodeAppCC {
	      $ObjectID		      10
	      Version		      "1.10.0"
	      ForceParamTrailComments off
	      GenerateComments	      on
	      IgnoreCustomStorageClasses off
	      IgnoreTestpoints	      off
	      IncHierarchyInIds	      off
	      MaxIdLength	      31
	      PreserveName	      off
	      PreserveNameWithParent  off
	      ShowEliminatedStatement off
	      IncAutoGenComments      off
	      SimulinkDataObjDesc     off
	      SFDataObjDesc	      off
	      IncDataTypeInIds	      off
	      MangleLength	      1
	      CustomSymbolStrGlobalVar "$R$N$M"
	      CustomSymbolStrType     "$N$R$M"
	      CustomSymbolStrField    "$N$M"
	      CustomSymbolStrFcn      "$R$N$M$F"
	      CustomSymbolStrFcnArg   "rt$I$N$M"
	      CustomSymbolStrBlkIO    "rtb_$N$M"
	      CustomSymbolStrTmpVar   "$N$M"
	      CustomSymbolStrMacro    "$R$N$M"
	      DefineNamingRule	      "None"
	      ParamNamingRule	      "None"
	      SignalNamingRule	      "None"
	      InsertBlockDesc	      off
	      SimulinkBlockComments   on
	      EnableCustomComments    off
	      InlinedPrmAccess	      "Literals"
	      ReqsInCode	      off
	      UseSimReservedNames     off
	    }
	    Simulink.STFCustomTargetCC {
	      $BackupClass	      "Simulink.TargetCC"
	      $ObjectID		      11
	      Version		      "1.10.0"
	      Array {
		Type			"Cell"
		Dimension		6
		Cell			"GenerateSampleERTMain"
		Cell			"MatFileLogging"
		Cell			"SupportNonInlinedSFcns"
		Cell			"UtilityFuncGeneration"
		Cell			"IncludeMdlTerminateFcn"
		Cell			"ModelReferenceCompliant"
		PropName		"DisabledProps"
	      }
	      TargetFcnLib	      "ansi_tfl_tmw.mat"
	      TargetLibSuffix	      ""
	      TargetPreCompLibLocation ""
	      TargetFunctionLibrary   "ANSI_C"
	      UtilityFuncGeneration   "Auto"
	      ERTMultiwordTypeDef     "System defined"
	      ERTCodeCoverageTool     "None"
	      ERTMultiwordLength      256
	      MultiwordLength	      2048
	      GenerateFullHeader      on
	      GenerateSampleERTMain   off
	      GenerateTestInterfaces  off
	      IsPILTarget	      off
	      ModelReferenceCompliant on
	      ParMdlRefBuildCompliant off
	      CompOptLevelCompliant   off
	      IncludeMdlTerminateFcn  off
	      GeneratePreprocessorConditionals "Use local settings"
	      CombineOutputUpdateFcns on
	      SuppressErrorStatus     on
	      ERTFirstTimeCompliant   off
	      IncludeFileDelimiter    "Auto"
	      ERTCustomFileBanners    on
	      SupportAbsoluteTime     on
	      LogVarNameModifier      "rt_"
	      MatFileLogging	      off
	      MultiInstanceERTCode    off
	      SupportNonFinite	      on
	      SupportComplex	      on
	      PurelyIntegerCode	      off
	      SupportContinuousTime   off
	      SupportNonInlinedSFcns  off
	      SupportVariableSizeSignals off
	      EnableShiftOperators    on
	      ParenthesesLevel	      "Nominal"
	      PortableWordSizes	      off
	      ModelStepFunctionPrototypeControlCompliant off
	      CPPClassGenCompliant    on
	      AutosarCompliant	      off
	      SystemTargetFile	      "dspic.tlc"
	      DialogCategory	      0
	      Array {
		Type			"Handle"
		Dimension		1
		Simulink.ERTTargetCC {
		  $BackupClass		  "Simulink.TargetCC"
		  $ObjectID		  12
		  Version		  "1.10.0"
		  Array {
		    Type		    "Cell"
		    Dimension		    9
		    Cell		    "GenerateSampleERTMain"
		    Cell		    "GenerateErtSFunction"
		    Cell		    "MatFileLogging"
		    Cell		    "GRTInterface"
		    Cell		    "ERTCustomFileTemplate"
		    Cell		    "SupportNonInlinedSFcns"
		    Cell		    "UtilityFuncGeneration"
		    Cell		    "IncludeMdlTerminateFcn"
		    Cell		    "ModelReferenceCompliant"
		    PropName		    "DisabledProps"
		  }
		  TargetFcnLib		  "ansi_tfl_tmw.mat"
		  TargetLibSuffix	  ""
		  TargetPreCompLibLocation ""
		  TargetFunctionLibrary	  "ANSI_C"
		  UtilityFuncGeneration	  "Auto"
		  ERTMultiwordTypeDef	  "System defined"
		  ERTCodeCoverageTool	  "None"
		  ERTMultiwordLength	  256
		  MultiwordLength	  2048
		  GenerateFullHeader	  on
		  GenerateSampleERTMain	  off
		  GenerateTestInterfaces  off
		  IsPILTarget		  off
		  ModelReferenceCompliant on
		  ParMdlRefBuildCompliant off
		  CompOptLevelCompliant	  off
		  IncludeMdlTerminateFcn  off
		  GeneratePreprocessorConditionals "Use local settings"
		  CombineOutputUpdateFcns on
		  SuppressErrorStatus	  on
		  ERTFirstTimeCompliant	  off
		  IncludeFileDelimiter	  "Auto"
		  ERTCustomFileBanners	  on
		  SupportAbsoluteTime	  on
		  LogVarNameModifier	  "rt_"
		  MatFileLogging	  off
		  MultiInstanceERTCode	  off
		  SupportNonFinite	  on
		  SupportComplex	  on
		  PurelyIntegerCode	  off
		  SupportContinuousTime	  off
		  SupportNonInlinedSFcns  off
		  SupportVariableSizeSignals off
		  EnableShiftOperators	  on
		  ParenthesesLevel	  "Nominal"
		  PortableWordSizes	  off
		  ModelStepFunctionPrototypeControlCompliant off
		  CPPClassGenCompliant	  on
		  AutosarCompliant	  off
		  GenerateErtSFunction	  off
		  GenerateASAP2		  off
		  ExtMode		  off
		  ExtModeTransport	  0
		  ExtModeStaticAlloc	  off
		  ExtModeStaticAllocSize  1000000
		  ExtModeTesting	  off
		  ExtModeMexFile	  "noextcomm"
		  ExtModeIntrfLevel	  "Level1"
		  InlinedParameterPlacement "NonHierarchical"
		  TargetOS		  "BareBoardExample"
		  MultiInstanceErrorCode  "Error"
		  RateGroupingCode	  on
		  RootIOFormat		  "Individual arguments"
		  RTWCAPISignals	  off
		  RTWCAPIParams		  off
		  RTWCAPIStates		  off
		  ERTSrcFileBannerTemplate "dsPIC_code_template.cgt"
		  ERTHdrFileBannerTemplate "dsPIC_code_template.cgt"
		  ERTDataSrcFileTemplate  "dsPIC_code_template.cgt"
		  ERTDataHdrFileTemplate  "dsPIC_code_template.cgt"
		  ERTCustomFileTemplate	  "dsPIC_main.tlc"
		  CoverageDialogOpen	  "off"
		  ModuleNamingRule	  "Unspecified"
		  SignalDisplayLevel	  10
		  ParamTuneLevel	  10
		  GlobalDataDefinition	  "Auto"
		  DataDefinitionFile	  "global.c"
		  GlobalDataReference	  "Auto"
		  ERTFilePackagingFormat  "Modular"
		  DataReferenceFile	  "global.h"
		  GRTInterface		  off
		  PreserveExpressionOrder off
		  PreserveIfCondition	  off
		  ConvertIfToSwitch	  off
		  PreserveExternInFcnDecls on
		  EnableUserReplacementTypes off
		  Array {
		    Type		    "Struct"
		    Dimension		    1
		    MATStruct {
		    double		    ""
		    single		    ""
		    int32		    ""
		    int16		    ""
		    int8		    ""
		    uint32		    ""
		    uint16		    ""
		    uint8		    ""
		    boolean		    ""
		    int			    ""
		    uint		    ""
		    char		    ""
		    }
		    PropName		    "ReplacementTypes"
		  }
		  MemSecPackage		  "--- None ---"
		  MemSecDataConstants	  "Default"
		  MemSecDataIO		  "Default"
		  MemSecDataInternal	  "Default"
		  MemSecDataParameters	  "Default"
		  MemSecFuncInitTerm	  "Default"
		  MemSecFuncExecute	  "Default"
		}
		PropName		"Components"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"GMAKE_PLACE"
		Value			"C:\\PROGRA~1\\MATLAB\\R2010a\\bin\\win32\\gmake"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"OPTIM_GCC"
		Value			"-mcpu=choose_dsPIC_Target -O3 -fschedule-insns -fschedule-insns2"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"LDFLAGS"
		Value			"-t --report-mem -Map ../untitled.map --heap 0  -cref"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"LDPICTYPE"
		Value			" -T C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\support\\dsPIC30F\\gld\\pchoose_dsPIC_Target.gld"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"LDLIBPIC"
		Value			" C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\lib\\libpic30-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\lib\\dsPIC30F\\li"
		"bpchoose_dsPIC_Target-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\lib\\libc-coff.a C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\li"
		"b\\libm-coff.a"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"PIC_INCLUDES"
		Value			" -I C:\\PROGRA~1\\MICROC~1\\MPLABC~1\\include"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"PIC_REF"
		Value			"choose_dsPIC_Target"
	      }
	      CustomProperty {
		DataType		"string"
		Name			"GCCPATH"
		Value			"''"
	      }
	    }
	    PropName		    "Components"
	  }
	}
	hdlcoderui.hdlcc {
	  $ObjectID		  13
	  Version		  "1.10.0"
	  Description		  "HDL Coder custom configuration component"
	  Name			  "HDL Coder"
	}
	PropName		"Components"
      }
      Name		      "Configuration"
      ExtraOptions	      "-aGenerateTraceInfo=0 -aIgnoreTestpoints=0 "
      CurrentDlgPage	      "Real-Time Workshop/Custom Code"
      ConfigPrmDlgPosition    " [ 32, 198, 1070, 944 ] "
    }
    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		      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"
      PreserveConstantTs      off
    }
    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		      EnablePort
      StatesWhenEnabling      "held"
      PropagateVarSize	      "Only when enabling"
      ShowOutputPort	      off
      ZeroCross		      on
    }
    Block {
      BlockType		      Inport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      VarSizeSig	      "Inherit"
      SampleTime	      "-1"
      OutMin		      "[]"
      OutMax		      "[]"
      DataType		      "auto"
      OutDataType	      "fixdt(1,16,0)"
      OutScaling	      "[]"
      OutDataTypeStr	      "Inherit: auto"
      LockScale		      off
      SignalType	      "auto"
      SamplingMode	      "auto"
      LatchByDelayingOutsideSignal off
      LatchInputForFeedbackSignals off
      Interpolate	      on
    }
    Block {
      BlockType		      Mux
      Inputs		      "4"
      DisplayOption	      "none"
      UseBusObject	      off
      BusObject		      "BusObject"
      NonVirtualBus	      off
    }
    Block {
      BlockType		      Outport
      Port		      "1"
      UseBusObject	      off
      BusObject		      "BusObject"
      BusOutputAsStruct	      off
      PortDimensions	      "-1"
      VarSizeSig	      "Inherit"
      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	      "[]"
    }
    Block {
      BlockType		      "S-Function"
      FunctionName	      "system"
      SFunctionModules	      "''"
      PortCounts	      "[]"
      SFunctionDeploymentMode off
    }
    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		      Terminator
    }
  }
  System {
    Name		    "Main"
    Location		    [2, 78, 1278, 974]
    Open		    on
    ModelBrowserVisibility  off
    ModelBrowserWidth	    212
    ScreenColor		    "white"
    PaperOrientation	    "landscape"
    PaperPositionMode	    "auto"
    PaperType		    "usletter"
    PaperUnits		    "inches"
    TiledPaperMargins	    [0.500000, 0.500000, 0.500000, 0.500000]
    TiledPageScale	    1
    ShowPageBoundaries	    off
    ZoomFactor		    "100"
    ReportName		    "simulink-default.rpt"
    SIDHighWatermark	    147
    Block {
      BlockType		      Reference
      Name		      "Configuration"
      SID		      1
      Ports		      []
      Position		      [285, 20, 385, 70]
      BackgroundColor	      "lightBlue"
      DropShadow	      on
      LibraryVersion	      "1.1096"
      SourceBlock	      "dsPICdrivers/Configuration"
      SourceType	      ""
      ShowPortLabels	      "FromPortIcon"
      SystemSampleTime	      "-1"
      FunctionWithSeparateData off
      RTWMemSecFuncInitTerm   "Inherit from model"
      RTWMemSecFuncExecute    "Inherit from model"
      RTWMemSecDataConstants  "Inherit from model"
      RTWMemSecDataInternal   "Inherit from model"
      RTWMemSecDataParameters "Inherit from model"
      double64		      off
    }
    Block {
      BlockType		      SubSystem
      Name		      "Configure ECAN 1"
      SID		      77
      Ports		      []
      Position		      [55, 184, 170, 236]
      BackgroundColor	      "lightBlue"
      DropShadow	      on
      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"
      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 para"
      "meter 4\nparameters(4) = ps1 - 1;\nparameters(4) = bitor(parameters(4), bitshift(pd - 1, 3));\nparameters(4) = b"
      "itor(parameters(4), bitshift(ps2 - 1, 6));\nparameters(4) = bitor(parameters(4), bitshift(sjw - 1, 9));\nif trip"
      "le_sample == 1\n    parameters(4) = bitset(parameters(4),12);\nend\n\n%% Generate parameter 5\nfor k = 1:length("
      "filters)\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"
      "; filter_6_mask; filter_7_mask; filter_8_mask; filter_9_mask; filter_10_mask; filter_11_mask; filter_12_mask; fi"
      "lter_13_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 fil"
      "ter < 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% Gen"
      "erate parameters 8 and 9\nparameters(8) = bitshift(bitand(mask_0,hex2dec('18000000')),-27); % EID17-16\nparamete"
      "rs(8) = bitor(parameters(8), bitshift(bitand(mask_0,hex2dec('7FF')), 5)); % SID\nparameters(8) = bitor(parameter"
      "s(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); "
      "% EID17-16\nparameters(10) = bitor(parameters(10), bitshift(bitand(mask_1,hex2dec('7FF')), 5)); % SID\nparameter"
      "s(10) = bitor(parameters(10), bitshift(mask_1_mide - 1, 3)); % MIDE\nparameters(11) = bitshift(bitand(mask_1,hex"
      "2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 12 and 13\nparameters(12) = bitshift(bitand(mask_2,he"
      "x2dec('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) = b"
      "itshift(bitand(mask_2,hex2dec('7FFF800')),-11); % EID15-0\n\n% Generate parameters 14-17\nbuf_priorities = [buf_"
      "0_tx_pri;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_r"
      "tes = [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 vecto"
      "r of chars to modify\nregs = uint16(zeros(8,1));\n\n% Go through all enabled transmission buffers setting approp"
      "riate bits\nfor b = 1:size(tx_bufs,1)\n    \n    index = tx_bufs(b) + 1;\n    \n    % Set transmission bit\n    "
      "regs(index) = bitset(regs(index),8);\n\n    % Set priority bits\n    regs(index) = bitor(regs(index), buf_priori"
      "ties(index));\n\n    % Set remote transmit enable bits\n    if buf_rtes(index) == 1\n        regs(index) = bitse"
      "t(regs(index),3);\n    end\nend\n\nfor b = 1:size(rx_bufs,1)\n    \n    index = rx_bufs(b) + 1;\n\n    % Set pri"
      "ority bits\n    regs(index) = bitor(regs(index), buf_priorities(index));\n\n    % Set remote transmit enable bit"
      "s\n    if buf_rtes(index) == 1\n        regs(index) = bitset(regs(index),3);\n    end\nend\n\n% Map our matrix i"
      "nto registers\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_buffe"
      "rs = filter_buffers - 1;\n\n%% Generate parameter 18\nif bitget(parameters(5),1) == 1\n    parameters(18) = filt"
      "er_buffers(1);\nend\nif bitget(parameters(5),2) == 1\n    parameters(18) = bitor(parameters(18), bitshift(filter"
      "_buffers(2), 4));\nend\nif bitget(parameters(5),3) == 1\n    parameters(18) = bitor(parameters(18), bitshift(fil"
      "ter_buffers(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) ="
      " filter_buffers(5);\nend\nif bitget(parameters(5),6) == 1\n    parameters(19) = bitor(parameters(19), bitshift(f"
      "ilter_buffers(6), 4));\nend\nif bitget(parameters(5),7) == 1\n    parameters(19) = bitor(parameters(19), bitshif"
      "t(filter_buffers(7), 8));\nend\nif bitget(parameters(5),8) == 1\n    parameters(19) = bitor(parameters(19), bits"
      "hift(filter_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), bits"
      "hift(filter_buffers(10), 4));\nend\nif bitget(parameters(5),11) == 1\n    parameters(20) = bitor(parameters(20),"
      " bitshift(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   "
      " parameters(21) = filter_buffers(13);\nend\nif bitget(parameters(5),14) == 1\n    parameters(21) = bitor(paramet"
      "ers(21), bitshift(filter_buffers(14), 4));\nend\nif bitget(parameters(5),15) == 1\n    parameters(21) = bitor(pa"
      "rameters(21), bitshift(filter_buffers(15), 8));\nend\nif bitget(parameters(5),16) == 1\n    parameters(21) = bit"
      "or(parameters(21), bitshift(filter_buffers(16), 12));\nend\n\n% Generate parameters 22 and 23\nparameters(22) = "
      "bitshift(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%% Gener"
      "ate parameters 24 and 25\nparameters(24) = bitshift(bitand(filter_1,hex2dec('18000000')),-27); % EID17-16\nparam"
      "eters(24) = bitor(parameters(24), bitshift(bitand(filter_1,hex2dec('7FF')), 5)); % SID\nparameters(24) = bitor(p"
      "arameters(24), bitshift(filter_1_exide - 1, 3)); % EXIDE\nparameters(25) = bitshift(bitand(uint32(filter_1),hex2"
      "dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 26 and 27\nparameters(26) = bitshift(bitand(filter_2,h"
      "ex2dec('18000000')),-27); % EID17-16\nparameters(26) = bitor(parameters(26), bitshift(bitand(filter_2,hex2dec('7"
      "FF')), 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\n"
      "parameters(28) = bitshift(bitand(filter_3,hex2dec('18000000')),-27); % EID17-16\nparameters(28) = bitor(paramete"
      "rs(28), bitshift(bitand(filter_3,hex2dec('7FF')), 5)); % SID\nparameters(28) = bitor(parameters(28), bitshift(fi"
      "lter_3_exide - 1, 3)); % EXIDE\nparameters(29) = bitshift(bitand(uint32(filter_3),hex2dec('7FFF800')),-11); % EI"
      "D15-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\nparamet"
      "ers(30) = bitor(parameters(30), bitshift(filter_4_exide - 1, 3)); % EXIDE\nparameters(31) = bitshift(bitand(uint"
      "32(filter_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(fi"
      "lter_5,hex2dec('7FF')), 5)); % SID\nparameters(32) = bitor(parameters(32), bitshift(filter_5_exide - 1, 3)); % E"
      "XIDE\nparameters(33) = bitshift(bitand(uint32(filter_5),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate param"
      "eters 34 and 35\nparameters(34) = bitshift(bitand(filter_6,hex2dec('18000000')),-27); % EID17-16\nparameters(34)"
      " = bitor(parameters(34), bitshift(bitand(filter_6,hex2dec('7FF')), 5)); % SID\nparameters(34) = bitor(parameters"
      "(34), bitshift(filter_6_exide - 1, 3)); % EXIDE\nparameters(35) = bitshift(bitand(uint32(filter_6),hex2dec('7FFF"
      "800')),-11); % EID15-0\n\n%% Generate parameters 36 and 37\nparameters(36) = bitshift(bitand(filter_7,hex2dec('1"
      "8000000')),-27); % EID17-16\nparameters(36) = bitor(parameters(36), bitshift(bitand(filter_7,hex2dec('7FF')), 5)"
      "); % SID\nparameters(36) = bitor(parameters(36), bitshift(filter_7_exide - 1, 3)); % EXIDE\nparameters(37) = bit"
      "shift(bitand(uint32(filter_7),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 38 and 39\nparameter"
      "s(38) = bitshift(bitand(filter_8,hex2dec('18000000')),-27); % EID17-16\nparameters(38) = bitor(parameters(38), b"
      "itshift(bitand(filter_8,hex2dec('7FF')), 5)); % SID\nparameters(38) = bitor(parameters(38), bitshift(filter_8_ex"
      "ide - 1, 3)); % EXIDE\nparameters(39) = bitshift(bitand(uint32(filter_8),hex2dec('7FFF800')),-11); % EID15-0\n\n"
      "%% Generate parameters 40 and 41\nparameters(40) = bitshift(bitand(filter_9,hex2dec('18000000')),-27); % EID17-1"
      "6\nparameters(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),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 42 and 43\nparameters(42) = bitshift(bitand(fi"
      "lter_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\n"
      "parameters(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) = b"
      "itor(parameters(44), bitshift(bitand(filter_11,hex2dec('7FF')), 5)); % SID\nparameters(44) = bitor(parameters(44"
      "), bitshift(filter_11_exide - 1, 3)); % EXIDE\nparameters(45) = bitshift(bitand(uint32(filter_11),hex2dec('7FFF8"
      "00')),-11); % EID15-0\n\n%% Generate parameters 46 and 47\nparameters(46) = bitshift(bitand(filter_12,hex2dec('1"
      "8000000')),-27); % EID17-16\nparameters(46) = bitor(parameters(46), bitshift(bitand(filter_12,hex2dec('7FF')), 5"
      ")); % SID\nparameters(46) = bitor(parameters(46), bitshift(filter_12_exide - 1, 3)); % EXIDE\nparameters(47) = b"
      "itshift(bitand(uint32(filter_12),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 48 and 49\nparame"
      "ters(48) = bitshift(bitand(filter_13,hex2dec('18000000')),-27); % EID17-16\nparameters(48) = bitor(parameters(48"
      "), bitshift(bitand(filter_13,hex2dec('7FF')), 5)); % SID\nparameters(48) = bitor(parameters(48), bitshift(filter"
      "_13_exide - 1, 3)); % EXIDE\nparameters(49) = bitshift(bitand(uint32(filter_13),hex2dec('7FFF800')),-11); % EID1"
      "5-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\nparamet"
      "ers(50) = bitor(parameters(50), bitshift(filter_14_exide - 1, 3)); % EXIDE\nparameters(51) = bitshift(bitand(uin"
      "t32(filter_14),hex2dec('7FFF800')),-11); % EID15-0\n\n%% Generate parameters 52 and 53\nparameters(52) = bitshif"
      "t(bitand(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))"
      "; % EXIDE\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|4|20|on|4 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('400')|0|Match only standard|1|hex2dec('401')|0|Match only standard|1|hex2dec('402')|0|Match only standa"
      "rd|1|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"
      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]"
	  SID			  78
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [1]
	  Position		  [145, 40, 270, 80]
	  LibraryVersion	  "1.1096"
	  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"
	  SID			  79
	  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"
      SID		      5
      Ports		      []
      Position		      [35, 14, 147, 70]
      BackgroundColor	      "yellow"
      DropShadow	      on
      LibraryVersion	      "1.1096"
      SourceBlock	      "dsPICdrivers/Simulink Configuration/Configure Model \nfor dsPIC"
      SourceType	      ""
    }
    Block {
      BlockType		      Reference
      Name		      "Counter\nLimited"
      SID		      80
      Ports		      [0, 1]
      Position		      [335, 400, 365, 430]
      LibraryVersion	      "1.216"
      SourceBlock	      "simulink/Sources/Counter\nLimited"
      SourceType	      "Counter Limited"
      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"
      uplimit		      "1"
      tsamp		      ".1"
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion"
      SID		      81
      Position		      [410, 366, 475, 384]
      ShowName		      off
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion1"
      SID		      82
      Position		      [410, 326, 475, 344]
      ShowName		      off
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      DataTypeConversion
      Name		      "Data Type Conversion2"
      SID		      83
      Position		      [410, 406, 475, 424]
      ShowName		      off
      OutDataType	      "sfix(16)"
      OutScaling	      "2^0"
      RndMeth		      "Floor"
      SaturateOnIntegerOverflow	off
    }
    Block {
      BlockType		      Reference
      Name		      "Digital Output Write"
      SID		      84
      Tag		      "dsPIC_Digital_Output"
      Ports		      [3]
      Position		      [535, 314, 615, 436]
      Priority		      "5"
      LibraryVersion	      "1.1096"
      SourceBlock	      "dsPICdrivers/Digital I//O/Digital Output Write"
      SourceType	      ""
      PORT		      "A"
      Pin		      "[0 1 7]"
      Simultaneous	      off
      OrderingInOutPopup      "None"
    }
    Block {
      BlockType		      Reference
      Name		      "DocBlock"
      SID		      11
      Ports		      []
      Position		      [417, 25, 504, 72]
      ShowName		      off
      LibraryVersion	      "1.216"
      UserDataPersistent      on
      UserData		      "DataTag0"
      SourceBlock	      "simulink/Model-Wide\nUtilities/DocBlock"
      SourceType	      "DocBlock"
      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"
      DocumentType	      "Text"
    }
    Block {
      BlockType		      SubSystem
      Name		      "ECAN1 Error Status"
      SID		      85
      Ports		      [0, 2]
      Position		      [255, 317, 365, 393]
      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_error_sample_time=@1;"
      MaskDisplay	      "disp('ECAN1 ERR');"
      MaskIconFrame	      on
      MaskIconOpaque	      off
      MaskIconRotate	      "none"
      MaskPortRotate	      "default"
      MaskIconUnits	      "autoscale"
      MaskValueString	      ".1"
      System {
	Name			"ECAN1 Error Status"
	Location		[479, 513, 1139, 820]
	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]"
	  SID			  86
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [0, 1]
	  Position		  [25, 85, 150, 125]
	  LibraryVersion	  "1.1096"
	  List {
	    ListType		    RTWdata
	    FctDeclaration	    "extern void ecan1_error_status_matlab(uint8_T* y1);"
	    FctCall		    "ecan1_error_status_matlab(*%y1);"
	    fctName		    "ecan1_error_status_matlab"
	    INPUT_SIZE		    "1"
	    OUTPUT_SIZE		    "2"
	    NBR_INPUT		    "0"
	    NBR_OUTPUT		    "1"
	  }
	  SourceBlock		  "dsPICdrivers/OTHERS/C Function Call"
	  SourceType		  "C Function Call"
	  fctName		  "'ecan1_error_status_matlab'"
	  INPUT_SIZE		  "1"
	  INPUT1		  "--"
	  INPUT2		  "--"
	  INPUT3		  "--"
	  OUTPUT_SIZE		  "2"
	  OUTPUT1		  "uint8"
	  SampleTime		  "ecan1_error_sample_time"
	  InputType		  "[ ]"
	  OutputType		  "[ 2 ]"
	  FctDeclaration	  "extern void ecan1_error_status_matlab(uint8_T* y1);"
	  FctCall		  "ecan1_error_status_matlab(*%y1);"
	  OrderingInOutPopup	  "None"
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  SID			  87
	  Ports			  [1, 2]
	  Position		  [185, 75, 190, 135]
	  BackgroundColor	  "black"
	  ShowName		  off
	  Outputs		  "2"
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Outport
	  Name			  "tx_err"
	  SID			  88
	  Position		  [250, 83, 280, 97]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "rx_err"
	  SID			  89
	  Position		  [250, 113, 280, 127]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  DstBlock		  "rx_err"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  DstBlock		  "tx_err"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "C Function Call\n[ecanFunctions.c]"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      Reference
      Name		      "Master"
      SID		      76
      Tag		      "dsPIC_MASTER"
      Ports		      []
      Position		      [169, 20, 269, 70]
      BackgroundColor	      "lightBlue"
      DropShadow	      on
      Priority		      "1"
      LibraryVersion	      "1.1096"
      List {
	ListType		RTWdata
	NumBusyPort		"-1"
      }
      SourceBlock	      "dsPICdrivers/Master"
      SourceType	      "Master"
      TimeStepType	      "Timer1"
      picType		      "choose_dsPIC_Target"
      fcy		      "5e6"
      Quartz_33f	      "5e6"
      PLLActive_33f	      off
      fcyDesired_33f	      "0"
      tmr1		      "[1  4999  0]"
      tmr1Info		      "Time Step : 0.001  ;   Error : 0%  PR1=4999"
      tmr2345		      "[0  0  0  0  0  0  0  0]"
      tmr2345cfg	      "[-1 -1 -1 -1 -1 -1 -1 -1]"
      IOautoConf	      on
      typePort		      "[ 10  10   0   0   0   0   0  10   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   "
      "0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   "
      "0   0   0   0   0   0   0   0   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		      "[ 65404  65535  65535  65535  65535  65535  65535 ]"
      ADPCFG		      "131"
      MasterBusyPort	      "None"
      MasterOverloadPort      "None"
      FOSC		      "CSW_FSCM_OFF"
      ClockSwitchMonitor      "Both disabled"
      TempProtection_33f      "TEMP_ON"
      FPBOR		      "PBOR_OFF"
      PWRT		      "PWRT_OFF"
      MCLR		      "MCLR_DIS"
      ICD		      "ICS_NONE"
      JTAGEN		      "JTAGEN_OFF"
      PowerSave		      off
      OverrideFcy	      off
      NewFcy		      "1e6"
      PR2345		      "[65535  65535  65535  65535  65535  65535  65535  65535]"
    }
    Block {
      BlockType		      SubSystem
      Name		      "Receive ECAN1 Message"
      SID		      90
      Ports		      [0, 5]
      Position		      [245, 187, 355, 263]
      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	      ".01"
      System {
	Name			"Receive ECAN1 Message"
	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]"
	  SID			  91
	  Tag			  "dsPIC_dsPIC_CFunctionCall"
	  Ports			  [0, 1]
	  Position		  [25, 85, 150, 125]
	  LibraryVersion	  "1.1096"
	  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"
	  SID			  92
	  Ports			  [1, 1]
	  Position		  [250, 15, 280, 45]
	  ShowName		  off
	  LibraryVersion	  "1.216"
	  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"
	  SID			  93
	  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"
	  SID			  94
	  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"
	      SID		      95
	      Position		      [35, 58, 65, 72]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "high-order\nuint1"
	      SID		      96
	      Position		      [35, 178, 65, 192]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Extract Bits"
	      SID		      97
	      Ports		      [1, 1]
	      Position		      [90, 52, 170, 78]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      98
	      Ports		      [1, 1]
	      Position		      [90, 82, 170, 108]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      99
	      Ports		      [1, 1]
	      Position		      [90, 112, 170, 138]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      100
	      Ports		      [1, 1]
	      Position		      [90, 142, 170, 168]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      101
	      Ports		      [1, 1]
	      Position		      [90, 172, 170, 198]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      102
	      Ports		      [1, 1]
	      Position		      [90, 202, 170, 228]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      103
	      Ports		      [1, 1]
	      Position		      [90, 232, 170, 258]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      104
	      Ports		      [1, 1]
	      Position		      [90, 262, 170, 288]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      105
	      Ports		      [8, 1]
	      Position		      [290, 55, 295, 285]
	      ShowName		      off
	      Inputs		      "8"
	      DisplayOption	      "bar"
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "uint8 array"
	      SID		      106
	      Position		      [350, 163, 380, 177]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Line {
	      SrcBlock		      "low-order\nuint32"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		DstBlock		"Extract Bits"
		DstPort			1
	      }
	      Branch {
		Points			[0, 30]
		Branch {
		  DstBlock		  "Extract Bits1"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 30]
		  Branch {
		    DstBlock		    "Extract Bits2"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Extract Bits3"
		    DstPort		    1
		  }
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Mux"
	      SrcPort		      1
	      DstBlock		      "uint8 array"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "high-order\nuint1"
	      SrcPort		      1
	      Points		      [5, 0]
	      Branch {
		DstBlock		"Extract Bits4"
		DstPort			1
	      }
	      Branch {
		Points			[0, 30]
		Branch {
		  DstBlock		  "Extract Bits5"
		  DstPort		  1
		}
		Branch {
		  Points		  [0, 30]
		  Branch {
		    DstBlock		    "Extract Bits6"
		    DstPort		    1
		  }
		  Branch {
		    DstBlock		    "Extract Bits7"
		    DstPort		    1
		  }
		}
	      }
	    }
	    Line {
	      SrcBlock		      "Extract Bits"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      1
	    }
	    Line {
	      SrcBlock		      "Extract Bits7"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      8
	    }
	    Line {
	      SrcBlock		      "Extract Bits1"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      2
	    }
	    Line {
	      SrcBlock		      "Extract Bits2"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      3
	    }
	    Line {
	      SrcBlock		      "Extract Bits3"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      4
	    }
	    Line {
	      SrcBlock		      "Extract Bits4"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      5
	    }
	    Line {
	      SrcBlock		      "Extract Bits5"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      6
	    }
	    Line {
	      SrcBlock		      "Extract Bits6"
	      SrcPort		      1
	      DstBlock		      "Mux"
	      DstPort		      7
	    }
	  }
	}
	Block {
	  BlockType		  Demux
	  Name			  "Demux"
	  SID			  107
	  Ports			  [1, 4]
	  Position		  [185, 45, 190, 165]
	  BackgroundColor	  "black"
	  ShowName		  off
	  DisplayOption		  "bar"
	}
	Block {
	  BlockType		  Reference
	  Name			  "Extract Bits"
	  SID			  108
	  Ports			  [1, 1]
	  Position		  [220, 137, 300, 163]
	  ShowName		  off
	  LibraryVersion	  "1.216"
	  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"
	  SID			  109
	  Ports			  [1, 1]
	  Position		  [220, 167, 300, 193]
	  ShowName		  off
	  LibraryVersion	  "1.216"
	  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"
	  SID			  110
	  Ports			  [1, 1]
	  Position		  [335, 47, 415, 73]
	  ShowName		  off
	  LibraryVersion	  "1.216"
	  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"
	  SID			  111
	  Position		  [470, 53, 500, 67]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "data"
	  SID			  112
	  Position		  [375, 88, 405, 102]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "remote"
	  SID			  113
	  Position		  [405, 143, 435, 157]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "new"
	  SID			  114
	  Position		  [300, 23, 330, 37]
	  Port			  "4"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Outport
	  Name			  "size"
	  SID			  115
	  Position		  [405, 173, 435, 187]
	  Port			  "5"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Line {
	  SrcBlock		  "C Function Call\n[ecanFunctions.c]"
	  SrcPort		  1
	  DstBlock		  "Demux"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  1
	  Points		  [35, 0]
	  Branch {
	    DstBlock		    "Extract Bits2"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, -30]
	    DstBlock		    "Compare\nTo Zero"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  3
	  Points		  [25, 0]
	  DstBlock		  "Decompose uint64"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  4
	  Points		  [5, 0]
	  Branch {
	    DstBlock		    "Extract Bits"
	    DstPort		    1
	  }
	  Branch {
	    Points		    [0, 30]
	    DstBlock		    "Extract Bits1"
	    DstPort		    1
	  }
	}
	Line {
	  SrcBlock		  "Data Type Conversion"
	  SrcPort		  1
	  DstBlock		  "remote"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Demux"
	  SrcPort		  2
	  Points		  [25, 0]
	  DstBlock		  "Decompose uint64"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Extract Bits"
	  SrcPort		  1
	  DstBlock		  "Data Type Conversion"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Decompose uint64"
	  SrcPort		  1
	  DstBlock		  "data"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Extract Bits2"
	  SrcPort		  1
	  DstBlock		  "identifier"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Compare\nTo Zero"
	  SrcPort		  1
	  DstBlock		  "new"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "Extract Bits1"
	  SrcPort		  1
	  DstBlock		  "size"
	  DstPort		  1
	}
      }
    }
    Block {
      BlockType		      SubSystem
      Name		      "Send ECAN1 Message"
      SID		      116
      Tag		      "dsPIC_MASTER"
      Ports		      [4]
      Position		      [545, 152, 710, 268]
      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,off,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"
      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('401')|on|off|off|[hex2dec('11') hex2dec('12') hex2dec('13') hex2dec('14')]|4|o"
      "n|.01|on"
      System {
	Name			"Send ECAN1 Message"
	Location		[502, 447, 1145, 849]
	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			  "identifier"
	  SID			  117
	  Position		  [25, 92, 100, 108]
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Inport
	  Name			  "data"
	  SID			  118
	  Position		  [35, 227, 100, 243]
	  Port			  "2"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Inport
	  Name			  "data_length"
	  SID			  119
	  Position		  [30, 42, 95, 58]
	  Port			  "3"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  Inport
	  Name			  "trigger"
	  SID			  120
	  Position		  [400, 107, 465, 123]
	  Port			  "4"
	  IconDisplay		  "Port number"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	}
	Block {
	  BlockType		  SubSystem
	  Name			  "C-function Call"
	  SID			  121
	  Ports			  [1, 0, 1]
	  Position		  [485, 134, 560, 176]
	  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"
	      SID		      122
	      Position		      [25, 78, 55, 92]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      EnablePort
	      Name		      "Enable"
	      SID		      123
	      Ports		      []
	      Position		      [125, 15, 145, 35]
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "ECAN1 Transmit\n[ecanFunctions.c]"
	      SID		      124
	      Tag		      "dsPIC_dsPIC_CFunctionCall"
	      Ports		      [1]
	      Position		      [80, 65, 205, 105]
	      BackgroundColor	      "orange"
	      LibraryVersion	      "1.1096"
	      List {
		ListType		RTWdata
		FctDeclaration		"extern void ecan1_buffered_transmit_matlab(uint16_T* u1);"
		FctCall			"ecan1_buffered_transmit_matlab(*%u1);"
		fctName			"ecan1_buffered_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_buffered_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_buffered_transmit_matlab(uint16_T* u1);"
	      FctCall		      "ecan1_buffered_transmit_matlab(*%u1);"
	      OrderingInOutPopup      "None"
	    }
	    Line {
	      SrcBlock		      "parameters"
	      SrcPort		      1
	      DstBlock		      "ECAN1 Transmit\n[ecanFunctions.c]"
	      DstPort		      1
	    }
	  }
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant"
	  SID			  125
	  Position		  [60, 17, 100, 33]
	  ShowName		  off
	  Value			  "buffer"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant2"
	  SID			  126
	  Position		  [60, 152, 100, 168]
	  ShowName		  off
	  Value			  "ide"
	  OutDataTypeMode	  "uint8"
	  OutDataType		  "sfix(16)"
	  OutScaling		  "2^0"
	  OutDataTypeStr	  "uint8"
	}
	Block {
	  BlockType		  Constant
	  Name			  "Constant3"
	  SID			  127
	  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"
	  SID			  128
	  Ports			  [1, 1]
	  Position		  [220, 107, 295, 143]
	  ShowName		  off
	  LibraryVersion	  "1.216"
	  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"
	  SID			  129
	  Ports			  [1, 1]
	  Position		  [220, 63, 295, 97]
	  ShowName		  off
	  LibraryVersion	  "1.216"
	  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		  SubSystem
	  Name			  "myMux"
	  SID			  130
	  Ports			  [5, 1]
	  Position		  [370, 74, 375, 236]
	  BackgroundColor	  "black"
	  ShowName		  off
	  PermitHierarchicalResolution "ExplicitOnly"
	  TreatAsAtomicUnit	  on
	  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"
	    SIDHighWatermark	    13
	    Block {
	      BlockType		      Inport
	      Name		      "u1"
	      SID		      1
	      Position		      [20, 101, 40, 119]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u2"
	      SID		      2
	      Position		      [20, 136, 40, 154]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u3"
	      SID		      3
	      Position		      [20, 171, 40, 189]
	      Port		      "3"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u4"
	      SID		      4
	      Position		      [20, 206, 40, 224]
	      Port		      "4"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "u5"
	      SID		      5
	      Position		      [20, 246, 40, 264]
	      Port		      "5"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Demux
	      Name		      " Demux "
	      SID		      11
	      Ports		      [1, 1]
	      Position		      [270, 220, 320, 260]
	      Outputs		      "1"
	    }
	    Block {
	      BlockType		      "S-Function"
	      Name		      " SFunction "
	      SID		      10
	      Tag		      "Stateflow S-Function Main 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 "
	      SID		      13
	      Position		      [460, 231, 480, 249]
	    }
	    Block {
	      BlockType		      Outport
	      Name		      "y"
	      SID		      9
	      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"
	  SID			  131
	  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"
	      SID		      132
	      Position		      [25, 13, 55, 27]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "low-order"
	      SID		      133
	      Position		      [25, 48, 55, 62]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Bitwise\nOperator"
	      SID		      134
	      Ports		      [2, 1]
	      Position		      [305, 26, 345, 64]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      135
	      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"
	      SID		      136
	      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"
	      SID		      137
	      Ports		      [1, 1]
	      Position		      [185, 46, 265, 64]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      138
	      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"
	  SID			  139
	  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"
	      SID		      140
	      Position		      [25, 13, 55, 27]
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Inport
	      Name		      "low-order"
	      SID		      141
	      Position		      [25, 48, 55, 62]
	      Port		      "2"
	      IconDisplay	      "Port number"
	      OutDataType	      "sfix(16)"
	      OutScaling	      "2^0"
	    }
	    Block {
	      BlockType		      Reference
	      Name		      "Bitwise\nOperator"
	      SID		      142
	      Ports		      [2, 1]
	      Position		      [305, 26, 345, 64]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      143
	      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"
	      SID		      144
	      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"
	      SID		      145
	      Ports		      [1, 1]
	      Position		      [185, 46, 265, 64]
	      ShowName		      off
	      LibraryVersion	      "1.216"
	      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"
	      SID		      146
	      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		  "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		  "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		  "Constant3"
	  SrcPort		  1
	  DstBlock		  "uint8 combiner1"
	  DstPort		  2
	}
	Line {
	  SrcBlock		  "Constant2"
	  SrcPort		  1
	  DstBlock		  "uint8 combiner1"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "myMux"
	  SrcPort		  1
	  DstBlock		  "C-function Call"
	  DstPort		  1
	}
	Line {
	  SrcBlock		  "uint8 combiner2"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "myMux"
	  DstPort		  1
	}
	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		  "uint8 combiner1"
	  SrcPort		  1
	  Points		  [55, 0]
	  DstBlock		  "myMux"
	  DstPort		  4
	}
	Line {
	  SrcBlock		  "data"
	  SrcPort		  1
	  Points		  [250, 0]
	  DstBlock		  "myMux"
	  DstPort		  5
	}
      }
    }
    Block {
      BlockType		      Terminator
      Name		      "Terminator"
      SID		      147
      Position		      [395, 215, 415, 235]
      ShowName		      off
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message"
      SrcPort		      3
      DstBlock		      "Terminator"
      DstPort		      1
    }
    Line {
      SrcBlock		      "ECAN1 Error Status"
      SrcPort		      2
      DstBlock		      "Data Type Conversion"
      DstPort		      1
    }
    Line {
      SrcBlock		      "ECAN1 Error Status"
      SrcPort		      1
      DstBlock		      "Data Type Conversion1"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Counter\nLimited"
      SrcPort		      1
      DstBlock		      "Data Type Conversion2"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Data Type Conversion1"
      SrcPort		      1
      DstBlock		      "Digital Output Write"
      DstPort		      1
    }
    Line {
      SrcBlock		      "Data Type Conversion"
      SrcPort		      1
      DstBlock		      "Digital Output Write"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Data Type Conversion2"
      SrcPort		      1
      DstBlock		      "Digital Output Write"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message"
      SrcPort		      2
      Points		      [170, 0]
      DstBlock		      "Send ECAN1 Message"
      DstPort		      2
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message"
      SrcPort		      4
      Points		      [120, 0; 0, 15]
      DstBlock		      "Send ECAN1 Message"
      DstPort		      4
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message"
      SrcPort		      5
      Points		      [95, 0; 0, -30]
      DstBlock		      "Send ECAN1 Message"
      DstPort		      3
    }
    Line {
      SrcBlock		      "Receive ECAN1 Message"
      SrcPort		      1
      Points		      [170, 0]
      DstBlock		      "Send ECAN1 Message"
      DstPort		      1
    }
  }
}
MatData {
  NumRecords		  1
  DataRecord {
    Tag			    DataTag0
    Data		    "  %)30     .    D $   8    (     @         %    \"     $    !     0         %  0 \"     $    0    =F5R<"
    "VEO;@!C;VYT96YT  X    X    !@    @    &          4    (     0    $    !          D    (    FIF9F9F9\\3\\.      $  "
    " 8    (    !          %    \"     $   #-     0         0    S0   %1H:7,@;6]D96P@<F5C<F5A=&5S('1H92!#<F]S<W=I<F4@87"
    "!P;&EC871I;VX@;F]T92!F<F]M($UI8W)O8VAI<\"X-\"E1H92!$96)U9V=I;F<@9&ER96-T;W)Y(&EN8VQU9&5S(&%N($U03$%\"('!R;VIE8W0@="
    "&AA=\"!C86X@8V]M<&EL92!A;F0@;&]A9 T*=&AE($U!5$Q!0BUG96YE<F%T960@8V]D92!I;B!O<F1E<B!T;R!F86-I;&ET871E(&1E8G5G9VEN9R"
    "X    "
  }
}
# Finite State Machines
#
#    Stateflow Version 7.5 (R2010a) dated Jan 19 2010, 19:48:30
#
#


Stateflow {
  machine {
    id			    1
    name		    "Main"
    created		    "23-Jan-2010 13:01:13"
    isLibrary		    0
    firstTarget		    13
    sfVersion		    75014000
  }
  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
    subviewS {
    }
    ssIdHighWaterMark	    9
    decomposition	    CLUSTER_CHART
    type		    EML_CHART
    firstData		    6
    chartFileNumber	    8
    disableImplicitCasting  1
    eml {
      name		      "myMux"
      noDebugging	      1
    }
    supportVariableSizing   0
  }
  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]"
      fimathString	      "fimath(...\n'RoundMode', 'floor',...\n'OverflowMode', 'wrap',...\n'ProductMode', 'KeepLSB', "
      "'ProductWordLength', 32,...\n'SumMode', 'KeepLSB', 'SumWordLength', 32,...\n'CastBeforeSum', true)"
      fimathForFiConstructors FimathMatlabFactoryDefault
      emlDefaultFimath	      FimathUserSpecified
    }
  }
  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]
  }
}
