Model {
Name "meart_target_60"
Version 6.5
MdlSubVersion 0
GraphicalInterface {
NumRootInports 0
NumRootOutports 0
ParameterArgumentNames ""
ComputedModelVersion "1.934"
NumModelReferences 0
NumTestPointedSignals 0
}
SavedCharacterEncoding "windows-1252"
SaveDefaultBlockParams on
SampleTimeColors on
LibraryLinkDisplay "none"
WideLines off
ShowLineDimensions on
ShowPortDataTypes on
ShowLoopsOnError on
IgnoreBidirectionalLines off
ShowStorageClass off
ShowTestPointIcons on
ShowViewerIcons on
SortedOrder off
ExecutionContextIcon off
ShowLinearizationAnnotations on
ScopeRefreshTime 0.035000
OverrideScopeRefreshTime on
DisableAllScopes off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
MinMaxOverflowArchiveMode "Overwrite"
BlockNameDataTip off
BlockParametersDataTip off
BlockDescriptionStringDataTip off
ToolBar on
StatusBar on
BrowserShowLibraryLinks off
BrowserLookUnderMasks off
CloseFcn "rtwprivate ssgencode ModelCloseRequest meart_target"
Created "Wed Jan 10 14:49:36 2007"
Creator "cdfz"
UpdateHistory "UpdateHistoryNever"
ModifiedByFormat "%<Auto>"
LastModifiedBy "avnerw"
ModifiedDateFormat "%<Auto>"
LastModifiedDate "Sun Dec 20 12:17:42 2009"
ModelVersionFormat "1.%<AutoIncrement:934>"
ConfigurationManager "None"
LinearizationMsg "none"
Profile off
ParamWorkspaceSource "MATLABWorkspace"
AccelSystemTargetFile "accel.tlc"
AccelTemplateMakefile "accel_default_tmf"
AccelMakeCommand "make_rtw"
TryForcingSFcnDF off
RecordCoverage off
CovPath "/"
CovSaveName "covdata"
CovMetricSettings "dw"
CovNameIncrementing off
CovHtmlReporting on
covSaveCumulativeToWorkspaceVar on
CovSaveSingleToWorkspaceVar on
CovCumulativeVarName "covCumulativeData"
CovCumulativeReport off
CovReportOnPause on
ExtModeBatchMode off
ExtModeEnableFloating on
ExtModeTrigType "manual"
ExtModeTrigMode "normal"
ExtModeTrigPort "1"
ExtModeTrigElement "any"
ExtModeTrigDuration 1000
ExtModeTrigDurationFloating "auto"
ExtModeTrigHoldOff 0
ExtModeTrigDelay 0
ExtModeTrigDirection "rising"
ExtModeTrigLevel 0
ExtModeArchiveMode "off"
ExtModeAutoIncOneShot off
ExtModeIncDirWhenArm off
ExtModeAddSuffixToVar off
ExtModeWriteAllDataToWs off
ExtModeArmWhenConnect on
ExtModeSkipDownloadWhenConnect off
ExtModeLogAll on
ExtModeAutoUpdateStatusClock on
TunableVars "closeonsingleenbale"
TunableVarsStorageClass "Auto"
BufferReuse off
ProdHWDeviceType "32-bit xPC Target (AMD Athlon)"
ShowModelReferenceBlockVersion off
ShowModelReferenceBlockIO off
Array {
Type "Handle"
Dimension 1
Simulink.ConfigSet {
$ObjectID 1
Version "1.2.0"
Array {
Type "Handle"
Dimension 7
Simulink.SolverCC {
$ObjectID 2
Version "1.2.0"
StartTime "0.0"
StopTime "Inf"
AbsTol "auto"
FixedStep "0.0005"
InitialStep "auto"
MaxNumMinSteps "-1"
MaxOrder 5
ConsecutiveZCsStepRelTol "10*128*eps"
MaxConsecutiveZCs "1000"
ExtrapolationOrder 4
NumberNewtonIterations 1
MaxStep "auto"
MinStep "auto"
MaxConsecutiveMinStep "1"
RelTol "1e-3"
SolverMode "Auto"
Solver "FixedStepDiscrete"
SolverName "FixedStepDiscrete"
ZeroCrossControl "UseLocalSettings"
AlgebraicLoopSolver "TrustRegion"
SolverResetMethod "Fast"
PositivePriorityOrder off
AutoInsertRateTranBlk off
SampleTimeConstraint "Unconstrained"
RateTranMode "Deterministic"
}
Simulink.DataIOCC {
$ObjectID 3
Version "1.2.0"
Decimation "1"
ExternalInput "[t, u]"
FinalStateName "xFinal"
InitialState "xInitial"
LimitDataPoints off
MaxDataPoints "1000"
LoadExternalInput off
LoadInitialState off
SaveFinalState off
SaveFormat "Array"
SaveOutput on
SaveState off
SignalLogging off
InspectSignalLogs off
SaveTime off
StateSaveName "xout"
TimeSaveName "tout"
OutputSaveName "yout"
SignalLoggingName "logsout"
OutputOption "RefineOutputTimes"
OutputTimes "[]"
Refine "1"
}
Simulink.OptimizationCC {
$ObjectID 4
Array {
Type "Cell"
Dimension 5
Cell "ZeroExternalMemoryAtStartup"
Cell "ZeroInternalMemoryAtStartup"
Cell "InitFltsAndDblsToZero"
Cell "OptimizeModelRefInitCode"
Cell "NoFixptDivByZeroProtection"
PropName "DisabledProps"
}
Version "1.2.0"
BlockReduction off
BooleanDataType on
ConditionallyExecuteInputs on
InlineParams on
InlineInvariantSignals off
OptimizeBlockIOStorage off
BufferReuse off
EnforceIntegerDowncast off
ExpressionFolding off
FoldNonRolledExpr on
LocalBlockOutputs off
ParameterPooling on
RollThreshold 5
SystemCodeInlineAuto off
StateBitsets off
DataBitsets off
UseTempVars on
ZeroExternalMemoryAtStartup on
ZeroInternalMemoryAtStartup on
InitFltsAndDblsToZero on
NoFixptDivByZeroProtection off
EfficientFloat2IntCast off
OptimizeModelRefInitCode off
LifeSpan "inf"
BufferReusableBoundary on
}
Simulink.DebuggingCC {
$ObjectID 5
Version "1.2.0"
RTPrefix "error"
ConsistencyChecking "none"
ArrayBoundsChecking "none"
SignalInfNanChecking "none"
ReadBeforeWriteMsg "UseLocalSettings"
WriteAfterWriteMsg "UseLocalSettings"
WriteAfterReadMsg "UseLocalSettings"
AlgebraicLoopMsg "warning"
ArtificialAlgebraicLoopMsg "warning"
CheckSSInitialOutputMsg on
CheckExecutionContextPreStartOutputMsg off
CheckExecutionContextRuntimeOutputMsg off
SignalResolutionControl "TryResolveAllWithWarning"
BlockPriorityViolationMsg "warning"
MinStepSizeMsg "warning"
TimeAdjustmentMsg "none"
MaxConsecutiveZCsMsg "error"
SolverPrmCheckMsg "warning"
InheritedTsInSrcMsg "warning"
DiscreteInheritContinuousMsg "warning"
MultiTaskDSMMsg "error"
MultiTaskCondExecSysMsg "error"
MultiTaskRateTransMsg "error"
SingleTaskRateTransMsg "none"
TasksWithSamePriorityMsg "warning"
SigSpecEnsureSampleTimeMsg "warning"
CheckMatrixSingularityMsg "none"
IntegerOverflowMsg "warning"
Int32ToFloatConvMsg "warning"
ParameterDowncastMsg "error"
ParameterOverflowMsg "error"
ParameterUnderflowMsg "none"
ParameterPrecisionLossMsg "warning"
UnderSpecifiedDataTypeMsg "none"
UnnecessaryDatatypeConvMsg "none"
VectorMatrixConversionMsg "none"
InvalidFcnCallConnMsg "error"
FcnCallInpInsideContextMsg "Use local settings"
SignalLabelMismatchMsg "none"
UnconnectedInputMsg "warning"
UnconnectedOutputMsg "warning"
UnconnectedLineMsg "warning"
SFcnCompatibilityMsg "none"
UniqueDataStoreMsg "none"
BusObjectLabelMismatch "warning"
RootOutportRequireBusObject "warning"
AssertControl "UseLocalSettings"
EnableOverflowDetection off
ModelReferenceIOMsg "none"
ModelReferenceVersionMismatchMessage "none"
ModelReferenceIOMismatchMessage "none"
ModelReferenceCSMismatchMessage "none"
ModelReferenceSimTargetVerbose off
UnknownTsInhSupMsg "warning"
ModelReferenceDataLoggingMessage "warning"
ModelReferenceSymbolNameMessage "warning"
ModelReferenceExtraNoncontSigs "error"
StrictBusMsg "Warning"
}
Simulink.HardwareCC {
$ObjectID 6
Version "1.2.0"
ProdBitPerChar 8
ProdBitPerShort 16
ProdBitPerInt 32
ProdBitPerLong 32
ProdIntDivRoundTo "Zero"
ProdEndianess "LittleEndian"
ProdWordSize 32
ProdShiftRightIntArith on
ProdHWDeviceType "32-bit xPC Target (AMD Athlon)"
TargetBitPerChar 8
TargetBitPerShort 16
TargetBitPerInt 32
TargetBitPerLong 32
TargetShiftRightIntArith on
TargetIntDivRoundTo "Undefined"
TargetEndianess "Unspecified"
TargetWordSize 32
TargetTypeEmulationWarnSuppressLevel 0
TargetPreprocMaxBitsSint 32
TargetPreprocMaxBitsUint 32
TargetHWDeviceType "Specified"
TargetUnknown off
ProdEqTarget on
}
Simulink.ModelReferenceCC {
$ObjectID 7
Version "1.2.0"
UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
CheckModelReferenceTargetMessage "error"
ModelReferenceNumInstancesAllowed "Multi"
ModelReferencePassRootInputsByReference on
ModelReferenceMinAlgLoopOccurrences off
}
Simulink.RTWCC {
$BackupClass "Simulink.RTWCC"
$ObjectID 8
Array {
Type "Cell"
Dimension 1
Cell "IncludeHyperlinkInReport"
PropName "DisabledProps"
}
Version "1.2.0"
SystemTargetFile "xpctarget.tlc"
GenCodeOnly off
MakeCommand "make_rtw"
GenerateMakefile on
TemplateMakefile "xpc_default_tmf"
Description "xPC Target"
GenerateReport off
SaveLog off
RTWVerbose on
RetainRTWFile off
ProfileTLC off
TLCDebug off
TLCCoverage off
TLCAssert off
ProcessScriptMode "Default"
ConfigurationMode "Optimized"
ProcessScript "xpctarget_make_rtw_hook"
ConfigAtBuild off
IncludeHyperlinkInReport off
LaunchReport off
TargetLang "C"
IncludeBusHierarchyInRTWFileBlockHierarchyMap off
IncludeERTFirstTime off
Array {
Type "Handle"
Dimension 2
Simulink.CodeAppCC {
$ObjectID 9
Array {
Type "Cell"
Dimension 16
Cell "IgnoreCustomStorageClasses"
Cell "InsertBlockDesc"
Cell "SFDataObjDesc"
Cell "SimulinkDataObjDesc"
Cell "DefineNamingRule"
Cell "SignalNamingRule"
Cell "ParamNamingRule"
Cell "InlinedPrmAccess"
Cell "CustomSymbolStr"
Cell "CustomSymbolStrGlobalVar"
Cell "CustomSymbolStrType"
Cell "CustomSymbolStrField"
Cell "CustomSymbolStrFcn"
Cell "CustomSymbolStrBlkIO"
Cell "CustomSymbolStrTmpVar"
Cell "CustomSymbolStrMacro"
PropName "DisabledProps"
}
Version "1.2.0"
ForceParamTrailComments off
GenerateComments on
IgnoreCustomStorageClasses on
IncHierarchyInIds off
MaxIdLength 31
PreserveName off
PreserveNameWithParent off
ShowEliminatedStatement off
IncAutoGenComments off
SimulinkDataObjDesc off
SFDataObjDesc off
IncDataTypeInIds off
PrefixModelToSubsysFcnNames on
MangleLength 1
CustomSymbolStrGlobalVar "$R$N$M"
CustomSymbolStrType "$N$R$M"
CustomSymbolStrField "$N$M"
CustomSymbolStrFcn "$R$N$M$F"
CustomSymbolStrBlkIO "rtb_$N$M"
CustomSymbolStrTmpVar "$N$M"
CustomSymbolStrMacro "$R$N$M"
DefineNamingRule "None"
ParamNamingRule "None"
SignalNamingRule "None"
InsertBlockDesc off
SimulinkBlockComments on
EnableCustomComments off
InlinedPrmAccess "Literals"
ReqsInCode off
}
xpctarget.xpcTargetCC {
$BackupClass "Simulink.TargetCC"
$ObjectID 10
Array {
Type "Cell"
Dimension 13
Cell "IncludeMdlTerminateFcn"
Cell "CombineOutputUpdateFcns"
Cell "SuppressErrorStatus"
Cell "ERTCustomFileBanners"
Cell "GenerateSampleERTMain"
Cell "GenerateTestInterfaces"
Cell "MultiInstanceERTCode"
Cell "PurelyIntegerCode"
Cell "SupportNonFinite"
Cell "SupportComplex"
Cell "SupportAbsoluteTime"
Cell "SupportContinuousTime"
Cell "SupportNonInlinedSFcns"
PropName "DisabledProps"
}
Version "1.2.0"
TargetFcnLib "ansi_tfl_tmw.mat"
TargetLibSuffix ""
TargetPreCompLibLocation ""
GenFloatMathFcnCalls "ANSI_C"
UtilityFuncGeneration "Auto"
GenerateFullHeader on
GenerateSampleERTMain off
GenerateTestInterfaces off
IsPILTarget off
ModelReferenceCompliant on
IncludeMdlTerminateFcn on
CombineOutputUpdateFcns off
SuppressErrorStatus off
IncludeFileDelimiter "Auto"
ERTCustomFileBanners off
SupportAbsoluteTime on
LogVarNameModifier "rt_"
MatFileLogging on
MultiInstanceERTCode off
SupportNonFinite on
SupportComplex on
PurelyIntegerCode off
SupportContinuousTime on
SupportNonInlinedSFcns on
EnableShiftOperators on
ParenthesesLevel "Nominal"
RL32ModeModifier "Real-Time"
ExtMode on
ExtModeMexFile "ext_xpc"
ExtModeInterfaceLevel "Level2 - Open"
ExtModeArmWhenConnect off
RL32LogTETModifier on
RL32LogBufSizeModifier "61*10000*60"
RL32IRQSourceModifier "10"
xPCIRQSourceBoard "UEI_MFx"
xPCIOIRQSlot "-1"
xpcDblBuff off
xpcObjCom off
xPCGenerateASAP2 off
xPCGenerateXML off
RL32ObjectName "tg"
xPCisDownloadable on
xPCisDefaultEnv on
}
PropName "Components"
}
}
PropName "Components"
}
Name "Configuration"
SimulationMode "external"
CurrentDlgPage "Real-Time Workshop/xPC Target options"
}
PropName "ConfigurationSets"
}
Simulink.ConfigSet {
$PropName "ActiveConfigurationSet"
$ObjectID 1
}
BlockDefaults {
Orientation "right"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
NamePlacement "normal"
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
ShowName on
}
BlockParameterDefaults {
Block {
BlockType Concatenate
NumInputs "2"
}
Block {
BlockType Constant
}
Block {
BlockType DataTypeConversion
OutDataTypeMode "Inherit via back propagation"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
ConvertRealWorld "Real World Value (RWV)"
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Demux
Outputs "4"
DisplayOption "none"
BusSelectionMode off
}
Block {
BlockType EnablePort
StatesWhenEnabling "held"
ShowOutputPort off
ZeroCross on
}
Block {
BlockType ForIterator
ResetStates "held"
IterationSource "internal"
IterationLimit "5"
ExternalIncrement off
ShowIterationPort on
IndexMode "One-based"
IterationVariableDataType "int32"
}
Block {
BlockType Gain
Gain "1"
Multiplication "Element-wise(K.*u)"
ParameterDataTypeMode "Same as input"
ParameterDataType "sfix(16)"
ParameterScalingMode "Best Precision: Matrix-wise"
ParameterScaling "2^0"
OutDataTypeMode "Same as input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Ground
}
Block {
BlockType HitCross
HitCrossingOffset "0"
HitCrossingDirection "either"
ShowOutputPort on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Inport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
LatchByDelayingOutsideSignal off
LatchByCopyingInsideSignal off
Interpolate on
}
Block {
BlockType Logic
Operator "AND"
Inputs "2"
IconShape "rectangular"
AllPortsSameDT on
OutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
SampleTime "-1"
}
Block {
BlockType MultiPortSwitch
Inputs "4"
zeroidx off
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Mux
Inputs "4"
DisplayOption "none"
UseBusObject off
BusObject "BusObject"
NonVirtualBus off
}
Block {
BlockType Outport
Port "1"
UseBusObject off
BusObject "BusObject"
BusOutputAsStruct off
PortDimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
OutputWhenDisabled "held"
InitialOutput "[]"
}
Block {
BlockType Product
Inputs "2"
Multiplication "Element-wise(.*)"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Zero"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType RateTransition
Integrity on
Deterministic on
X0 "0"
OutPortSampleTime "-1"
}
Block {
BlockType RelationalOperator
Operator ">="
InputSameDT on
LogicOutDataTypeMode "Logical (see Configuration Parameters: Optimiza"
"tion)"
LogicDataType "uint(8)"
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Reshape
OutputDimensionality "1-D array"
OutputDimensions "[1,1]"
}
Block {
BlockType Saturate
UpperLimit "0.5"
LowerLimit "-0.5"
LinearizeAsGain on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Selector
IndexMode "One-based"
InputPortWidth "-1"
OutputPortSize "1"
}
Block {
BlockType "S-Function"
FunctionName "system"
SFunctionModules "''"
PortCounts "[]"
}
Block {
BlockType SignalSpecification
Dimensions "-1"
SampleTime "-1"
DataType "auto"
OutDataType "sfix(16)"
OutScaling "2^0"
SignalType "auto"
SamplingMode "auto"
}
Block {
BlockType SubSystem
ShowPortLabels on
Permissions "ReadWrite"
PermitHierarchicalResolution "All"
TreatAsAtomicUnit off
SystemSampleTime "-1"
RTWFcnNameOpts "Auto"
RTWFileNameOpts "Auto"
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
SimViewingDevice off
DataTypeOverride "UseLocalSettings"
MinMaxOverflowLogging "UseLocalSettings"
}
Block {
BlockType Sum
IconShape "rectangular"
Inputs "++"
InputSameDT on
OutDataTypeMode "Same as first input"
OutDataType "sfix(16)"
OutScaling "2^0"
LockScale off
RndMeth "Floor"
SaturateOnIntegerOverflow on
SampleTime "-1"
}
Block {
BlockType Switch
Criteria "u2 >= Threshold"
Threshold "0"
InputSameDT on
OutDataTypeMode "Inherit via internal rule"
RndMeth "Floor"
SaturateOnIntegerOverflow on
ZeroCross on
SampleTime "-1"
}
Block {
BlockType Terminator
}
Block {
BlockType TriggerPort
TriggerType "rising"
StatesWhenEnabling "inherit"
ShowOutputPort off
OutputDataType "auto"
SampleTimeType "triggered"
SampleTime "1"
ZeroCross on
}
Block {
BlockType UnitDelay
X0 "0"
SampleTime "1"
StateMustResolveToSignalObject off
RTWStateStorageClass "Auto"
}
Block {
BlockType WhileIterator
MaxIters "5"
WhileBlockType "while"
ResetStates "held"
ShowIterationPort off
OutputDataType "int32"
}
Block {
BlockType Width
OutputDataTypeScalingMode "Choose intrinsic data type"
DataType "double"
}
}
AnnotationDefaults {
HorizontalAlignment "center"
VerticalAlignment "middle"
ForegroundColor "black"
BackgroundColor "white"
DropShadow off
FontName "Arial"
FontSize 10
FontWeight "normal"
FontAngle "normal"
}
LineDefaults {
FontName "Arial"
FontSize 9
FontWeight "normal"
FontAngle "normal"
}
System {
Name "meart_target_60"
Location [2, 82, 1270, 914]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "a4letter"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
ReportName "simulink-default.rpt"
Block {
BlockType Logic
Name " "
Ports [3, 1]
Position [525, 49, 555, 81]
Operator "OR"
Inputs "3"
IconShape "distinctive"
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Gain
Name "+-5V 12bit"
Position [320, 566, 385, 614]
Gain "2^12/10"
ParameterDataTypeMode "Inherit via internal rule"
OutDataType "sint(16)"
RndMeth "Nearest"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Activity Monitor1"
Ports [1]
Position [1075, 721, 1155, 759]
NamePlacement "alternate"
SourceBlock "xpclib/Misc./Scope (xPC) "
SourceType "xpcscopeblock"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
scopeno "2"
scopetype "Target"
autostart on
viewmode "Graphical rolling"
formatstr "'%15.6f'"
grid on
ylimits "[0,50]"
nosamples "500"
noprepostsamples "0"
interleave "20"
triggermode "FreeRun"
triggersignal "1"
triggerlevel "0.0"
triggerslope "Either"
triggerscope "1"
triggersample "0"
filename "data.dat"
mode "Lazy"
writesize "512"
autorestart off
}
Block {
BlockType SubSystem
Name "DAQ Frame\n(8-sample)"
Ports [1, 5]
Position [75, 463, 180, 717]
BackgroundColor "lightBlue"
DropShadow on
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Offset:|Threshold (downward crossing):|Frametim"
"e (s):|Refractorytime (frames):|Channelmask (boolean):|Blank time (frames):|O"
"nset detection channels (logical):|Onset detection window size (frames)"
MaskStyleString "edit,edit,edit,edit,edit,edit,edit,edit"
MaskTunableValueString "on,on,off,off,off,off,off,off"
MaskCallbackString "|||||||"
MaskEnableString "on,on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on,on,on,on"
MaskToolTipString "on,on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,,"
MaskVariables "offset=@1;threshold=@2;frametime=@3;refractoryt"
"imesamples=@4;channelmask=@5;blanktimeframes=@6;onsetchannelmask=@7;onsetwind"
"owsize=@8;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "offset|threshold|.0005|6|channelmask|3|onsetcha"
"nnelmask|200"
MaskTabNameString ",,,,,,,"
System {
Name "DAQ Frame\n(8-sample)"
Location [2, 82, 1270, 919]
Open on
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Disable"
Position [60, 713, 90, 727]
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Burst Detection"
Ports [1, 2]
Position [1155, 432, 1285, 503]
BackgroundColor "lightBlue"
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Event refractory period (samples):|Spike ra"
"te sliding window bin size (s):|Burst detection threshold:|Burst detection re"
"fractory period (s):|Sampletime (s)"
MaskStyleString "edit,edit,edit,edit,edit"
MaskTunableValueString "off,off,off,off,off"
MaskCallbackString "||||"
MaskEnableString "on,on,on,on,on"
MaskVisibilityString "on,on,on,on,on"
MaskToolTipString "on,on,on,on,on"
MaskVarAliasString ",,,,"
MaskVariables "eventrefractorysamples=@1;windowsize=@2;bur"
"stthreshold=@3;burstrefractorytime=@4;sampletime=@5;"
MaskDisplay "plot([.1 .2 .3 .4 .5 .6 .8 .9], [.2 .2 .3 ."
"7 .8 .5 .25 .2])\nplot([.2 .4], [.3 .3])\ntext(0.1, 0.35, 'th')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "6|0.025|20|1|.0005"
MaskTabNameString ",,,,"
System {
Name "Burst Detection"
Location [104, 210, 1047, 405]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Signal In"
Position [35, 63, 65, 77]
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Burst Refractory"
Ports [1, 1]
Position [730, 82, 795, 118]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Refractory time (samples)"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "refractorysamples=@1;"
MaskDisplay "plot([.1 .2 .2 .2 .4 .4 .4 .6 .6 .6 .8 "
".8 .8 .9], [.1 .1 .9 .1 .1 .4 .1 .1 .4 .1 .1 .9 .1 .1])\nplot([.35 .45], [.4 "
".4])\nplot([.55 .65], [.4 .4])\ntext(0.35, 0.6, num2str(refractorysamples))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "round(burstrefractorytime/sampletime)"
System {
Name "Burst Refractory"
Location [124, 224, 640, 373]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Signal In"
Position [15, 98, 45, 112]
IconDisplay "Port number"
DataType "boolean"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [380, 62, 410, 93]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType SubSystem
Name "Triggered Disable"
Ports [1, 1]
Position [230, 35, 310, 75]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Hold time (samples)"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "holdtimesamples=@1;"
MaskDisplay "plot([.1 .2 .2 .2 .3], [.5 .5 .9 ."
"5 .5 ])\nplot([.3 .8 .8 .9], [.1 .1 .5 .5])\nplot([.3 .7 .65 .7 .65], [.65 .6"
"5 .70 .65 .60])\ntext(0.4, 0.35, num2str(holdtimesamples))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "refractorysamples"
System {
Name "Triggered Disable"
Location [48, 478, 841, 888]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0."
"500000]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Trigger"
Position [15, 33, 45, 47]
IconDisplay "Port number"
DataType "boolean"
}
Block {
BlockType Reference
Name " Zero"
Ports [1, 1]
Position [550, 90, 580, 120]
SourceBlock "simulink/Logic and Bit\nOperation"
"s/Compare\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
relop "=="
LogicOutDataTypeMode "boolean"
ZeroCross off
}
Block {
BlockType Reference
Name "At Zero"
Ports [1, 1]
Position [220, 235, 250, 265]
Orientation "left"
NamePlacement "alternate"
SourceBlock "simulink/Logic and Bit\nOperation"
"s/Compare\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
relop "=="
LogicOutDataTypeMode "boolean"
ZeroCross off
}
Block {
BlockType Constant
Name "Constant"
Position [265, 34, 360, 66]
Value "holdtimesamples"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Count down"
Position [130, 100, 160, 130]
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "boolean"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Logic
Name "Count down\nDisable"
Ports [2, 1]
Position [225, 142, 255, 173]
Operator "NAND"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [175, 32, 205, 63]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [315, 150, 335, 170]
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|-+"
InputSameDT off
OutDataTypeMode "uint32"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch"
Position [390, 25, 430, 185]
Criteria "u2 > Threshold"
InputSameDT off
OutDataTypeMode "Inherit via back propagation"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [390, 233, 425, 267]
Orientation "left"
NamePlacement "alternate"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Enable"
Position [630, 98, 660, 112]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [55, 0]
Branch {
DstBlock " Zero"
DstPort 1
}
Branch {
Points [0, 145]
DstBlock "Unit Delay"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-60, 0]
Branch {
DstBlock "At Zero"
DstPort 1
}
Branch {
DstBlock "Sum"
DstPort 2
}
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
Points [30, 0; 0, 55]
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "At Zero"
SrcPort 1
Points [-110, 0; 0, -85]
Branch {
Points [0, -110]
DstBlock "Logical\nOperator"
DstPort 2
}
Branch {
DstBlock "Count down\nDisable"
DstPort 2
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Count down\nDisable"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Count down"
SrcPort 1
Points [20, 0; 0, 35]
DstBlock "Count down\nDisable"
DstPort 1
}
Line {
SrcBlock "Trigger"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock " Zero"
SrcPort 1
DstBlock "Enable"
DstPort 1
}
}
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [155, 38, 190, 72]
SampleTime "-1"
}
Block {
BlockType Outport
Name "Signal Out"
Position [460, 73, 490, 87]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Signal In"
SrcPort 1
Points [70, 0]
Branch {
Points [0, -50]
DstBlock "Unit Delay"
DstPort 1
}
Branch {
Points [220, 0; 0, -20]
DstBlock "Logical\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
DstBlock "Triggered Disable"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Signal Out"
DstPort 1
}
Line {
SrcBlock "Triggered Disable"
SrcPort 1
Points [25, 0; 0, 15]
DstBlock "Logical\nOperator"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Constant"
Position [460, 115, 530, 145]
BackgroundColor "lightBlue"
Value "burstthreshold"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "double"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "-1"
FramePeriod "inf"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [255, 53, 320, 87]
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "Dilate"
Ports [1, 1]
Position [460, 54, 530, 86]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "dilation"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "dilation=@1;"
MaskDisplay "plot([.1 .2 .2 .3 .3 .4 .4 .5], [.1 .1 "
".6 .6 .9 .9 .1 .1])\nplot([.5 .8 .8 .9], [.9 .9 .1 .1])\nplot([.5 .7 .65 .7 ."
"65], [.3 .3 .35 .3 .25])\ntext(0.5, 0.6, num2str(dilation))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "round(windowsize/sampletime)"
System {
Name "Dilate"
Location [189, 230, 1006, 769]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [25, 78, 55, 92]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [3, 1]
Position [210, 40, 225, 130]
Inputs "++-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Dilate Delay"
Ports [1, 1]
Position [140, 98, 175, 132]
BackgroundColor "lightBlue"
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0.0"
samptime "-1"
NumDelays "dilation"
}
Block {
BlockType Reference
Name "Loop Delay"
Ports [1, 1]
Position [140, 38, 175, 72]
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0.0"
samptime "-1"
NumDelays "1"
}
Block {
BlockType Outport
Name "Out"
Position [310, 78, 340, 92]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In"
SrcPort 1
Points [0, 0; 50, 0]
Branch {
Points [0, 30]
DstBlock "Dilate Delay"
DstPort 1
}
Branch {
DstBlock "Add"
DstPort 2
}
}
Line {
SrcBlock "Loop Delay"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "Dilate Delay"
SrcPort 1
DstBlock "Add"
DstPort 3
}
Line {
SrcBlock "Add"
SrcPort 1
Points [0, 0; 30, 0]
Branch {
DstBlock "Out"
DstPort 1
}
Branch {
Points [0, -60; -150, 0; 0, 30]
DstBlock "Loop Delay"
DstPort 1
}
}
}
}
Block {
BlockType SubSystem
Name "Event Refractory"
Ports [1, 1]
Position [125, 53, 190, 87]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Refractory period (samples):"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "refractorysamples=@1;"
MaskDisplay "plot([.1 .3 .3 .3 .5 .5 .5 .7 .7 .7 .9]"
", [.1 .1 .9 .1 .1 .4 .1 .1 .9 .1 .1])\nplot([.4 .6], [.4 .4])\ntext(0.45, 0.6"
", num2str(refractorysamples))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "eventrefractorysamples"
System {
Name "Event Refractory"
Location [215, 293, 948, 881]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 218, 50, 232]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Integer Delay1"
Ports [1, 1]
Position [240, 88, 275, 122]
Orientation "left"
NamePlacement "alternate"
ShowName off
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0"
samptime "-1"
NumDelays "1"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [205, 202, 235, 233]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Reference
Name "Loop"
Ports [1, 1]
Position [240, 48, 275, 82]
Orientation "left"
NamePlacement "alternate"
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "1"
samptime "-1"
NumDelays "1"
}
Block {
BlockType Reference
Name "Re-Enable"
Ports [1, 1]
Position [240, 128, 275, 162]
Orientation "left"
BackgroundColor "lightBlue"
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0"
samptime "-1"
NumDelays "refractorysamples"
}
Block {
BlockType Logic
Name "addition-modulo-two"
Ports [3, 1]
Position [160, 43, 195, 167]
Orientation "left"
NamePlacement "alternate"
Operator "XOR"
Inputs "3"
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Outport
Name "Out1"
Position [410, 213, 440, 227]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Re-Enable"
SrcPort 1
DstBlock "addition-modulo-two"
DstPort 3
}
Line {
SrcBlock "Loop"
SrcPort 1
DstBlock "addition-modulo-two"
DstPort 1
}
Line {
SrcBlock "Integer Delay1"
SrcPort 1
DstBlock "addition-modulo-two"
DstPort 2
}
Line {
SrcBlock "addition-modulo-two"
SrcPort 1
Points [0, 0; -45, 0]
Branch {
Points [0, 105]
DstBlock "Logical\nOperator"
DstPort 1
}
Branch {
Points [0, -90; 215, 0; 0, 50]
DstBlock "Loop"
DstPort 1
}
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
Points [0, 0; 85, 0]
Branch {
Points [0, -75]
Branch {
DstBlock "Re-Enable"
DstPort 1
}
Branch {
Points [0, -40]
DstBlock "Integer Delay1"
DstPort 1
}
}
Branch {
DstBlock "Out1"
DstPort 1
}
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 2
}
}
}
Block {
BlockType RelationalOperator
Name "Relational\nOperator"
Position [650, 82, 680, 118]
Operator ">"
InputSameDT off
LogicOutDataTypeMode "Boolean"
ZeroCross off
}
Block {
BlockType Sum
Name "Sumate"
Ports [1, 1]
Position [375, 55, 405, 85]
Inputs "+"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Summed Activity"
Position [840, 23, 870, 37]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Burst Detected"
Position [840, 93, 870, 107]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Dilate"
SrcPort 1
Points [85, 0]
Branch {
Points [0, -40]
DstBlock "Summed Activity"
DstPort 1
}
Branch {
Points [0, 20]
DstBlock "Relational\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Relational\nOperator"
SrcPort 1
DstBlock "Burst Refractory"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [85, 0; 0, -20]
DstBlock "Relational\nOperator"
DstPort 2
}
Line {
SrcBlock "Burst Refractory"
SrcPort 1
DstBlock "Burst Detected"
DstPort 1
}
Line {
SrcBlock "Sumate"
SrcPort 1
DstBlock "Dilate"
DstPort 1
}
Line {
SrcBlock "Event Refractory"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Sumate"
DstPort 1
}
Line {
SrcBlock "Signal In"
SrcPort 1
DstBlock "Event Refractory"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "Channel Mask"
Position [530, 201, 615, 229]
BackgroundColor "lightBlue"
Value "channelmask"
VectorParams1D off
SamplingMode "Sample based"
OutDataTypeMode "double"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "frametime"
FramePeriod "inf"
}
Block {
BlockType Concatenate
Name "Concatenate\nEnable"
Ports [8, 1]
Position [675, 130, 720, 230]
NumInputs "8"
Mode "Vertical matrix concatenation"
}
Block {
BlockType Product
Name "Enable"
Ports [2, 1]
Position [880, 350, 910, 385]
Inputs "**"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "Event Detection"
Ports [2, 1]
Position [990, 352, 1085, 428]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Event Detection"
Location [204, 433, 978, 940]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [40, 183, 70, 197]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Disable"
Position [40, 73, 70, 87]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType SubSystem
Name "Detect Spike Time"
Ports [1, 1]
Position [175, 254, 275, 296]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskDisplay "plot([.1 .44 .48 .52 .56 .9], [.5 .5 .9"
" .1 .5 .5])\nplot([.4 .65], [.3 .3])\ntext(0.3, 0.35, 'th')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
System {
Name "Detect Spike Time"
Location [158, 167, 997, 445]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Signal"
Position [20, 98, 50, 112]
IconDisplay "Port number"
}
Block {
BlockType RelationalOperator
Name "Current below"
Position [425, 112, 455, 143]
Operator "<"
InputSameDT off
LogicOutDataTypeMode "Boolean"
}
Block {
BlockType ForIterator
Name "For Iterator"
Ports [0, 1]
Position [15, 15, 60, 45]
IterationLimit "8"
IterationVariableDataType "int8"
}
Block {
BlockType Ground
Name "Ground"
Position [615, 190, 635, 210]
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [545, 157, 575, 188]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType RelationalOperator
Name "Previous above"
Position [430, 202, 460, 233]
InputSameDT off
LogicOutDataTypeMode "Boolean"
}
Block {
BlockType Switch
Name "Switch"
Position [680, 139, 720, 211]
Criteria "u2 ~= 0"
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Threshold"
Position [15, 158, 100, 192]
BackgroundColor "lightBlue"
Value "threshold"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [310, 208, 345, 242]
X0 "-100"
SampleTime "-1"
}
Block {
BlockType Reference
Name "Variable\nSelector"
Ports [2, 1]
Position [135, 92, 235, 143]
NamePlacement "alternate"
SourceBlock "dspindex/Variable\nSelector"
SourceType "Variable Selector"
NumInputs "1"
rowsOrCols "Rows"
IdxMode "Variable"
Elements "[1 3]"
ZerOneIdxMode "One-based"
errmode "Generate Error"
FillMode off
FillValues "0"
ShowPortLabels off
}
Block {
BlockType Outport
Name "Out"
Position [780, 168, 810, 182]
IconDisplay "Port number"
BusOutputAsStruct off
DataType "int8"
}
Line {
SrcBlock "Threshold"
SrcPort 1
Points [275, 0]
Branch {
Points [0, 35]
DstBlock "Previous above"
DstPort 1
}
Branch {
Points [0, -40]
DstBlock "Current below"
DstPort 2
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
DstBlock "Previous above"
DstPort 2
}
Line {
SrcBlock "Current below"
SrcPort 1
Points [40, 0; 0, 35]
DstBlock "Logical\nOperator"
DstPort 1
}
Line {
SrcBlock "Previous above"
SrcPort 1
Points [35, 0; 0, -40]
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Signal"
SrcPort 1
DstBlock "Variable\nSelector"
DstPort 1
}
Line {
SrcBlock "Variable\nSelector"
SrcPort 1
Points [30, 0]
Branch {
DstBlock "Current below"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Unit Delay"
DstPort 1
}
}
Line {
SrcBlock "For Iterator"
SrcPort 1
Points [20, 0]
Branch {
Points [540, 0; 0, 120]
DstBlock "Switch"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Variable\nSelector"
DstPort 2
}
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Ground"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
}
}
Block {
BlockType SubSystem
Name "Held Disable"
Ports [2, 1]
Position [410, 69, 490, 111]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Number of samples to hold disable for:"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "disabletimesamples=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "blanktimeframes"
System {
Name "Held Disable"
Location [274, 464, 690, 682]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Disable"
Position [15, 98, 45, 112]
IconDisplay "Port number"
DataType "boolean"
}
Block {
BlockType Inport
Name "Signal"
Position [15, 168, 45, 182]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Ground
Name "Ground"
Position [20, 25, 40, 45]
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [1, 1]
Position [180, 89, 210, 121]
Operator "OR"
Inputs "1"
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Switch
Name "Switch"
Position [280, 73, 315, 137]
Criteria "u2 ~= 0"
InputSameDT off
SaturateOnIntegerOverflow off
ZeroCross off
}
Block {
BlockType Reference
Name "Tapped Delay"
Ports [1, 1]
Position [90, 87, 125, 123]
SourceBlock "simulink/Discrete/Tapped Delay"
SourceType "Tapped Delay Line"
vinit "0.0"
samptime "-1"
NumDelays "disabletimesamples"
DelayOrder "Oldest"
includeCurrent on
}
Block {
BlockType Outport
Name "Out"
Position [370, 98, 400, 112]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Disable"
SrcPort 1
DstBlock "Tapped Delay"
DstPort 1
}
Line {
SrcBlock "Ground"
SrcPort 1
Points [195, 0; 0, 50]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Signal"
SrcPort 1
Points [190, 0; 0, -50]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Tapped Delay"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 1
}
}
}
Block {
BlockType HitCross
Name "Hit \nCrossing"
Ports [1, 1]
Position [225, 175, 255, 205]
BackgroundColor "lightBlue"
HitCrossingOffset "threshold"
HitCrossingDirection "falling"
}
Block {
BlockType Reference
Name "Minimum"
Ports [1, 1]
Position [100, 170, 155, 210]
DialogController "dspfixptddg.MinMax"
DialogControllerArgs "DataTag0"
SourceBlock "dspstat3/Minimum"
SourceType "Minimum"
fcn "Value"
reset "None"
indexBase "One"
operateOver "Each column"
colComp on
operation "minimum"
additionalParams off
allowOverrides on
accumMode "Same as product output"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Same as input"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType SubSystem
Name "Refractory"
Ports [1, 1]
Position [305, 173, 370, 207]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Refractory period (samples):"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "refractoryperiod=@1;"
MaskDisplay "plot([.1 .3 .3 .3 .5 .5 .5 .7 .7 .7 .9]"
", [.1 .1 .9 .1 .1 .4 .1 .1 .9 .1 .1])\nplot([.4 .6], [.4 .4])\ntext(0.4, 0.6,"
" num2str(refractoryperiod))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "refractorytimesamples"
System {
Name "Refractory"
Location [215, 293, 687, 565]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [20, 218, 50, 232]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Integer Delay1"
Ports [1, 1]
Position [240, 88, 275, 122]
Orientation "left"
NamePlacement "alternate"
ShowName off
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0"
samptime "-1"
NumDelays "1"
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [205, 202, 235, 233]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Reference
Name "Loop"
Ports [1, 1]
Position [240, 48, 275, 82]
Orientation "left"
NamePlacement "alternate"
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "1"
samptime "-1"
NumDelays "1"
}
Block {
BlockType Reference
Name "Re-Enable"
Ports [1, 1]
Position [240, 128, 275, 162]
Orientation "left"
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0"
samptime "-1"
NumDelays "refractoryperiod"
}
Block {
BlockType Logic
Name "addition-modulo-two"
Ports [3, 1]
Position [160, 43, 195, 167]
Orientation "left"
NamePlacement "alternate"
Operator "XOR"
Inputs "3"
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Outport
Name "Out1"
Position [410, 213, 440, 227]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Logical\nOperator"
DstPort 2
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
Points [0, 0; 85, 0]
Branch {
DstBlock "Out1"
DstPort 1
}
Branch {
Points [0, -75]
Branch {
Points [0, -40]
DstBlock "Integer Delay1"
DstPort 1
}
Branch {
DstBlock "Re-Enable"
DstPort 1
}
}
}
Line {
SrcBlock "addition-modulo-two"
SrcPort 1
Points [0, 0; -45, 0]
Branch {
Points [0, -90; 215, 0; 0, 50]
DstBlock "Loop"
DstPort 1
}
Branch {
Points [0, 105]
DstBlock "Logical\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Integer Delay1"
SrcPort 1
DstBlock "addition-modulo-two"
DstPort 2
}
Line {
SrcBlock "Loop"
SrcPort 1
DstBlock "addition-modulo-two"
DstPort 1
}
Line {
SrcBlock "Re-Enable"
SrcPort 1
DstBlock "addition-modulo-two"
DstPort 3
}
}
}
Block {
BlockType Outport
Name "Out"
Position [585, 83, 615, 97]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Minimum"
SrcPort 1
DstBlock "Hit \nCrossing"
DstPort 1
}
Line {
SrcBlock "Hit \nCrossing"
SrcPort 1
DstBlock "Refractory"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
DstBlock "Minimum"
DstPort 1
}
Line {
SrcBlock "Held Disable"
SrcPort 1
DstBlock "Out"
DstPort 1
}
Line {
SrcBlock "Disable"
SrcPort 1
DstBlock "Held Disable"
DstPort 1
}
Line {
SrcBlock "Refractory"
SrcPort 1
Points [15, 0; 0, -90]
DstBlock "Held Disable"
DstPort 2
}
}
}
Block {
BlockType Concatenate
Name "Matrix\nConcatenate"
Ports [8, 1]
Position [630, 365, 675, 465]
NumInputs "8"
Mode "Vertical matrix concatenation"
}
Block {
BlockType Mux
Name "Mux"
Ports [60, 1]
Position [215, 17, 225, 643]
ShowName off
Inputs "60"
DisplayOption "bar"
}
Block {
BlockType Constant
Name "Offset Vector"
Position [485, 436, 570, 464]
BackgroundColor "lightBlue"
Value "offset"
VectorParams1D off
SamplingMode "Sample based"
OutDataTypeMode "double"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "frametime"
FramePeriod "inf"
}
Block {
BlockType SubSystem
Name "Order Detection"
Ports [1, 1]
Position [1160, 549, 1260, 591]
BackgroundColor "lightBlue"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Buffersize (frames)|Channels to consider (l"
"ogical):"
MaskStyleString "edit,edit"
MaskTunableValueString "off,off"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "buffersizeframes=@1;enablechannelmask=@2;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "onsetwindowsize|onsetchannelmask"
MaskTabNameString ","
System {
Name "Order Detection"
Location [15, 159, 1213, 767]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Data"
Position [30, 153, 60, 167]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add Intra-Frame\nTime Offset"
Ports [2, 1]
Position [565, 155, 585, 175]
NamePlacement "alternate"
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "uint32"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Constant"
Position [65, 68, 300, 92]
Value "repmat([(buffersizeframes*8):-8:8]',1,6"
"0)"
VectorParams1D off
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [100, 147, 140, 173]
OutDataTypeMode "int8"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Delay Line"
Ports [1, 1]
Position [250, 144, 310, 196]
SourceBlock "dspbuff3/Delay Line"
SourceType "Delay Line"
siz "buffersizeframes"
ic "0"
directfeed off
}
Block {
BlockType Product
Name "Divide"
Ports [2, 1]
Position [470, 147, 500, 178]
Inputs "**"
InputSameDT off
OutDataTypeMode "uint32"
OutScaling "2^-10"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Enable Channels"
Position [25, 223, 145, 247]
Value "enablechannelmask"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "int8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Reference
Name "Order Channels\nBy Onset Time"
Ports [1, 2]
Position [835, 153, 900, 202]
DialogController "dspDDGCreate"
DialogControllerArgs "DataTag1"
SourceBlock "dspstat3/Sort"
SourceType "Sort"
otype "Value and Index"
dir "Descending"
sortAlg "Insertion sort"
additionalParams off
allowOverrides on
accumMode "Same as product output"
accumWordLength "32"
accumFracLength "30"
prodOutputMode "Same as input"
prodOutputWordLength "32"
prodOutputFracLength "30"
roundingMode "Floor"
overflowMode off
LockScale off
}
Block {
BlockType Reference
Name "Peak Finder"
Ports [1, 2]
Position [660, 137, 740, 193]
DialogController "dspdialog.PeakFinder"
DialogControllerArgs "DataTag2"
SourceBlock "dspsigops/Peak Finder"
SourceType "Peak Finder"
polarity "Maxima"
outputIdx off
outputVal on
maxPeaks "1"
NoiseDistinguish off
thresh "0"
additionalParams off
allowOverrides off
roundingMode "Floor"
overflowMode off
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [190, 151, 220, 184]
InputSameDT off
OutDataTypeMode "int8"
SaturateOnIntegerOverflow off
}
Block {
BlockType Product
Name "Set Cannels With\nNo Activity To Zero"
Ports [2, 1]
Position [1015, 154, 1055, 201]
InputSameDT off
OutDataTypeMode "uint8"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Spike Ocurred\nDuring Frame?"
Ports [1, 1]
Position [380, 155, 410, 185]
SourceBlock "simulink/Logic and Bit\nOperations/Comp"
"are\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
relop ">"
LogicOutDataTypeMode "boolean"
ZeroCross off
}
Block {
BlockType Reference
Name "Spike Ocurred?"
Ports [1, 1]
Position [940, 150, 970, 180]
NamePlacement "alternate"
SourceBlock "simulink/Logic and Bit\nOperations/Comp"
"are\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
relop ">"
LogicOutDataTypeMode "uint8"
ZeroCross off
}
Block {
BlockType Terminator
Name "Terminator"
Position [790, 140, 810, 160]
NamePlacement "alternate"
}
Block {
BlockType Outport
Name "Order"
Position [1115, 173, 1145, 187]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Delay Line"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Spike Ocurred\nDuring Frame?"
DstPort 1
}
Branch {
Points [0, 60; 240, 0]
DstBlock "Add Intra-Frame\nTime Offset"
DstPort 2
}
}
Line {
SrcBlock "Order Channels\nBy Onset Time"
SrcPort 1
DstBlock "Spike Ocurred?"
DstPort 1
}
Line {
SrcBlock "Spike Ocurred?"
SrcPort 1
DstBlock "Set Cannels With\nNo Activity To Zero"
DstPort 1
}
Line {
SrcBlock "Order Channels\nBy Onset Time"
SrcPort 2
DstBlock "Set Cannels With\nNo Activity To Zero"
DstPort 2
}
Line {
SrcBlock "Peak Finder"
SrcPort 2
DstBlock "Order Channels\nBy Onset Time"
DstPort 1
}
Line {
SrcBlock "Peak Finder"
SrcPort 1
DstBlock "Terminator"
DstPort 1
}
Line {
SrcBlock "Add Intra-Frame\nTime Offset"
SrcPort 1
DstBlock "Peak Finder"
DstPort 1
}
Line {
SrcBlock "Set Cannels With\nNo Activity To Zero"
SrcPort 1
DstBlock "Order"
DstPort 1
}
Line {
SrcBlock "Spike Ocurred\nDuring Frame?"
SrcPort 1
DstBlock "Divide"
DstPort 2
}
Line {
SrcBlock "Divide"
SrcPort 1
DstBlock "Add Intra-Frame\nTime Offset"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [135, 0; 0, 75]
DstBlock "Divide"
DstPort 1
}
Line {
SrcBlock "Data"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "Delay Line"
DstPort 1
}
Line {
SrcBlock "Enable Channels"
SrcPort 1
Points [15, 0; 0, -60]
DstBlock "Product"
DstPort 2
}
}
}
Block {
BlockType Reference
Name "PD2-MF Frame 12bit series "
Ports [0, 60]
Position [15, 15, 145, 645]
SourceBlock "xpcueilib/A//D\nFrame/PD2-MF Frame 12bit se"
"ries "
SourceType "ueipd2mf12_ad_16"
boardtypein "PD2-MF-64-3M/12H"
channel "[1:60]"
gain "[1]"
mux "[1]"
range "+- 5 Volts"
sediff "Single Ended"
framesize "8"
outfmt "Vector"
clsource "Internal"
scantime "-1"
frametime "frametime"
sampletime off
slave off
freq "8/frametime*60"
burst "32"
pcislot "-1"
}
Block {
BlockType Reshape
Name "Reshape"
Position [530, 316, 615, 344]
OutputDimensionality "Customize (N-D)"
OutputDimensions "[8,60]"
}
Block {
BlockType Sum
Name "Subtract"
Ports [2, 1]
Position [765, 289, 790, 456]
Inputs "+-"
InputSameDT off
OutDataTypeMode "Inherit via back propagation"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Outport
Name "Burst Detected"
Position [1375, 478, 1405, 492]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Events"
Position [1375, 273, 1405, 287]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Voltage"
Position [1375, 148, 1405, 162]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Order"
Position [1385, 563, 1415, 577]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Summed Activity"
Position [1375, 443, 1405, 457]
Port "5"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Event Detection"
SrcPort 1
Points [25, 0]
Branch {
Points [0, 80]
Branch {
DstBlock "Burst Detection"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Order Detection"
DstPort 1
}
}
Branch {
Points [0, -110]
DstBlock "Events"
DstPort 1
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Reshape"
DstPort 1
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 60
DstBlock "Mux"
DstPort 60
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 59
DstBlock "Mux"
DstPort 59
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 58
DstBlock "Mux"
DstPort 58
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 57
DstBlock "Mux"
DstPort 57
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 56
DstBlock "Mux"
DstPort 56
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 55
DstBlock "Mux"
DstPort 55
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 54
DstBlock "Mux"
DstPort 54
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 53
DstBlock "Mux"
DstPort 53
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 52
DstBlock "Mux"
DstPort 52
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 51
DstBlock "Mux"
DstPort 51
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 50
DstBlock "Mux"
DstPort 50
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 49
DstBlock "Mux"
DstPort 49
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 48
DstBlock "Mux"
DstPort 48
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 47
DstBlock "Mux"
DstPort 47
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 46
DstBlock "Mux"
DstPort 46
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 45
DstBlock "Mux"
DstPort 45
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 44
DstBlock "Mux"
DstPort 44
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 43
DstBlock "Mux"
DstPort 43
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 42
DstBlock "Mux"
DstPort 42
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 41
DstBlock "Mux"
DstPort 41
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 40
DstBlock "Mux"
DstPort 40
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 39
DstBlock "Mux"
DstPort 39
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 38
DstBlock "Mux"
DstPort 38
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 37
DstBlock "Mux"
DstPort 37
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 36
DstBlock "Mux"
DstPort 36
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 35
DstBlock "Mux"
DstPort 35
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 34
DstBlock "Mux"
DstPort 34
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 33
DstBlock "Mux"
DstPort 33
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 32
DstBlock "Mux"
DstPort 32
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 31
DstBlock "Mux"
DstPort 31
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 30
DstBlock "Mux"
DstPort 30
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 29
DstBlock "Mux"
DstPort 29
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 28
DstBlock "Mux"
DstPort 28
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 27
DstBlock "Mux"
DstPort 27
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 26
DstBlock "Mux"
DstPort 26
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 25
DstBlock "Mux"
DstPort 25
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 24
DstBlock "Mux"
DstPort 24
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 23
DstBlock "Mux"
DstPort 23
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 22
DstBlock "Mux"
DstPort 22
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 21
DstBlock "Mux"
DstPort 21
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 20
DstBlock "Mux"
DstPort 20
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 19
DstBlock "Mux"
DstPort 19
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 18
DstBlock "Mux"
DstPort 18
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 17
DstBlock "Mux"
DstPort 17
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 16
DstBlock "Mux"
DstPort 16
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 15
DstBlock "Mux"
DstPort 15
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 14
DstBlock "Mux"
DstPort 14
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 13
DstBlock "Mux"
DstPort 13
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 12
DstBlock "Mux"
DstPort 12
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 11
DstBlock "Mux"
DstPort 11
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 10
DstBlock "Mux"
DstPort 10
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 9
DstBlock "Mux"
DstPort 9
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 8
DstBlock "Mux"
DstPort 8
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 7
DstBlock "Mux"
DstPort 7
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 6
DstBlock "Mux"
DstPort 6
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 5
DstBlock "Mux"
DstPort 5
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 3
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 4
DstBlock "Mux"
DstPort 4
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 2
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "PD2-MF Frame 12bit series "
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
DstBlock "Subtract"
DstPort 1
}
Line {
SrcBlock "Enable"
SrcPort 1
Points [30, 0]
Branch {
Points [0, -215]
DstBlock "Voltage"
DstPort 1
}
Branch {
DstBlock "Event Detection"
DstPort 1
}
}
Line {
SrcBlock "Subtract"
SrcPort 1
DstBlock "Enable"
DstPort 2
}
Line {
SrcBlock "Channel Mask"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 8
}
Branch {
Points [0, -10]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 7
}
Branch {
Points [0, -10]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 6
}
Branch {
Points [0, -10]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 5
}
Branch {
Points [0, -10]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 4
}
Branch {
Points [0, -10]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 3
}
Branch {
Points [0, -10]
Branch {
DstBlock "Concatenate\nEnable"
DstPort 2
}
Branch {
Points [0, -10]
DstBlock "Concatenate\nEnable"
DstPort 1
}
}
}
}
}
}
}
}
Line {
SrcBlock "Concatenate\nEnable"
SrcPort 1
Points [110, 0; 0, 180]
DstBlock "Enable"
DstPort 1
}
Line {
SrcBlock "Offset Vector"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 8
}
Branch {
Points [0, -10]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 7
}
Branch {
Points [0, -10]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 6
}
Branch {
Points [0, -10]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 5
}
Branch {
Points [0, -10]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 4
}
Branch {
Points [0, -10]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 3
}
Branch {
Points [0, -10]
Branch {
DstBlock "Matrix\nConcatenate"
DstPort 2
}
Branch {
Points [0, -10]
DstBlock "Matrix\nConcatenate"
DstPort 1
}
}
}
}
}
}
}
}
Line {
SrcBlock "Matrix\nConcatenate"
SrcPort 1
DstBlock "Subtract"
DstPort 2
}
Line {
SrcBlock "Order Detection"
SrcPort 1
DstBlock "Order"
DstPort 1
}
Line {
SrcBlock "Disable"
SrcPort 1
Points [850, 0; 0, -310]
DstBlock "Event Detection"
DstPort 2
}
Line {
SrcBlock "Burst Detection"
SrcPort 1
DstBlock "Summed Activity"
DstPort 1
}
Line {
SrcBlock "Burst Detection"
SrcPort 2
DstBlock "Burst Detected"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Detect\nChange"
Ports [1, 1]
Position [620, 373, 650, 407]
NamePlacement "alternate"
AncestorBlock "simulink/Logic and Bit\nOperations/Detect\nChan"
"ge"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Detect Change"
MaskDescription "If the input does not equal its previous value,"
" then output TRUE, otherwise output FALSE. The initial condition determines "
"the initial value of the previous input U/z."
MaskPromptString "Initial condition:"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "vinit=@1;"
MaskDisplay "fprintf('U ~= U/z')"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "0"
System {
Name "Detect\nChange"
Location [208, 82, 1045, 870]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "U"
Position [15, 63, 45, 77]
IconDisplay "Port number"
}
Block {
BlockType UnitDelay
Name "Delay Input1"
Description "\nStore in Global RAM"
Position [105, 49, 135, 91]
ShowName off
X0 "vinit"
SampleTime "-1"
Port {
PortNumber 1
Name "U(k-1)"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType RelationalOperator
Name "FixPt\nRelational\nOperator"
Position [215, 23, 250, 87]
Operator "~="
InputSameDT off
LogicOutDataTypeMode "Boolean"
ZeroCross off
}
Block {
BlockType Outport
Name "Y"
Position [385, 48, 415, 62]
IconDisplay "Port number"
BusOutputAsStruct off
InitialOutput "0"
}
Line {
SrcBlock "FixPt\nRelational\nOperator"
SrcPort 1
DstBlock "Y"
DstPort 1
}
Line {
Name "U(k-1)"
FontSize 10
Labels [0, 0; 0, 0; 0, 0]
SrcBlock "Delay Input1"
SrcPort 1
DstBlock "FixPt\nRelational\nOperator"
DstPort 2
}
Line {
SrcBlock "U"
SrcPort 1
Points [0, 0]
Branch {
Labels [1, 0]
Points [0, -30]
DstBlock "FixPt\nRelational\nOperator"
DstPort 1
}
Branch {
DstBlock "Delay Input1"
DstPort 1
}
}
Annotation {
Name "Edge"
Position [278, 65]
UseDisplayTextAsClickCallback off
}
Annotation {
Name "U(k)"
Position [60, 79]
UseDisplayTextAsClickCallback off
}
}
}
Block {
BlockType Reference
Name "Model\nTimestep"
Ports [0, 1]
Position [15, 71, 55, 109]
SourceBlock "simulink/Sources/Counter\nFree-Running"
SourceType "Counter Free-Running"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
NumBits "32"
tsamp "-1"
}
Block {
BlockType Mux
Name "Mux"
Ports [1, 1]
Position [935, 469, 940, 511]
ShowName off
Inputs "1"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [5, 1]
Position [870, 314, 875, 666]
ShowName off
Inputs "5"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Network Transmit "
Ports [7, 5]
Position [675, 312, 830, 668]
DropShadow on
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Network Transmit "
Location [102, 92, 1244, 946]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Sync 1 (Stim) "
Position [25, 188, 55, 202]
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Sync 2 (Sync)"
Position [25, 228, 55, 242]
Port "2"
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Sync 3 (BC)"
Position [25, 268, 55, 282]
Port "3"
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Sync 4 (Burst)"
Position [25, 308, 55, 322]
Port "4"
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Events"
Position [25, 348, 55, 362]
Port "5"
IconDisplay "Port number"
PortDimensions "60"
DataType "boolean"
}
Block {
BlockType Inport
Name "Voltage"
Position [25, 408, 55, 422]
Port "6"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Latency DT"
Position [25, 473, 55, 487]
Port "7"
IconDisplay "Port number"
PortDimensions "60"
DataType "uint8"
}
Block {
BlockType SubSystem
Name "Burst Counter"
Ports [1, 1]
Position [625, 724, 695, 756]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Starting value"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "startvalue=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Burst Counter"
Location [588, 254, 1032, 431]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Event"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [160, 30, 180, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "double"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [215, 108, 250, 142]
Orientation "left"
NamePlacement "alternate"
X0 "startvalue"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Count"
Position [375, 33, 405, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Event"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [100, 0]
Branch {
DstBlock "Count"
DstPort 1
}
Branch {
Points [0, 85]
DstBlock "Unit Delay"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-40, 0]
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType Product
Name "Divide"
Ports [2, 1]
Position [805, 662, 835, 693]
Inputs "*/"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "Event Counter"
Ports [1, 1]
Position [625, 595, 695, 625]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Starting value"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "startvalue=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Event Counter"
Location [588, 254, 1034, 431]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Event"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [155, 30, 175, 50]
ShowName off
IconShape "round"
Inputs "|++"
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [210, 108, 245, 142]
Orientation "left"
NamePlacement "alternate"
X0 "startvalue"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Count"
Position [370, 33, 400, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-40, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [100, 0]
Branch {
Points [0, 85]
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Count"
DstPort 1
}
}
Line {
SrcBlock "Event"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Event Encoder"
Ports [5, 1]
Position [435, 172, 495, 378]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Event Encoder"
Location [228, 422, 993, 687]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Sync 1"
Position [40, 73, 70, 87]
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Sync 2"
Position [40, 108, 70, 122]
Port "2"
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Sync 3"
Position [40, 143, 70, 157]
Port "3"
IconDisplay "Port number"
PortDimensions "1"
}
Block {
BlockType Inport
Name "Sync 4"
Position [40, 178, 70, 192]
Port "4"
IconDisplay "Port number"
PortDimensions "1"
DataType "boolean"
}
Block {
BlockType Inport
Name "Events"
Position [40, 38, 70, 52]
Port "5"
IconDisplay "Port number"
PortDimensions "[1 60]"
DataType "boolean"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [375, 99, 425, 131]
OutDataTypeMode "uint32"
RndMeth "Simplest"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "Encode Matrix"
Position [355, 164, 445, 196]
Value "[1 0; 2 0; 2^2 0; 2^3 0; 2^4 0; 2^5 0; "
"2^6 0; 2^7 0; 2^8 0; 2^9 0; 2^10 0; 2^11 0; 2^12 0; 2^13 0; 2^14 0; 2^15 0; 2"
"^16 0; 2^17 0; 2^18 0; 2^19 0; 2^20 0; 2^21 0; 2^22 0; 2^23 0; 2^24 0; 2^25 0"
"; 2^26 0; 2^27 0; 2^28 0; 2^29 0; 2^30 0; 2^31 0; 0 1; 0 2; 0 2^2; 0 2^3; 0 2"
"^4; 0 2^5; 0 2^6; 0 2^7; 0 2^8; 0 2^9; 0 2^10; 0 2^11; 0 2^12; 0 2^13; 0 2^14"
"; 0 2^15; 0 2^16; 0 2^17; 0 2^18; 0 2^19; 0 2^20; 0 2^21; 0 2^22; 0 2^23; 0 2"
"^24; 0 2^25; 0 2^26; 0 2^27; 0 2^28; 0 2^29; 0 2^30; 0 2^31]"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Concatenate
Name "Matrix\nConcatenation"
Ports [5, 1]
Position [225, 25, 295, 205]
NumInputs "5"
Mode "Vector concatenation"
}
Block {
BlockType Product
Name "Product"
Ports [2, 1]
Position [500, 81, 550, 214]
Multiplication "Matrix(*)"
OutDataTypeMode "uint32"
RndMeth "Simplest"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reshape
Name "Reshape"
Position [125, 34, 165, 56]
OutputDimensionality "Row vector (2-D)"
}
Block {
BlockType Outport
Name "[1x2]"
Position [615, 143, 645, 157]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Encode Matrix"
SrcPort 1
DstBlock "Product"
DstPort 2
}
Line {
Labels [0, 0]
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Product"
DstPort 1
}
Line {
SrcBlock "Product"
SrcPort 1
DstBlock "[1x2]"
DstPort 1
}
Line {
SrcBlock "Reshape"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 1
}
Line {
SrcBlock "Events"
SrcPort 1
DstBlock "Reshape"
DstPort 1
}
Line {
SrcBlock "Sync 1"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 2
}
Line {
SrcBlock "Sync 2"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 3
}
Line {
SrcBlock "Sync 3"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 4
}
Line {
SrcBlock "Sync 4"
SrcPort 1
DstBlock "Matrix\nConcatenation"
DstPort 5
}
Line {
SrcBlock "Matrix\nConcatenation"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
}
}
Block {
BlockType Logic
Name "Logical\nOperator"
Ports [2, 1]
Position [190, 77, 220, 108]
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Reference
Name "Model\nTimestep"
Ports [0, 1]
Position [565, 526, 605, 564]
SourceBlock "simulink/Sources/Counter\nFree-Running"
SourceType "Counter Free-Running"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
NumBits "32"
tsamp "-1"
}
Block {
BlockType Reference
Name "Pack"
Ports [4, 1]
Position [655, 320, 700, 575]
SourceBlock "xpclib/UDP/Pack"
SourceType "xpcany2byte"
datatypes "{'uint32', 'int8', 'uint8', 'uint32'}"
byteAlign "1"
}
Block {
BlockType Reshape
Name "Reshape\nEvents"
Position [565, 329, 605, 371]
NamePlacement "alternate"
}
Block {
BlockType Reshape
Name "Reshape\nVoltage"
Position [565, 395, 605, 435]
}
Block {
BlockType SubSystem
Name "Stim Counter"
Ports [1, 1]
Position [625, 79, 695, 111]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Starting value"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "startvalue=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Stim Counter"
Location [588, 254, 1025, 431]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Event"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [145, 30, 165, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "double"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [200, 108, 235, 142]
Orientation "left"
NamePlacement "alternate"
X0 "startvalue"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Count"
Position [360, 33, 390, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-40, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [100, 0]
Branch {
Points [0, 85]
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Count"
DstPort 1
}
}
Line {
SrcBlock "Event"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Sum
Name "Sum"
Ports [1, 1]
Position [470, 594, 500, 626]
Inputs "+"
InputSameDT off
OutDataTypeMode "double"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType SubSystem
Name "UDP Buffered Packet Send"
Ports [1, 1]
Position [745, 426, 870, 474]
DropShadow on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "UDP Buffered Packet Send"
Location [118, 197, 1127, 784]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Packet Data"
Position [255, 278, 285, 292]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "Acknowledge"
Ports [0, 2]
Position [245, 79, 320, 126]
SourceBlock "xpclib/UDP/Receive"
SourceType "xpcudpbytereceive"
ipAddress "192.168.0.1"
ipPort "25001"
width "4"
sampletime "-1"
}
Block {
BlockType SubSystem
Name "Data Packet\nTransmission"
Ports [2, 0, 1]
Position [760, 249, 860, 291]
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Data Packet\nTransmission"
Location [276, 667, 738, 848]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Sync"
Position [65, 93, 95, 107]
NamePlacement "alternate"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Data"
Position [65, 118, 95, 132]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType EnablePort
Name "Enable"
Ports []
Position [235, 20, 255, 40]
}
Block {
BlockType Reference
Name "Pack"
Ports [2, 1]
Position [175, 87, 255, 138]
ShowName off
SourceBlock "xpclib/UDP/Pack"
SourceType "xpcany2byte"
datatypes "{'uint32','uint8'}"
byteAlign "1"
}
Block {
BlockType Reference
Name "UDP Send"
Ports [1]
Position [300, 90, 380, 140]
SourceBlock "xpclib/UDP/Send"
SourceType "xpcudpbytesend"
ipAddress "192.168.0.1"
ipPort "25000"
localPort "-1"
sampletime "-1"
}
Line {
SrcBlock "Data"
SrcPort 1
DstBlock "Pack"
DstPort 2
}
Line {
SrcBlock "Sync"
SrcPort 1
DstBlock "Pack"
DstPort 1
}
Line {
SrcBlock "Pack"
SrcPort 1
DstBlock "UDP Send"
DstPort 1
}
}
}
Block {
BlockType "S-Function"
Name "Data packet fifo"
Ports [2, 3]
Position [470, 272, 565, 328]
FunctionName "xpcregstack"
Parameters "psize,bsize"
MaskPromptString "Packet Size|Packet Buffers"
MaskStyleString "edit,edit"
MaskTunableValueString "off,off"
MaskCallbackString "|"
MaskEnableString "on,on"
MaskVisibilityString "on,on"
MaskToolTipString "on,on"
MaskVarAliasString ","
MaskVariables "psize=@1;bsize=@2;"
MaskDisplay "port_label('output',1,'q')\nport_label("
"'output',2,'valid')\nport_label('output',3,'drop')\nport_label('input',1,'d')"
"\nport_label('input',2,'ack')"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "10|1000"
MaskTabNameString ","
}
Block {
BlockType SubSystem
Name "Transmit Logic"
Ports [4, 3]
Position [505, 91, 630, 184]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskType "Stateflow"
MaskDescription "Embedded MATLAB block"
MaskDisplay "disp('fcn');"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "none"
MaskIconUnits "autoscale"
System {
Name "Transmit Logic"
Location [257, 457, 812, 717]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "rcv_sync"
Position [20, 101, 40, 119]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "rcv_valid"
Position [20, 136, 40, 154]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "packsize"
Position [20, 171, 40, 189]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "dv"
Position [20, 206, 40, 224]
Port "4"
IconDisplay "Port number"
}
Block {
BlockType Demux
Name " Demux "
Ports [1, 1]
Position [270, 210, 320, 250]
Outputs "1"
}
Block {
BlockType "S-Function"
Name " SFunction "
Tag "Stateflow S-Function meart_target_6"
"0 2"
Ports [4, 4]
Position [180, 102, 230, 203]
FunctionName "sf_sfun"
PortCounts "[4 4]"
Port {
PortNumber 2
Name "send_packet"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 3
Name "send_sync"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
Port {
PortNumber 4
Name "ack"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
}
Block {
BlockType Terminator
Name " Terminator "
Position [460, 221, 480, 239]
}
Block {
BlockType Outport
Name "send_packet"
Position [460, 101, 480, 119]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "send_sync"
Position [460, 136, 480, 154]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "ack"
Position [460, 171, 480, 189]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
Name "ack"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 4
DstBlock "ack"
DstPort 1
}
Line {
Name "send_sync"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 3
DstBlock "send_sync"
DstPort 1
}
Line {
Name "send_packet"
Labels [0, 0]
SrcBlock " SFunction "
SrcPort 2
DstBlock "send_packet"
DstPort 1
}
Line {
SrcBlock "dv"
SrcPort 1
DstBlock " SFunction "
DstPort 4
}
Line {
SrcBlock "packsize"
SrcPort 1
DstBlock " SFunction "
DstPort 3
}
Line {
SrcBlock "rcv_valid"
SrcPort 1
Points [120, 0]
DstBlock " SFunction "
DstPort 2
}
Line {
SrcBlock "rcv_sync"
SrcPort 1
DstBlock " SFunction "
DstPort 1
}
Line {
SrcBlock " Demux "
SrcPort 1
DstBlock " Terminator "
DstPort 1
}
Line {
SrcBlock " SFunction "
SrcPort 1
Points [0, 115]
DstBlock " Demux "
DstPort 1
}
}
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [635, 179, 660, 211]
Orientation "left"
ShowName off
SampleTime "-1"
}
Block {
BlockType Reference
Name "Unpack"
Ports [1, 1]
Position [375, 79, 455, 101]
ShowName off
SourceBlock "xpclib/UDP/Unpack"
SourceType "xpcbyte2any"
dimensions "{[1]}"
datatypes "{'uint32'}"
byteAlign "1"
}
Block {
BlockType Width
Name "Width1"
Position [364, 175, 396, 210]
Orientation "up"
ShowName off
}
Block {
BlockType Outport
Name "Dropped Count"
Position [795, 378, 825, 392]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Acknowledge"
SrcPort 1
DstBlock "Unpack"
DstPort 1
}
Line {
SrcBlock "Unpack"
SrcPort 1
Points [30, 0]
DstBlock "Transmit Logic"
DstPort 1
}
Line {
SrcBlock "Acknowledge"
SrcPort 2
Points [165, 0]
DstBlock "Transmit Logic"
DstPort 2
}
Line {
SrcBlock "Data packet fifo"
SrcPort 1
Points [60, 0]
Branch {
Points [0, -35; -250, 0]
DstBlock "Width1"
DstPort 1
}
Branch {
DstBlock "Data Packet\nTransmission"
DstPort 2
}
}
Line {
SrcBlock "Data packet fifo"
SrcPort 2
Points [75, 0; 0, -75; -175, 0; 0, -50]
DstBlock "Transmit Logic"
DstPort 4
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-200, 0; 0, 120]
DstBlock "Data packet fifo"
DstPort 2
}
Line {
SrcBlock "Data packet fifo"
SrcPort 3
Points [75, 0; 0, 65]
DstBlock "Dropped Count"
DstPort 1
}
Line {
SrcBlock "Width1"
SrcPort 1
Points [0, -20]
DstBlock "Transmit Logic"
DstPort 3
}
Line {
SrcBlock "Transmit Logic"
SrcPort 3
Points [70, 0; 0, 25]
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Transmit Logic"
SrcPort 2
Points [105, 0; 0, 120]
DstBlock "Data Packet\nTransmission"
DstPort 1
}
Line {
SrcBlock "Transmit Logic"
SrcPort 1
Points [175, 0]
DstBlock "Data Packet\nTransmission"
DstPort enable
}
Line {
SrcBlock "Packet Data"
SrcPort 1
DstBlock "Data packet fifo"
DstPort 1
}
}
}
Block {
BlockType Outport
Name "Stim Count"
Position [945, 88, 975, 102]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Event Count"
Position [945, 603, 975, 617]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Burst Count"
Position [945, 733, 975, 747]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "AP per Burst"
Position [945, 673, 975, 687]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Dropped Packets"
Position [945, 443, 975, 457]
Port "5"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Pack"
SrcPort 1
DstBlock "UDP Buffered Packet Send"
DstPort 1
}
Line {
SrcBlock "Reshape\nVoltage"
SrcPort 1
DstBlock "Pack"
DstPort 2
}
Line {
SrcBlock "UDP Buffered Packet Send"
SrcPort 1
DstBlock "Dropped Packets"
DstPort 1
}
Line {
SrcBlock "Voltage"
SrcPort 1
DstBlock "Reshape\nVoltage"
DstPort 1
}
Line {
SrcBlock "Sync 1 (Stim) "
SrcPort 1
Points [75, 0]
Branch {
DstBlock "Event Encoder"
DstPort 1
}
Branch {
Points [0, -110]
DstBlock "Logical\nOperator"
DstPort 1
}
}
Line {
SrcBlock "Sync 4 (Burst)"
SrcPort 1
Points [90, 0]
Branch {
Points [0, 425]
DstBlock "Burst Counter"
DstPort 1
}
Branch {
DstBlock "Event Encoder"
DstPort 4
}
}
Line {
SrcBlock "Sync 3 (BC)"
SrcPort 1
DstBlock "Event Encoder"
DstPort 3
}
Line {
SrcBlock "Sync 2 (Sync)"
SrcPort 1
Points [90, 0]
Branch {
DstBlock "Event Encoder"
DstPort 2
}
Branch {
Points [0, -135]
DstBlock "Logical\nOperator"
DstPort 2
}
}
Line {
SrcBlock "Logical\nOperator"
SrcPort 1
DstBlock "Stim Counter"
DstPort 1
}
Line {
SrcBlock "Event Encoder"
SrcPort 1
Points [30, 0; 0, 75]
DstBlock "Reshape\nEvents"
DstPort 1
}
Line {
SrcBlock "Reshape\nEvents"
SrcPort 1
DstBlock "Pack"
DstPort 1
}
Line {
SrcBlock "Stim Counter"
SrcPort 1
DstBlock "Stim Count"
DstPort 1
}
Line {
SrcBlock "Burst Counter"
SrcPort 1
Points [75, 0]
Branch {
DstBlock "Burst Count"
DstPort 1
}
Branch {
Points [0, -55]
DstBlock "Divide"
DstPort 2
}
}
Line {
SrcBlock "Event Counter"
SrcPort 1
Points [75, 0]
Branch {
DstBlock "Event Count"
DstPort 1
}
Branch {
Points [0, 60]
DstBlock "Divide"
DstPort 1
}
}
Line {
SrcBlock "Events"
SrcPort 1
Points [330, 0]
Branch {
DstBlock "Event Encoder"
DstPort 5
}
Branch {
Points [0, 255]
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "Event Counter"
DstPort 1
}
Line {
SrcBlock "Divide"
SrcPort 1
DstBlock "AP per Burst"
DstPort 1
}
Line {
SrcBlock "Model\nTimestep"
SrcPort 1
DstBlock "Pack"
DstPort 4
}
Line {
SrcBlock "Latency DT"
SrcPort 1
DstBlock "Pack"
DstPort 3
}
}
}
Block {
BlockType DataTypeConversion
Name "Saturate at 8bit"
Position [490, 568, 540, 612]
OutDataTypeMode "int8"
RndMeth "Nearest"
}
Block {
BlockType SubSystem
Name "Send Serial Command"
Ports [5, 1]
Position [705, 160, 860, 280]
DropShadow on
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Send Serial Command"
Location [117, 182, 1134, 899]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "A"
Position [105, 58, 135, 72]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "B"
Position [105, 103, 135, 117]
Port "2"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Enable Command BC"
Position [110, 183, 140, 197]
Port "3"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Stimulus Intensitiy"
Position [100, 433, 130, 447]
Port "4"
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Robot Command"
Position [100, 338, 130, 352]
Port "5"
IconDisplay "Port number"
}
Block {
BlockType DataTypeConversion
Name "Convert to uint8"
Position [310, 72, 370, 108]
ShowName off
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Constant
Name "D 1 8"
Position [310, 34, 370, 66]
NamePlacement "alternate"
Value "[uint8('D') uint8('1') uint8('8')]"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType SubSystem
Name "Encoder"
Ports [2, 1]
Position [210, 40, 275, 135]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Encoder"
Location [337, 103, 1042, 891]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "64"
Block {
BlockType Inport
Name "A"
Position [90, 268, 120, 282]
IconDisplay "Port number"
PortDimensions "60"
}
Block {
BlockType Inport
Name "B"
Position [90, 943, 120, 957]
Port "2"
IconDisplay "Port number"
PortDimensions "60"
}
Block {
BlockType Reference
Name "12 to 5"
Ports [2, 6]
Position [505, 995, 645, 1115]
SourceBlock "meaworklibrary/Serial Encoder Block"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Constant
Name "12DATA_L"
Position [680, 590, 710, 610]
NamePlacement "alternate"
Value "48"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "13DATA_H"
Position [680, 615, 710, 635]
Value "48"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Reference
Name "20 to 13"
Ports [2, 6]
Position [505, 855, 645, 975]
SourceBlock "meaworklibrary/Serial Encoder Block"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "28 to 21"
Ports [2, 6]
Position [505, 715, 645, 835]
SourceBlock "meaworklibrary/Serial Encoder Block"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType SubSystem
Name "32 to 29"
Ports [2, 4]
Position [505, 546, 645, 674]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "32 to 29"
Location [407, 260, 1104, 708]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "A"
Position [25, 133, 55, 147]
IconDisplay "Port number"
PortDimensions "4"
}
Block {
BlockType Inport
Name "B"
Position [25, 293, 55, 307]
Port "2"
IconDisplay "Port number"
PortDimensions "4"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 4]
Position [125, 269, 130, 326]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 4]
Position [125, 109, 130, 166]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType Logic
Name "Hq4"
Ports [2, 1]
Position [226, 70, 259, 90]
Orientation "up"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Hq5"
Ports [2, 1]
Position [166, 55, 199, 75]
Orientation "up"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Constant
Name "Hq6"
Position [108, 40, 142, 60]
Orientation "up"
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Hq7"
Position [48, 25, 82, 45]
Orientation "up"
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Lq0"
Position [28, 390, 62, 410]
Orientation "down"
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Lq1"
Position [83, 375, 117, 395]
Orientation "down"
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Logic
Name "Lq2"
Ports [2, 1]
Position [141, 360, 174, 380]
Orientation "down"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Lq3"
Ports [2, 1]
Position [201, 345, 234, 365]
Orientation "down"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Mux
Name "Mux"
Ports [4, 1]
Position [480, 364, 485, 421]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1]
Position [480, 274, 485, 331]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux4"
Ports [4, 1]
Position [480, 104, 485, 161]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux5"
Ports [4, 1]
Position [480, 14, 485, 71]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Reference
Name "encode 11DATA_H"
Ports [1, 1]
Position [515, 26, 585, 64]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 12DATA_H"
Ports [1, 1]
Position [515, 116, 585, 154]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 13DATA_L"
Ports [1, 1]
Position [515, 286, 585, 324]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 14DATA_L"
Ports [1, 1]
Position [515, 376, 585, 414]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Outport
Name "11DATA_H"
Position [610, 38, 640, 52]
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "12DATA_H"
Position [610, 128, 640, 142]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "13DATA_L"
Position [610, 298, 640, 312]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "14DATA_L"
Position [610, 388, 640, 402]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Line {
SrcBlock "B"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "A"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Mux4"
SrcPort 1
DstBlock "encode 12DATA_H"
DstPort 1
}
Line {
SrcBlock "encode 12DATA_H"
SrcPort 1
DstBlock "12DATA_H"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "encode 13DATA_L"
DstPort 1
}
Line {
SrcBlock "encode 13DATA_L"
SrcPort 1
DstBlock "13DATA_L"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 1
Points [40, 0]
Branch {
Points [150, 0; 0, 25]
DstBlock "Mux4"
DstPort 3
}
Branch {
DstBlock "Hq5"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [55, 0]
Branch {
Points [190, 0; 0, -150]
DstBlock "Mux4"
DstPort 2
}
Branch {
DstBlock "Hq5"
DstPort 2
}
}
Line {
SrcBlock "Demux1"
SrcPort 2
Points [100, 0]
Branch {
Points [80, 0; 0, 25]
DstBlock "Mux4"
DstPort 4
}
Branch {
DstBlock "Hq4"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [115, 0]
Branch {
Points [115, 0; 0, -180]
DstBlock "Mux4"
DstPort 1
}
Branch {
DstBlock "Hq4"
DstPort 2
}
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [75, 0]
Branch {
Points [90, 0; 0, 165]
DstBlock "Mux1"
DstPort 3
}
Branch {
DstBlock "Lq3"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [90, 0]
Branch {
Points [180, 0; 0, -10]
DstBlock "Mux1"
DstPort 2
}
Branch {
DstBlock "Lq3"
DstPort 2
}
}
Line {
SrcBlock "Demux1"
SrcPort 4
Points [15, 0]
Branch {
Points [135, 0; 0, 165]
DstBlock "Mux1"
DstPort 4
}
Branch {
DstBlock "Lq2"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [30, 0]
Branch {
Points [230, 0; 0, -40]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Lq2"
DstPort 2
}
}
Line {
SrcBlock "Mux5"
SrcPort 1
DstBlock "encode 11DATA_H"
DstPort 1
}
Line {
SrcBlock "encode 11DATA_H"
SrcPort 1
DstBlock "11DATA_H"
DstPort 1
}
Line {
SrcBlock "Hq5"
SrcPort 1
DstBlock "Mux5"
DstPort 3
}
Line {
SrcBlock "Hq4"
SrcPort 1
DstBlock "Mux5"
DstPort 4
}
Line {
SrcBlock "Hq6"
SrcPort 1
DstBlock "Mux5"
DstPort 2
}
Line {
SrcBlock "Hq7"
SrcPort 1
DstBlock "Mux5"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "encode 14DATA_L"
DstPort 1
}
Line {
SrcBlock "encode 14DATA_L"
SrcPort 1
DstBlock "14DATA_L"
DstPort 1
}
Line {
SrcBlock "Lq3"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Lq2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Lq1"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Lq0"
SrcPort 1
DstBlock "Mux"
DstPort 4
}
}
}
Block {
BlockType SubSystem
Name "4 to 1"
Ports [2, 3]
Position [505, 1135, 645, 1215]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "4 to 1"
Location [354, 167, 1189, 676]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "A"
Position [25, 133, 55, 147]
IconDisplay "Port number"
PortDimensions "4"
}
Block {
BlockType Inport
Name "B"
Position [25, 203, 55, 217]
Port "2"
IconDisplay "Port number"
PortDimensions "4"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 4]
Position [125, 179, 130, 236]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 4]
Position [125, 109, 130, 166]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType Logic
Name "Hq4"
Ports [2, 1]
Position [341, 70, 374, 90]
Orientation "up"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Hq5"
Ports [2, 1]
Position [281, 55, 314, 75]
Orientation "up"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Hq6"
Ports [2, 1]
Position [221, 40, 254, 60]
Orientation "up"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Hq7"
Ports [2, 1]
Position [161, 25, 194, 45]
Orientation "up"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1]
Position [600, 184, 605, 241]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux4"
Ports [4, 1]
Position [600, 104, 605, 161]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux5"
Ports [4, 1]
Position [600, 14, 605, 71]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Reference
Name "encode 23DATA_H"
Ports [1, 1]
Position [635, 26, 705, 64]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 24DATA_H"
Ports [1, 1]
Position [635, 116, 705, 154]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 24DATA_L"
Ports [1, 1]
Position [635, 196, 705, 234]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Outport
Name "23DATA_H"
Position [730, 38, 760, 52]
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "24DATA_H"
Position [730, 128, 760, 142]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "24DATA_L"
Position [730, 208, 760, 222]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Line {
SrcBlock "B"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "A"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Mux4"
SrcPort 1
DstBlock "encode 24DATA_H"
DstPort 1
}
Line {
SrcBlock "encode 24DATA_H"
SrcPort 1
DstBlock "24DATA_H"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "encode 24DATA_L"
DstPort 1
}
Line {
SrcBlock "encode 24DATA_L"
SrcPort 1
DstBlock "24DATA_L"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 1
Points [170, 0]
Branch {
Points [140, 0; 0, 25]
DstBlock "Mux4"
DstPort 3
}
Branch {
DstBlock "Hq5"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [155, 0]
Branch {
Points [210, 0; 0, -60]
DstBlock "Mux4"
DstPort 2
}
Branch {
DstBlock "Hq5"
DstPort 1
}
}
Line {
SrcBlock "Demux1"
SrcPort 2
Points [230, 0]
Branch {
Points [70, 0; 0, 25]
DstBlock "Mux4"
DstPort 4
}
Branch {
DstBlock "Hq4"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [215, 0]
Branch {
Points [135, 0; 0, -90]
DstBlock "Mux4"
DstPort 1
}
Branch {
DstBlock "Hq4"
DstPort 1
}
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [50, 0]
Branch {
Points [235, 0; 0, 75]
DstBlock "Mux1"
DstPort 3
}
Branch {
DstBlock "Hq7"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [35, 0]
Branch {
Points [355, 0; 0, -10]
DstBlock "Mux1"
DstPort 2
}
Branch {
DstBlock "Hq7"
DstPort 1
}
}
Line {
SrcBlock "Demux1"
SrcPort 4
Points [110, 0]
Branch {
Points [160, 0; 0, 75]
DstBlock "Mux1"
DstPort 4
}
Branch {
DstBlock "Hq6"
DstPort 2
}
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [95, 0]
Branch {
Points [285, 0; 0, -40]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Hq6"
DstPort 1
}
}
Line {
SrcBlock "Mux5"
SrcPort 1
DstBlock "encode 23DATA_H"
DstPort 1
}
Line {
SrcBlock "encode 23DATA_H"
SrcPort 1
DstBlock "23DATA_H"
DstPort 1
}
Line {
SrcBlock "Hq5"
SrcPort 1
DstBlock "Mux5"
DstPort 3
}
Line {
SrcBlock "Hq4"
SrcPort 1
DstBlock "Mux5"
DstPort 4
}
Line {
SrcBlock "Hq6"
SrcPort 1
DstBlock "Mux5"
DstPort 2
}
Line {
SrcBlock "Hq7"
SrcPort 1
DstBlock "Mux5"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "40 to 33"
Ports [2, 6]
Position [505, 385, 645, 505]
SourceBlock "meaworklibrary/Serial Encoder Block"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "48 to 41"
Ports [2, 6]
Position [505, 245, 645, 365]
SourceBlock "meaworklibrary/Serial Encoder Block"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "56 to 49"
Ports [2, 6]
Position [505, 105, 645, 225]
SourceBlock "meaworklibrary/Serial Encoder Block"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType SubSystem
Name "60 to 57"
Ports [2, 3]
Position [505, 12, 645, 88]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "60 to 57"
Location [335, 205, 1128, 494]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins "[0.500000, 0.500000, 0.500000, 0.5000"
"00]"
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "A"
Position [25, 53, 55, 67]
IconDisplay "Port number"
PortDimensions "4"
}
Block {
BlockType Inport
Name "B"
Position [25, 128, 55, 142]
Port "2"
IconDisplay "Port number"
PortDimensions "4"
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 4]
Position [125, 104, 130, 161]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 4]
Position [125, 29, 130, 86]
BackgroundColor "black"
ShowName off
DisplayOption "bar"
}
Block {
BlockType Logic
Name "Lq0"
Ports [2, 1]
Position [151, 225, 184, 245]
Orientation "down"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Lq1"
Ports [2, 1]
Position [206, 210, 239, 230]
Orientation "down"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Lq2"
Ports [2, 1]
Position [261, 195, 294, 215]
Orientation "down"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Logic
Name "Lq3"
Ports [2, 1]
Position [321, 180, 354, 200]
Orientation "down"
Operator "OR"
AllPortsSameDT off
OutDataTypeMode "Specify via dialog"
}
Block {
BlockType Mux
Name "Mux"
Ports [4, 1]
Position [600, 199, 605, 256]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [4, 1]
Position [600, 109, 605, 166]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux4"
Ports [4, 1]
Position [600, 24, 605, 81]
ShowName off
DisplayOption "bar"
}
Block {
BlockType Reference
Name "encode 1DATA_H"
Ports [1, 1]
Position [635, 36, 705, 74]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 1DATA_L"
Ports [1, 1]
Position [635, 121, 705, 159]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Reference
Name "encode 2DATA_L"
Ports [1, 1]
Position [635, 211, 705, 249]
SourceBlock "meaworklibrary/Nibble Encoder"
SourceType ""
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
}
Block {
BlockType Outport
Name "1DATA_H"
Position [730, 48, 760, 62]
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "1DATA_L"
Position [730, 133, 760, 147]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Block {
BlockType Outport
Name "2DATA_L"
Position [730, 223, 760, 237]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
DataType "uint8"
}
Line {
SrcBlock "B"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "A"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Mux4"
SrcPort 1
DstBlock "encode 1DATA_H"
DstPort 1
}
Line {
SrcBlock "encode 1DATA_H"
SrcPort 1
DstBlock "1DATA_H"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "encode 1DATA_L"
DstPort 1
}
Line {
SrcBlock "encode 1DATA_L"
SrcPort 1
DstBlock "1DATA_L"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 1
Points [80, 0]
Branch {
Points [230, 0; 0, 25]
DstBlock "Mux4"
DstPort 3
}
Branch {
DstBlock "Lq1"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 1
Points [95, 0]
Branch {
Points [270, 0; 0, -65]
DstBlock "Mux4"
DstPort 2
}
Branch {
DstBlock "Lq1"
DstPort 2
}
}
Line {
SrcBlock "Demux1"
SrcPort 2
Points [25, 0]
Branch {
Points [275, 0; 0, 25]
DstBlock "Mux4"
DstPort 4
}
Branch {
DstBlock "Lq0"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [40, 0]
Branch {
Points [310, 0; 0, -95]
DstBlock "Mux4"
DstPort 1
}
Branch {
DstBlock "Lq0"
DstPort 2
}
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [195, 0]
Branch {
Points [90, 0; 0, 80]
DstBlock "Mux1"
DstPort 3
}
Branch {
DstBlock "Lq3"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [210, 0]
Branch {
Points [180, 0; 0, -10]
DstBlock "Mux1"
DstPort 2
}
Branch {
DstBlock "Lq3"
DstPort 2
}
}
Line {
SrcBlock "Demux1"
SrcPort 4
Points [135, 0]
Branch {
Points [135, 0; 0, 80]
DstBlock "Mux1"
DstPort 4
}
Branch {
DstBlock "Lq2"
DstPort 1
}
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [150, 0]
Branch {
Points [230, 0; 0, -40]
DstBlock "Mux1"
DstPort 1
}
Branch {
DstBlock "Lq2"
DstPort 2
}
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "encode 2DATA_L"
DstPort 1
}
Line {
SrcBlock "encode 2DATA_L"
SrcPort 1
DstBlock "2DATA_L"
DstPort 1
}
Line {
SrcBlock "Lq3"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Lq2"
SrcPort 1
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Lq1"
SrcPort 1
DstBlock "Mux"
DstPort 3
}
Line {
SrcBlock "Lq0"
SrcPort 1
DstBlock "Mux"
DstPort 4
}
}
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 15]
Position [170, 25, 175, 525]
BackgroundColor "black"
ShowName off
Outputs "15"
DisplayOption "bar"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 15]
Position [170, 700, 175, 1200]
BackgroundColor "black"
ShowName off
Outputs "15"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux"
Ports [2, 1]
Position [475, 116, 480, 154]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux1"
Ports [2, 1]
Position [475, 176, 480, 214]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux10"
Ports [2, 1]
Position [475, 396, 480, 434]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux11"
Ports [2, 1]
Position [475, 456, 480, 494]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux12"
Ports [2, 1]
Position [475, 1006, 480, 1044]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux13"
Ports [2, 1]
Position [475, 1066, 480, 1104]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux14"
Ports [48, 1]
Position [925, 20, 930, 1205]
ShowName off
Inputs "48"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux2"
Ports [2, 1]
Position [475, 256, 480, 294]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux3"
Ports [2, 1]
Position [475, 316, 480, 354]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux4"
Ports [2, 1]
Position [475, 726, 480, 764]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux5"
Ports [2, 1]
Position [475, 786, 480, 824]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux6"
Ports [2, 1]
Position [475, 866, 480, 904]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Mux
Name "Mux7"
Ports [2, 1]
Position [475, 926, 480, 964]
ShowName off
Inputs "2"
DisplayOption "bar"
}
Block {
BlockType Outport
Name "CmdString"
Position [1010, 608, 1040, 622]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "A"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "B"
SrcPort 1
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "56 to 49"
DstPort 1
}
Line {
SrcBlock "Mux1"
SrcPort 1
DstBlock "56 to 49"
DstPort 2
}
Line {
SrcBlock "Mux2"
SrcPort 1
DstBlock "48 to 41"
DstPort 1
}
Line {
SrcBlock "Mux3"
SrcPort 1
DstBlock "48 to 41"
DstPort 2
}
Line {
SrcBlock "Mux4"
SrcPort 1
DstBlock "28 to 21"
DstPort 1
}
Line {
SrcBlock "Mux5"
SrcPort 1
DstBlock "28 to 21"
DstPort 2
}
Line {
SrcBlock "Mux6"
SrcPort 1
DstBlock "20 to 13"
DstPort 1
}
Line {
SrcBlock "Mux7"
SrcPort 1
DstBlock "20 to 13"
DstPort 2
}
Line {
SrcBlock "Mux10"
SrcPort 1
DstBlock "40 to 33"
DstPort 1
}
Line {
SrcBlock "Mux11"
SrcPort 1
DstBlock "40 to 33"
DstPort 2
}
Line {
SrcBlock "Mux12"
SrcPort 1
DstBlock "12 to 5"
DstPort 1
}
Line {
SrcBlock "Mux13"
SrcPort 1
DstBlock "12 to 5"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "60 to 57"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 2
Points [230, 0; 0, 60]
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 3
Points [220, 0; 0, 45]
DstBlock "Mux"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 4
Points [210, 0; 0, 130]
DstBlock "Mux2"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 5
Points [200, 0; 0, 115]
DstBlock "Mux2"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 6
Points [190, 0; 0, 200]
DstBlock "Mux10"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 7
Points [180, 0; 0, 185]
DstBlock "Mux10"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 1
Points [95, 0; 0, -635]
DstBlock "60 to 57"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 2
Points [105, 0; 0, -555]
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [115, 0; 0, -570]
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 4
Points [125, 0; 0, -485]
DstBlock "Mux3"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 5
Points [135, 0; 0, -500]
DstBlock "Mux3"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 6
Points [145, 0; 0, -415]
DstBlock "Mux11"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 7
Points [155, 0; 0, -430]
DstBlock "Mux11"
DstPort 2
}
Line {
SrcBlock "60 to 57"
SrcPort 1
DstBlock "Mux14"
DstPort 1
}
Line {
SrcBlock "4 to 1"
SrcPort 3
DstBlock "Mux14"
DstPort 48
}
Line {
SrcBlock "4 to 1"
SrcPort 2
DstBlock "Mux14"
DstPort 47
}
Line {
SrcBlock "60 to 57"
SrcPort 2
DstBlock "Mux14"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 15
DstBlock "4 to 1"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 8
Points [170, 0; 0, 305]
DstBlock "32 to 29"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 9
Points [160, 0; 0, 425]
DstBlock "Mux4"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 10
Points [150, 0; 0, 410]
DstBlock "Mux4"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 11
Points [140, 0; 0, 495]
DstBlock "Mux6"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 12
Points [130, 0; 0, 480]
DstBlock "Mux6"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 13
Points [120, 0; 0, 565]
DstBlock "Mux12"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 14
Points [110, 0; 0, 550]
DstBlock "Mux12"
DstPort 2
}
Line {
SrcBlock "Demux"
SrcPort 15
Points [100, 0; 0, 635]
DstBlock "4 to 1"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 8
Points [165, 0; 0, -305]
DstBlock "32 to 29"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 9
Points [175, 0; 0, -190]
DstBlock "Mux5"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 10
Points [185, 0; 0, -205]
DstBlock "Mux5"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 11
Points [195, 0; 0, -120]
DstBlock "Mux7"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 12
Points [205, 0; 0, -135]
DstBlock "Mux7"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 13
Points [215, 0; 0, -50]
DstBlock "Mux13"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 14
Points [225, 0; 0, -65]
DstBlock "Mux13"
DstPort 2
}
Line {
SrcBlock "60 to 57"
SrcPort 3
Points [130, 0; 0, 25]
DstBlock "Mux14"
DstPort 4
}
Line {
SrcBlock "56 to 49"
SrcPort 1
Points [140, 0; 0, -40]
DstBlock "Mux14"
DstPort 3
}
Line {
SrcBlock "56 to 49"
SrcPort 2
Points [130, 0; 0, -10]
DstBlock "Mux14"
DstPort 5
}
Line {
SrcBlock "56 to 49"
SrcPort 3
Points [130, 0; 0, -5]
DstBlock "Mux14"
DstPort 6
}
Line {
SrcBlock "56 to 49"
SrcPort 4
DstBlock "Mux14"
DstPort 7
}
Line {
SrcBlock "56 to 49"
SrcPort 6
Points [130, 0; 0, 35]
DstBlock "Mux14"
DstPort 10
}
Line {
SrcBlock "48 to 41"
SrcPort 1
Points [120, 0; 0, -30]
DstBlock "Mux14"
DstPort 9
}
Line {
SrcBlock "48 to 41"
SrcPort 2
DstBlock "Mux14"
DstPort 11
}
Line {
SrcBlock "48 to 41"
SrcPort 4
Points [130, 0; 0, 10]
DstBlock "Mux14"
DstPort 13
}
Line {
SrcBlock "48 to 41"
SrcPort 5
Points [130, 0; 0, 15]
DstBlock "Mux14"
DstPort 14
}
Line {
SrcBlock "48 to 41"
SrcPort 6
Points [120, 0; 0, 45]
DstBlock "Mux14"
DstPort 16
}
Line {
SrcBlock "40 to 33"
SrcPort 1
Points [135, 0; 0, -20]
DstBlock "Mux14"
DstPort 15
}
Line {
SrcBlock "40 to 33"
SrcPort 2
Points [130, 0; 0, 10]
DstBlock "Mux14"
DstPort 17
}
Line {
SrcBlock "40 to 33"
SrcPort 3
Points [130, 0; 0, 15]
DstBlock "Mux14"
DstPort 18
}
Line {
SrcBlock "40 to 33"
SrcPort 4
Points [120, 0; 0, 20]
DstBlock "Mux14"
DstPort 19
}
Line {
SrcBlock "40 to 33"
SrcPort 5
Points [110, 0; 0, 25]
DstBlock "Mux14"
DstPort 20
}
Line {
SrcBlock "40 to 33"
SrcPort 6
Points [100, 0; 0, 55]
DstBlock "Mux14"
DstPort 22
}
Line {
SrcBlock "32 to 29"
SrcPort 1
Points [115, 0; 0, -40]
DstBlock "Mux14"
DstPort 21
}
Line {
SrcBlock "12DATA_L"
SrcPort 1
DstBlock "Mux14"
DstPort 24
}
Line {
SrcBlock "13DATA_H"
SrcPort 1
DstBlock "Mux14"
DstPort 25
}
Line {
SrcBlock "32 to 29"
SrcPort 2
Points [15, 0; 0, -20]
DstBlock "Mux14"
DstPort 23
}
Line {
SrcBlock "32 to 29"
SrcPort 3
Points [15, 0; 0, 25]
DstBlock "Mux14"
DstPort 26
}
Line {
SrcBlock "32 to 29"
SrcPort 4
Points [115, 0; 0, 45]
DstBlock "Mux14"
DstPort 28
}
Line {
SrcBlock "28 to 21"
SrcPort 1
Points [100, 0; 0, -50]
DstBlock "Mux14"
DstPort 27
}
Line {
SrcBlock "28 to 21"
SrcPort 2
Points [130, 0; 0, -20]
DstBlock "Mux14"
DstPort 29
}
Line {
SrcBlock "28 to 21"
SrcPort 3
Points [130, 0; 0, -15]
DstBlock "Mux14"
DstPort 30
}
Line {
SrcBlock "28 to 21"
SrcPort 4
Points [130, 0; 0, -10]
DstBlock "Mux14"
DstPort 31
}
Line {
SrcBlock "28 to 21"
SrcPort 5
Points [130, 0; 0, -5]
DstBlock "Mux14"
DstPort 32
}
Line {
SrcBlock "28 to 21"
SrcPort 6
Points [130, 0; 0, 25]
DstBlock "Mux14"
DstPort 34
}
Line {
SrcBlock "20 to 13"
SrcPort 1
Points [145, 0; 0, -40]
DstBlock "Mux14"
DstPort 33
}
Line {
SrcBlock "20 to 13"
SrcPort 2
Points [130, 0; 0, -10]
DstBlock "Mux14"
DstPort 35
}
Line {
SrcBlock "20 to 13"
SrcPort 3
Points [130, 0; 0, -5]
DstBlock "Mux14"
DstPort 36
}
Line {
SrcBlock "20 to 13"
SrcPort 4
DstBlock "Mux14"
DstPort 37
}
Line {
SrcBlock "20 to 13"
SrcPort 5
Points [130, 0; 0, 5]
DstBlock "Mux14"
DstPort 38
}
Line {
SrcBlock "20 to 13"
SrcPort 6
Points [145, 0; 0, 35]
DstBlock "Mux14"
DstPort 40
}
Line {
SrcBlock "12 to 5"
SrcPort 1
Points [130, 0; 0, -30]
DstBlock "Mux14"
DstPort 39
}
Line {
SrcBlock "12 to 5"
SrcPort 2
DstBlock "Mux14"
DstPort 41
}
Line {
SrcBlock "12 to 5"
SrcPort 3
Points [130, 0; 0, 5]
DstBlock "Mux14"
DstPort 42
}
Line {
SrcBlock "12 to 5"
SrcPort 4
Points [130, 0; 0, 10]
DstBlock "Mux14"
DstPort 43
}
Line {
SrcBlock "12 to 5"
SrcPort 5
Points [130, 0; 0, 15]
DstBlock "Mux14"
DstPort 44
}
Line {
SrcBlock "12 to 5"
SrcPort 6
Points [135, 0; 0, 45]
DstBlock "Mux14"
DstPort 46
}
Line {
SrcBlock "4 to 1"
SrcPort 1
Points [125, 0; 0, -25]
DstBlock "Mux14"
DstPort 45
}
Line {
SrcBlock "Mux14"
SrcPort 1
DstBlock "CmdString"
DstPort 1
}
Line {
SrcBlock "56 to 49"
SrcPort 5
Points [130, 0; 0, 5]
DstBlock "Mux14"
DstPort 8
}
Line {
SrcBlock "48 to 41"
SrcPort 3
Points [135, 0; 0, 5]
DstBlock "Mux14"
DstPort 12
}
}
}
Block {
BlockType Ground
Name "Ground4"
Position [720, 505, 740, 525]
NamePlacement "alternate"
}
Block {
BlockType Concatenate
Name "Matrix\nConcatenate"
Ports [3, 1]
Position [415, 27, 450, 153]
NumInputs "3"
Mode "Vector concatenation"
}
Block {
BlockType Ground
Name "No Send"
Position [425, 220, 445, 240]
}
Block {
BlockType Ground
Name "No Send1"
Position [425, 510, 445, 530]
}
Block {
BlockType Reference
Name "QSC-100"
Ports [4, 4]
Position [770, 387, 845, 538]
SourceBlock "xpclib/RS232/Quatech/QSC-100/QSC-100"
SourceType "QSC-100 RS232 Send Receive"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
group "Basic Setup"
port "3"
irqnum "11"
slot "-1"
baud1 "57600"
parity1 "None"
ndata1 "8"
nstop1 "1"
fifomode1 "16 deep"
rlevel1 "half full"
automode1 off
xmtfifosize1 "128"
xmtdatatype1 "8 bit uint null terminated"
rcvfifosize1 "128"
rcvmaxread1 "10"
rcvminread1 "1"
rcvusedelim1 on
rcvdelim1 "10"
rcvdatatype1 "8 bit uint null terminated"
rcvsampletime1 "0.0005"
baud2 "9600"
parity2 "None"
ndata2 "8"
nstop2 "1"
fifomode2 "16 deep"
rlevel2 "half full"
automode2 off
xmtfifosize2 "128"
xmtdatatype2 "count+16 bit uint"
rcvfifosize2 "128"
rcvmaxread2 "10"
rcvminread2 "1"
rcvusedelim2 on
rcvdelim2 "10"
rcvdatatype2 "8 bit uint null terminated"
rcvsampletime2 "0.0005"
baud3 "115200"
parity3 "None"
ndata3 "8"
nstop3 "1"
fifomode3 "16 deep"
rlevel3 "half full"
automode3 off
xmtfifosize3 "128"
xmtdatatype3 "8 bit uint null terminated"
rcvfifosize3 "128"
rcvmaxread3 "1024"
rcvminread3 "1"
rcvusedelim3 on
rcvdelim3 "13"
rcvdatatype3 "count+16 bit uint"
rcvsampletime3 "0.0005"
buad4 "115200"
parity4 "None"
ndata4 "8"
nstop4 "1"
fifomode4 "64 deep"
rlevel4 "half full"
automode4 on
xmtfifosize4 "1024"
xmtdatatype4 "8 bit uint null terminated"
rcvfifosize4 "1024"
rcvmaxread4 "1024"
rcvminread4 "1"
rcvusedelim4 on
rcvdelim4 "13"
rcvdatatype4 "count+16 bit uint"
rcvsampletime4 "0.0005"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [245, 215, 265, 235]
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "double"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch"
Position [560, 127, 585, 253]
Criteria "u2 > Threshold"
InputSameDT off
SaturateOnIntegerOverflow off
ZeroCross off
}
Block {
BlockType Switch
Name "Switch1"
Position [560, 417, 585, 543]
Criteria "u2 > Threshold"
InputSameDT off
SaturateOnIntegerOverflow off
ZeroCross off
}
Block {
BlockType Terminator
Name "Terminator2"
Position [895, 400, 915, 420]
}
Block {
BlockType Terminator
Name "Terminator4"
Position [895, 435, 915, 455]
}
Block {
BlockType Terminator
Name "Terminator5"
Position [895, 470, 915, 490]
}
Block {
BlockType Terminator
Name "Terminator6"
Position [895, 505, 915, 525]
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [235, 258, 270, 292]
Orientation "left"
NamePlacement "alternate"
SampleTime "-1"
}
Block {
BlockType Constant
Name "\\r \\n 0"
Position [310, 113, 370, 147]
Value "[13 10 0]"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Outport
Name "Sent Count"
Position [335, 268, 365, 282]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Encoder"
SrcPort 1
DstBlock "Convert to uint8"
DstPort 1
}
Line {
SrcBlock "Convert to uint8"
SrcPort 1
DstBlock "Matrix\nConcatenate"
DstPort 2
}
Line {
SrcBlock "\\r \\n 0"
SrcPort 1
DstBlock "Matrix\nConcatenate"
DstPort 3
}
Line {
SrcBlock "D 1 8"
SrcPort 1
DstBlock "Matrix\nConcatenate"
DstPort 1
}
Line {
SrcBlock "A"
SrcPort 1
DstBlock "Encoder"
DstPort 1
}
Line {
SrcBlock "B"
SrcPort 1
DstBlock "Encoder"
DstPort 2
}
Line {
SrcBlock "Enable Command BC"
SrcPort 1
Points [110, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [125, 0]
Branch {
DstBlock "Switch"
DstPort 2
}
Branch {
Points [0, 290]
DstBlock "Switch1"
DstPort 2
}
}
}
Line {
SrcBlock "No Send"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "Matrix\nConcatenate"
SrcPort 1
Points [55, 0; 0, 60]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
Points [100, 0; 0, 220]
DstBlock "QSC-100"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [35, 0; 0, 50]
Branch {
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Sent Count"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-25, 0; 0, -50]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "QSC-100"
SrcPort 1
DstBlock "Terminator2"
DstPort 1
}
Line {
SrcBlock "QSC-100"
SrcPort 2
DstBlock "Terminator4"
DstPort 1
}
Line {
SrcBlock "QSC-100"
SrcPort 3
DstBlock "Terminator5"
DstPort 1
}
Line {
SrcBlock "QSC-100"
SrcPort 4
DstBlock "Terminator6"
DstPort 1
}
Line {
SrcBlock "Ground4"
SrcPort 1
DstBlock "QSC-100"
DstPort 4
}
Line {
SrcBlock "Robot Command"
SrcPort 1
Points [515, 0; 0, 100]
DstBlock "QSC-100"
DstPort 2
}
Line {
SrcBlock "No Send1"
SrcPort 1
DstBlock "Switch1"
DstPort 3
}
Line {
SrcBlock "Switch1"
SrcPort 1
DstBlock "QSC-100"
DstPort 3
}
Line {
SrcBlock "Stimulus Intensitiy"
SrcPort 1
DstBlock "Switch1"
DstPort 1
}
}
}
Block {
BlockType SubSystem
Name "Serial Command Timer"
Ports [3, 5]
Position [225, 164, 420, 266]
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Serial Command Timer"
Location [139, 186, 1250, 734]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Time and Index"
Position [45, 283, 75, 297]
IconDisplay "Port number"
DataType "uint32"
}
Block {
BlockType Inport
Name "Configuration Matrix"
Position [45, 353, 75, 367]
Port "2"
IconDisplay "Port number"
DataType "uint8"
}
Block {
BlockType Inport
Name "Stimulus Intensity Vector"
Position [45, 493, 75, 507]
Port "3"
IconDisplay "Port number"
DataType "double"
}
Block {
BlockType Reference
Name "Available Stimulus\nConfigurations"
Ports [2, 1]
Position [750, 260, 820, 340]
SourceBlock "simulink/Lookup\nTables/Direct Lookup\nTabl"
"e (n-D)"
SourceType "LookupNDDirect"
maskTabDims "2"
explicitNumDims "1"
outDims "Column"
tabIsInput on
mxTable "[eye(60); eye(60)]"
clipFlag "Warning"
}
Block {
BlockType Reference
Name "Available Stimulus\nIntensity Configuration"
"s"
Ports [2, 1]
Position [750, 375, 820, 455]
SourceBlock "simulink/Lookup\nTables/Direct Lookup\nTabl"
"e (n-D)"
SourceType "LookupNDDirect"
maskTabDims "1"
explicitNumDims "1"
outDims "Element"
tabIsInput on
mxTable "[eye(60); eye(60)]"
clipFlag "Warning"
}
Block {
BlockType Constant
Name "Constant"
Position [605, 315, 635, 345]
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Constant1"
Position [605, 425, 635, 455]
Value "1"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "Inherit from 'Constant value'"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Sum
Name "Correct Offset"
Ports [2, 1]
Position [640, 270, 660, 290]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Correct Offset1"
Ports [2, 1]
Position [635, 385, 655, 405]
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType Demux
Name "Demux"
Ports [1, 2]
Position [865, 261, 870, 334]
BackgroundColor "black"
ShowName off
Outputs "2"
DisplayOption "bar"
}
Block {
BlockType Demux
Name "Demux1"
Ports [1, 3]
Position [545, 253, 550, 307]
BackgroundColor "black"
ShowName off
Outputs "3"
DisplayOption "bar"
}
Block {
BlockType SubSystem
Name "Event Counter"
Ports [1, 1]
Position [260, 229, 325, 271]
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Starting value"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "startvalue=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Event Counter"
Location [427, 232, 1030, 409]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Event"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [130, 23, 205, 57]
OutDataTypeMode "uint8"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [275, 30, 295, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "uint32"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [330, 108, 365, 142]
Orientation "left"
NamePlacement "alternate"
X0 "startvalue"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Count"
Position [465, 33, 495, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-40, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [100, 0]
Branch {
Points [0, 85]
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Count"
DstPort 1
}
}
Line {
SrcBlock "Event"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Model\nTimestep"
Ports [0, 1]
Position [35, 136, 75, 174]
SourceBlock "simulink/Sources/Counter\nFree-Running"
SourceType "Counter Free-Running"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
NumBits "32"
tsamp "-1"
}
Block {
BlockType SubSystem
Name "Pulse Set-Up for STG"
Ports [1, 1]
Position [870, 388, 965, 442]
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Pulse Set-Up for STG"
Location [184, 233, 1040, 852]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "mV"
Position [85, 47, 115, 63]
IconDisplay "Port number"
}
Block {
BlockType Reference
Name "ASCII Encode "
Ports [1, 1]
Position [430, 37, 490, 73]
SourceBlock "xpclib/RS232/ASCII Encode "
SourceType "ASCII Encode"
format "prog k1;ranges=3;pulses=1;-%04i;wait1=2"
";pulses=1;0;\\r\\n"
nvars "1"
maxlength "128"
vartypes "{ 'double' }"
}
Block {
BlockType Constant
Name "Constant"
Position [180, 175, 210, 205]
Value "1000"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Constant1"
Position [90, 115, 120, 145]
Value "0"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "double"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "inf"
FramePeriod "inf"
}
Block {
BlockType Saturate
Name "Limit range to 0-900"
Position [240, 40, 270, 70]
UpperLimit "900"
LowerLimit "0"
}
Block {
BlockType Reference
Name "Model\nTimestep"
Ports [0, 1]
Position [175, 246, 215, 284]
SourceBlock "simulink/Sources/Counter\nFree-Running"
SourceType "Counter Free-Running"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
NumBits "32"
tsamp "-1"
}
Block {
BlockType Ground
Name "No Send"
Position [425, 240, 445, 260]
}
Block {
BlockType Ground
Name "No Send1"
Position [445, 140, 465, 160]
}
Block {
BlockType RelationalOperator
Name "Send Serial Command"
Position [270, 182, 300, 213]
Operator "=="
LogicOutDataTypeMode "Boolean"
LogicDataType "uint(32)"
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [360, 310, 380, 330]
NamePlacement "alternate"
ShowName off
IconShape "round"
Inputs "++|"
InputSameDT off
OutDataTypeMode "double"
SaturateOnIntegerOverflow off
}
Block {
BlockType Switch
Name "Switch"
Position [560, 127, 585, 273]
Criteria "u2 > Threshold"
InputSameDT off
SaturateOnIntegerOverflow off
ZeroCross off
}
Block {
BlockType Terminator
Name "Terminator"
Position [555, 375, 575, 395]
NamePlacement "alternate"
}
Block {
BlockType Terminator
Name "Terminator1"
Position [655, 190, 675, 210]
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [350, 368, 385, 402]
Orientation "left"
NamePlacement "alternate"
SampleTime "-1"
}
Block {
BlockType Outport
Name "To RS232"
Position [535, 48, 565, 62]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "mV"
SrcPort 1
DstBlock "Limit range to 0-900"
DstPort 1
}
Line {
SrcBlock "Model\nTimestep"
SrcPort 1
Points [0, -60]
DstBlock "Send Serial Command"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
DstBlock "Send Serial Command"
DstPort 1
}
Line {
SrcBlock "Send Serial Command"
SrcPort 1
Points [65, 0]
Branch {
DstBlock "Switch"
DstPort 2
}
Branch {
DstBlock "Sum"
DstPort 1
}
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "Terminator1"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [35, 0; 0, 65]
Branch {
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Terminator"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-25, 0; 0, -65]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Limit range to 0-900"
SrcPort 1
DstBlock "ASCII Encode "
DstPort 1
}
Line {
SrcBlock "No Send"
SrcPort 1
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "ASCII Encode "
SrcPort 1
DstBlock "To RS232"
DstPort 1
}
Line {
SrcBlock "No Send1"
SrcPort 1
DstBlock "Switch"
DstPort 1
}
}
}
Block {
BlockType RelationalOperator
Name "Send Serial Command"
Position [175, 132, 205, 163]
Operator "=="
LogicOutDataTypeMode "Boolean"
LogicDataType "uint(32)"
}
Block {
BlockType Reference
Name "Time and Index\nLookup Table"
Ports [2, 1]
Position [365, 231, 435, 309]
SourceBlock "simulink/Lookup\nTables/Direct Lookup\nTabl"
"e (n-D)"
SourceType "LookupNDDirect"
maskTabDims "2"
explicitNumDims "1"
outDims "Column"
tabIsInput on
mxTable "[1250:1250:125000000; repmat(59:-1:50,1,10"
"000)]"
clipFlag "Warning"
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [475, 253, 510, 287]
NamePlacement "alternate"
SampleTime "-1"
}
Block {
BlockType Outport
Name "A"
Position [920, 273, 950, 287]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "B"
Position [920, 308, 950, 322]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Enable"
Position [915, 143, 945, 157]
Port "3"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "STG Ascii Cmd"
Position [1015, 408, 1045, 422]
Port "4"
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Last Stimulus Given"
Position [1015, 498, 1045, 512]
Port "5"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Demux"
SrcPort 2
DstBlock "B"
DstPort 1
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "A"
DstPort 1
}
Line {
SrcBlock "Time and Index\nLookup Table"
SrcPort 1
DstBlock "Unit Delay"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 1
Points [55, 0; 0, -215; -495, 0; 0, 95]
DstBlock "Send Serial Command"
DstPort 1
}
Line {
SrcBlock "Available Stimulus\nConfigurations"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
Line {
SrcBlock "Send Serial Command"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Enable"
DstPort 1
}
Branch {
Points [0, 100]
DstBlock "Event Counter"
DstPort 1
}
}
Line {
SrcBlock "Event Counter"
SrcPort 1
DstBlock "Time and Index\nLookup Table"
DstPort 1
}
Line {
SrcBlock "Configuration Matrix"
SrcPort 1
Points [610, 0; 0, -40]
DstBlock "Available Stimulus\nConfigurations"
DstPort 2
}
Line {
SrcBlock "Time and Index"
SrcPort 1
DstBlock "Time and Index\nLookup Table"
DstPort 2
}
Line {
SrcBlock "Model\nTimestep"
SrcPort 1
DstBlock "Send Serial Command"
DstPort 2
}
Line {
SrcBlock "Demux1"
SrcPort 2
DstBlock "Correct Offset"
DstPort 1
}
Line {
SrcBlock "Correct Offset"
SrcPort 1
DstBlock "Available Stimulus\nConfigurations"
DstPort 1
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [10, 0]
DstBlock "Correct Offset"
DstPort 2
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [15, 0]
DstBlock "Demux1"
DstPort 1
}
Line {
SrcBlock "Demux1"
SrcPort 3
Points [0, 95]
DstBlock "Correct Offset1"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [5, 0]
DstBlock "Correct Offset1"
DstPort 2
}
Line {
SrcBlock "Correct Offset1"
SrcPort 1
DstBlock "Available Stimulus\nIntensity Configuration"
"s"
DstPort 1
}
Line {
SrcBlock "Stimulus Intensity Vector"
SrcPort 1
Points [610, 0; 0, -65]
DstBlock "Available Stimulus\nIntensity Configuration"
"s"
DstPort 2
}
Line {
SrcBlock "Available Stimulus\nIntensity Configuration"
"s"
SrcPort 1
Points [20, 0]
Branch {
DstBlock "Pulse Set-Up for STG"
DstPort 1
}
Branch {
Points [0, 90]
DstBlock "Last Stimulus Given"
DstPort 1
}
}
Line {
SrcBlock "Pulse Set-Up for STG"
SrcPort 1
DstBlock "STG Ascii Cmd"
DstPort 1
}
}
}
Block {
BlockType Reference
Name "Statistical Information"
Ports [1]
Position [1015, 471, 1090, 509]
NamePlacement "alternate"
SourceBlock "xpclib/Misc./Scope (xPC) "
SourceType "xpcscopeblock"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
scopeno "4"
scopetype "Target"
autostart on
viewmode "Numerical"
formatstr "'Stimuli provided :%13.0f,Events detected "
" : %15.0f,Bursts detected : %15.0f,Events per Burst : %15.0f,UDP Pack"
"ets Dropped : %15.0f, Delta T: %15.0f, Clamp Enabled: %15.5f, Clamp"
" Control: %15.0f, Clamp Control2: %15.0f'"
grid on
ylimits "[0,0]"
nosamples "100"
noprepostsamples "0"
interleave "1"
triggermode "FreeRun"
triggersignal "1"
triggerlevel "0.0"
triggerslope "Either"
triggerscope "1"
triggersample "0"
filename "data.dat"
mode "Lazy"
writesize "512"
autorestart off
}
Block {
BlockType Constant
Name "Stimulation electrodes Configurations"
Position [75, 197, 180, 223]
BackgroundColor "lightBlue"
Value "stimcombs"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint8"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "-1"
FramePeriod "inf"
}
Block {
BlockType SubSystem
Name "Stimulator"
Ports [1]
Position [705, 39, 850, 91]
DropShadow on
NamePlacement "alternate"
TreatAsAtomicUnit on
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
System {
Name "Stimulator"
Location [283, 623, 1055, 908]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Enable Pulse A"
Position [35, 73, 65, 87]
IconDisplay "Port number"
DataType "boolean"
}
Block {
BlockType SubSystem
Name "Blanking Signal A"
Ports [1, 1]
Position [315, 99, 380, 131]
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "dilation"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "dilation=@1;"
MaskDisplay "plot([.1 .2 .2 .3 .4 .4 .5], [.1 .1 .9 .9 ."
"9 .1 .1])\nplot([.5 .8 .8 .9], [.9 .9 .1 .1])\nplot([.5 .7 .65 .7 .65], [.3 ."
"3 .35 .3 .25])\ntext(0.5, 0.6, num2str(dilation))"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "normalized"
MaskValueString "2"
System {
Name "Blanking Signal A"
Location [2, 82, 1014, 722]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "In"
Position [100, 133, 130, 147]
IconDisplay "Port number"
}
Block {
BlockType Sum
Name "Add"
Ports [3, 1]
Position [285, 95, 300, 185]
Inputs "++-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
OutScaling "2^-10"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "Integer Delay"
Ports [1, 1]
Position [215, 93, 250, 127]
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0.0"
samptime "-1"
NumDelays "1"
}
Block {
BlockType Reference
Name "Integer Delay1"
Ports [1, 1]
Position [215, 153, 250, 187]
SourceBlock "simulink/Discrete/Integer Delay"
SourceType "Integer Delay"
vinit "0.0"
samptime "-1"
NumDelays "dilation"
}
Block {
BlockType Outport
Name "Out"
Position [385, 133, 415, 147]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Add"
SrcPort 1
Points [25, 0]
Branch {
Points [0, -60; -145, 0; 0, 30]
DstBlock "Integer Delay"
DstPort 1
}
Branch {
DstBlock "Out"
DstPort 1
}
}
Line {
SrcBlock "Integer Delay1"
SrcPort 1
DstBlock "Add"
DstPort 3
}
Line {
SrcBlock "Integer Delay"
SrcPort 1
DstBlock "Add"
DstPort 1
}
Line {
SrcBlock "In"
SrcPort 1
Points [50, 0]
Branch {
DstBlock "Add"
DstPort 2
}
Branch {
Points [0, 30]
DstBlock "Integer Delay1"
DstPort 1
}
}
}
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion A"
Position [120, 63, 195, 97]
OutDataTypeMode "double"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Reference
Name "PD2-MF 12bit series"
Ports [2]
Position [565, 64, 705, 131]
DropShadow on
SourceBlock "xpcueilib/Digital\nOutput/PD2-MF 12bit seri"
"es"
SourceType "ueipd2mf12_do_6"
boardtypein "PD2-MF-64-3M/12H"
channel "[1 2]"
reset "[1]"
initValue "[0]"
sampletime "-1"
pcislot "-1"
}
Line {
SrcBlock "Enable Pulse A"
SrcPort 1
DstBlock "Data Type Conversion A"
DstPort 1
}
Line {
SrcBlock "Blanking Signal A"
SrcPort 1
DstBlock "PD2-MF 12bit series"
DstPort 2
}
Line {
SrcBlock "Data Type Conversion A"
SrcPort 1
Points [50, 0]
Branch {
DstBlock "PD2-MF 12bit series"
DstPort 1
}
Branch {
Points [0, 35]
DstBlock "Blanking Signal A"
DstPort 1
}
}
}
}
Block {
BlockType Constant
Name "Stimulus Intensitiy (mV) Configurations"
Position [75, 247, 180, 273]
BackgroundColor "lightBlue"
Value "stimulusintensity"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "double"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "-1"
FramePeriod "inf"
}
Block {
BlockType SubSystem
Name "Stimulus Timer1"
Ports [2, 2]
Position [245, 36, 375, 109]
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Stimulus Times"
MaskStyleString "edit"
MaskTunableValueString "on"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "stimtimes=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "stimtimes"
System {
Name "Stimulus Timer1"
Location [232, 141, 1183, 951]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Data B"
Position [40, 613, 70, 627]
IconDisplay "Port number"
}
Block {
BlockType Inport
Name "Model Time Step"
Position [50, 158, 80, 172]
Port "2"
IconDisplay "Port number"
DataType "uint32"
}
Block {
BlockType Reference
Name "Compare\nTo Zero A"
Ports [1, 1]
Position [535, 335, 565, 365]
SourceBlock "simulink/Logic and Bit\nOperations/Compare"
"\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
relop "~="
LogicOutDataTypeMode "boolean"
ZeroCross off
}
Block {
BlockType Reference
Name "Compare\nTo Zero A1"
Ports [1, 1]
Position [555, 715, 585, 745]
SourceBlock "simulink/Logic and Bit\nOperations/Compare"
"\nTo Zero"
SourceType "Compare To Zero"
ShowPortLabels on
SystemSampleTime "-1"
FunctionWithSeparateData off
RTWMemSecFuncInitTerm "Inherit from model"
RTWMemSecFuncExecute "Inherit from model"
RTWMemSecDataConstants "Inherit from model"
RTWMemSecDataInternal "Inherit from model"
RTWMemSecDataParameters "Inherit from model"
relop "~="
LogicOutDataTypeMode "boolean"
ZeroCross off
}
Block {
BlockType MultiPortSwitch
Name "Element selector\n B"
Ports [2, 1]
Position [555, 543, 595, 647]
Inputs "1"
zeroidx on
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType MultiPortSwitch
Name "Element selector A"
Ports [2, 1]
Position [555, 183, 595, 287]
Inputs "1"
zeroidx on
InputSameDT off
SaturateOnIntegerOverflow off
}
Block {
BlockType Logic
Name "Enable A"
Ports [2, 1]
Position [775, 96, 805, 129]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType Logic
Name "Enable B"
Ports [2, 1]
Position [775, 455, 805, 490]
AllPortsSameDT off
OutDataTypeMode "Boolean"
}
Block {
BlockType SubSystem
Name "Event Counter A"
Ports [1, 1]
Position [370, 187, 445, 233]
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Starting value"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "startvalue=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Event Counter A"
Location [313, 317, 928, 494]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Event"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [135, 23, 210, 57]
OutDataTypeMode "uint32"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [295, 30, 315, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [350, 108, 385, 142]
Orientation "left"
NamePlacement "alternate"
X0 "startvalue"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Count"
Position [510, 33, 540, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
Line {
SrcBlock "Event"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [100, 0]
Branch {
DstBlock "Count"
DstPort 1
}
Branch {
Points [0, 85]
DstBlock "Unit Delay"
DstPort 1
}
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-40, 0]
DstBlock "Sum"
DstPort 2
}
}
}
Block {
BlockType SubSystem
Name "Event Counter B"
Ports [1, 1]
Position [370, 547, 445, 593]
NamePlacement "alternate"
MinAlgLoopOccurrences off
RTWSystemCode "Auto"
FunctionWithSeparateData off
MaskHideContents off
MaskPromptString "Starting value"
MaskStyleString "edit"
MaskTunableValueString "off"
MaskEnableString "on"
MaskVisibilityString "on"
MaskToolTipString "on"
MaskVariables "startvalue=@1;"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0"
System {
Name "Event Counter B"
Location [313, 317, 928, 494]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [0.500000, 0.500000, 0.500000, 0.500000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Inport
Name "Event"
Position [25, 33, 55, 47]
IconDisplay "Port number"
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [135, 23, 210, 57]
OutDataTypeMode "uint32"
RndMeth "Floor"
SaturateOnIntegerOverflow off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [295, 30, 315, 50]
ShowName off
IconShape "round"
Inputs "|++"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
SaturateOnIntegerOverflow off
}
Block {
BlockType UnitDelay
Name "Unit Delay"
Position [350, 108, 385, 142]
Orientation "left"
NamePlacement "alternate"
X0 "startvalue"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Count"
Position [510, 33, 540, 47]
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Unit Delay"
SrcPort 1
Points [-40, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
Points [100, 0]
Branch {
Points [0, 85]
DstBlock "Unit Delay"
DstPort 1
}
Branch {
DstBlock "Count"
DstPort 1
}
}
Line {
SrcBlock "Event"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "Sum"
DstPort 1
}
}
}
Block {
BlockType Selector
Name "Select first\nElement A"
Ports [1, 1]
Position [440, 331, 480, 369]
InputType "Vector"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
IndexIsStartValue off
}
Block {
BlockType Selector
Name "Select first\nElement B"
Ports [1, 1]
Position [440, 711, 480, 749]
InputType "Vector"
ElementSrc "Internal"
Elements "1"
RowSrc "Internal"
Rows "1"
ColumnSrc "Internal"
Columns "1"
IndexIsStartValue off
}
Block {
BlockType RelationalOperator
Name "Stimulate A1"
Position [235, 142, 265, 173]
Operator "=="
InputSameDT off
LogicOutDataTypeMode "Boolean"
LogicDataType "uint(32)"
ZeroCross off
}
Block {
BlockType RelationalOperator
Name "Stimulate A2"
Position [235, 502, 265, 533]
Operator "=="
InputSameDT off
LogicOutDataTypeMode "Boolean"
LogicDataType "uint(32)"
ZeroCross off
}
Block {
BlockType Constant
Name "Stimulus Trigger Times"
Position [15, 247, 120, 273]
BackgroundColor "lightBlue"
NamePlacement "alternate"
Value "stimtimes"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "-1"
FramePeriod "inf"
}
Block {
BlockType UnitDelay
Name "Unit Delay A"
Position [475, 186, 515, 234]
NamePlacement "alternate"
SampleTime "-1"
}
Block {
BlockType UnitDelay
Name "Unit Delay B"
Position [480, 546, 520, 594]
NamePlacement "alternate"
SampleTime "-1"
}
Block {
BlockType Outport
Name "Stimulate A"
Position [855, 108, 885, 122]
IconDisplay "Port number"
BusOutputAsStruct off
}
Block {
BlockType Outport
Name "Sync"
Position [865, 468, 895, 482]
Port "2"
IconDisplay "Port number"
BusOutputAsStruct off
}
Line {
SrcBlock "Select first\nElement B"
SrcPort 1
DstBlock "Compare\nTo Zero A1"
DstPort 1
}
Line {
SrcBlock "Select first\nElement A"
SrcPort 1
DstBlock "Compare\nTo Zero A"
DstPort 1
}
Line {
SrcBlock "Compare\nTo Zero A1"
SrcPort 1
Points [140, 0; 0, -250]
DstBlock "Enable B"
DstPort 2
}
Line {
SrcBlock "Enable B"
SrcPort 1
DstBlock "Sync"
DstPort 1
}
Line {
SrcBlock "Compare\nTo Zero A"
SrcPort 1
Points [150, 0; 0, -230]
DstBlock "Enable A"
DstPort 2
}
Line {
SrcBlock "Enable A"
SrcPort 1
DstBlock "Stimulate A"
DstPort 1
}
Line {
SrcBlock "Unit Delay B"
SrcPort 1
DstBlock "Element selector\n B"
DstPort 1
}
Line {
SrcBlock "Unit Delay A"
SrcPort 1
DstBlock "Element selector A"
DstPort 1
}
Line {
SrcBlock "Element selector\n B"
SrcPort 1
Points [65, 0; 0, -190; -460, 0; 0, 105]
DstBlock "Stimulate A2"
DstPort 1
}
Line {
SrcBlock "Data B"
SrcPort 1
Points [265, 0]
Branch {
Points [0, 110]
DstBlock "Select first\nElement B"
DstPort 1
}
Branch {
DstBlock "Element selector\n B"
DstPort 2
}
}
Line {
SrcBlock "Event Counter B"
SrcPort 1
DstBlock "Unit Delay B"
DstPort 1
}
Line {
SrcBlock "Stimulate A2"
SrcPort 1
Points [70, 0]
Branch {
Points [0, -55]
DstBlock "Enable B"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "Event Counter B"
DstPort 1
}
}
Line {
SrcBlock "Element selector A"
SrcPort 1
Points [65, 0; 0, -190; -460, 0; 0, 105]
DstBlock "Stimulate A1"
DstPort 1
}
Line {
SrcBlock "Stimulus Trigger Times"
SrcPort 1
Points [215, 0]
Branch {
Points [0, 90]
DstBlock "Select first\nElement A"
DstPort 1
}
Branch {
DstBlock "Element selector A"
DstPort 2
}
}
Line {
SrcBlock "Event Counter A"
SrcPort 1
DstBlock "Unit Delay A"
DstPort 1
}
Line {
SrcBlock "Model Time Step"
SrcPort 1
Points [70, 0]
Branch {
Points [0, 360]
DstBlock "Stimulate A2"
DstPort 2
}
Branch {
DstBlock "Stimulate A1"
DstPort 2
}
}
Line {
SrcBlock "Stimulate A1"
SrcPort 1
Points [70, 0]
Branch {
Points [0, -55]
DstBlock "Enable A"
DstPort 1
}
Branch {
Points [0, 50]
DstBlock "Event Counter A"
DstPort 1
}
}
}
}
Block {
BlockType Constant
Name "Sync Times"
Position [60, 42, 165, 68]
BackgroundColor "lightBlue"
Value "synctimes"
VectorParams1D on
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "-1"
FramePeriod "inf"
}
Block {
BlockType Constant
Name "Time and Indexes of stimulus \ncombination and "
"intensity"
Position [75, 162, 180, 188]
BackgroundColor "lightBlue"
NamePlacement "alternate"
Value "switchtimes"
VectorParams1D off
SamplingMode "Sample based"
OutDataTypeMode "uint32"
OutDataType "sfix(16)"
ConRadixGroup "Use specified scaling"
OutScaling "2^0"
SampleTime "-1"
FramePeriod "inf"
}
Block {
BlockType UnitDelay
Name "Unit Delay1"
Position [105, 403, 140, 437]
Orientation "left"
NamePlacement "alternate"
SampleTime "-1"
}
Line {
SrcBlock "DAQ Frame\n(8-sample)"
SrcPort 2
DstBlock "Network Transmit "
DstPort 5
}
Line {
SrcBlock "DAQ Frame\n(8-sample)"
SrcPort 3
DstBlock "+-5V 12bit"
DstPort 1
}
Line {
SrcBlock "+-5V 12bit"
SrcPort 1
DstBlock "Saturate at 8bit"
DstPort 1
}
Line {
SrcBlock "Mux"
SrcPort 1
DstBlock "Statistical Information"
DstPort 1
}
Line {
SrcBlock "Saturate at 8bit"
SrcPort 1
DstBlock "Network Transmit "
DstPort 6
}
Line {
SrcBlock "Sync Times"
SrcPort 1
DstBlock "Stimulus Timer1"
DstPort 1
}
Line {
SrcBlock "Serial Command Timer"
SrcPort 1
Points [0, -5]
DstBlock "Send Serial Command"
DstPort 1
}
Line {
SrcBlock "Serial Command Timer"
SrcPort 2
DstBlock "Send Serial Command"
DstPort 2
}
Line {
SrcBlock "Serial Command Timer"
SrcPort 3
Points [0, 5; 125, 0]
Branch {
DstBlock "Send Serial Command"
DstPort 3
}
Branch {
Points [0, 220]
DstBlock "Network Transmit "
DstPort 3
}
}
Line {
SrcBlock "Stimulation electrodes Configurations"
SrcPort 1
Points [25, 0]
DstBlock "Serial Command Timer"
DstPort 2
}
Line {
SrcBlock "Time and Indexes of stimulus \ncombination and "
"intensity"
SrcPort 1
Points [25, 0]
DstBlock "Serial Command Timer"
DstPort 1
}
Line {
SrcBlock "DAQ Frame\n(8-sample)"
SrcPort 1
DstBlock "Network Transmit "
DstPort 4
}
Line {
SrcBlock "Network Transmit "
SrcPort 1
DstBlock "Mux1"
DstPort 1
}
Line {
SrcBlock "Network Transmit "
SrcPort 2
DstBlock "Mux1"
DstPort 2
}
Line {
SrcBlock "Network Transmit "
SrcPort 3
DstBlock "Mux1"
DstPort 3
}
Line {
SrcBlock "Network Transmit "
SrcPort 4
DstBlock "Mux1"
DstPort 4
}
Line {
SrcBlock "Network Transmit "
SrcPort 5
DstBlock "Mux1"
DstPort 5
}
Line {
Labels [1, 0]
SrcBlock "Mux1"
SrcPort 1
DstBlock "Mux"
DstPort 1
}
Line {
SrcBlock "Unit Delay1"
SrcPort 1
Points [-50, 0; 0, 170]
DstBlock "DAQ Frame\n(8-sample)"
DstPort 1
}
Line {
SrcBlock "Stimulus Intensitiy (mV) Configurations"
SrcPort 1
Points [25, 0]
DstBlock "Serial Command Timer"
DstPort 3
}
Line {
SrcBlock "Serial Command Timer"
SrcPort 4
Points [0, 10]
DstBlock "Send Serial Command"
DstPort 4
}
Line {
SrcBlock "DAQ Frame\n(8-sample)"
SrcPort 5
Points [145, 0; 0, 50]
DstBlock "Activity Monitor1"
DstPort 1
}
Line {
SrcBlock " "
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Stimulator"
DstPort 1
}
Branch {
Points [0, 275]
Branch {
DstBlock "Network Transmit "
DstPort 1
}
Branch {
Points [0, 80]
DstBlock "Unit Delay1"
DstPort 1
}
}
}
Line {
SrcBlock "Stimulus Timer1"
SrcPort 1
DstBlock " "
DstPort 1
}
Line {
SrcBlock "Stimulus Timer1"
SrcPort 2
Points [45, 0; 0, -15]
DstBlock " "
DstPort 3
}
Line {
SrcBlock "Detect\nChange"
SrcPort 1
DstBlock "Network Transmit "
DstPort 2
}
Line {
SrcBlock "Model\nTimestep"
SrcPort 1
DstBlock "Stimulus Timer1"
DstPort 2
}
}
}
MatData {
NumRecords 3
DataRecord {
Tag DataTag2
Data " %)30 . , 8 ( ! % "
"\" 0 0 "
}
DataRecord {
Tag DataTag1
Data " %)30 . 8 8 ( 0 % "
"\" $ ! 0 . , 8 ( ! % \" $ "
"$ 0 0 0 4V]R= "
}
DataRecord {
Tag DataTag0
Data " %)30 . , 8 ( !@ % "
"\" 0 ) "
}
}
# Finite State Machines
#
# Stateflow Version 6.5 (R2006b) dated Aug 8 2006, 21:09:58
#
#
Stateflow {
machine {
id 1
name "meart_target_60"
created "22-Feb-2007 12:36:39"
isLibrary 0
firstTarget 14
sfVersion 65014000
}
chart {
id 2
name "Network Transmit /UDP Buffered Packet Send/Transmit Logic"
windowPosition [356.813 254.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
decomposition CLUSTER_CHART
type EML_CHART
firstData 6
chartFileNumber 2
disableImplicitCasting 1
eml {
name "fcn"
}
}
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
type FUNC_STATE
decomposition CLUSTER_STATE
eml {
isEML 1
script "function [send_packet,send_sync,ack] = fcn(rcv_sync,rcv_v"
"alid,packsize,dv)\n"
"% Transmit Synchronization logic - State controller for the"
" Target application \n"
"% that controls transmission of a contigyous stream of da"
"ta from to the host.\n"
"%\n"
"% Acknowledge\n"
"%\n"
"%SYC_RESEND - This value defines how many cycles to wait f"
"or an ACK before \n"
"% re-transmitting a packet. The actual resend period is a"
"n integer multiple \n"
"% of the sample period of this block. \n"
"% Recommendation - it should > 1 and less than the packet "
"size. \n"
"% If your packet size is 100, I'd recommend a value of aro"
"und 20. But the optimum value will\n"
"% depend on many factors, such as sample period, network l"
"oading, \n"
"% network bandwidth, host loading, host latency etc. \n"
"%\n"
"% States - \n"
"% WAIT_DV(0) - This is our initial state and means we're w"
"aiting for our\n"
"% a packet to be ready for transmission. In this state,"
" we ignore all\n"
"% received stuff and simply wait for a complete packet t"
"o be ready. \n"
"%\n"
"% WAIT_ACK(1) - Waiting for an acknowledgement.\n"
"%\n"
"persistent timer;\n"
"persistent sync; \n"
"persistent state;\n"
"\n"
"% How many time steps should we wait before re-transmitting"
" a packet? If this\n"
"% value is too small, we can reduce overall channel bandwid"
"th by sending unncessary\n"
"% copies of the same data. If it is too large, we risk ove"
"rflowing the FIFO due\n"
"% to a temporary network blockage. \n"
"% Empirically, this \n"
"% Initialization\n"
"syc_resend = double(packsize./2);\n"
"\n"
"if isempty(state),\n"
" state = 1;\n"
" sync = 1; \n"
" timer = 0;\n"
"end\n"
"% Waiting for first packet to be ready to go!\n"
"% In this mode, we ignore all received data. \n"
"% Don't bother with timer, (nothing to resend). \n"
"switch state,\n"
"case 1, % WAIT_DV\n"
" if dv, % Still waiting!\n"
" timer = 0;\n"
" send_sync = uint32(sync);\n"
" send_packet = 1;\n"
" ack = logical(0);\n"
" state = 2;\n"
" else % Data is ready, send it and move to the next stat"
"e... \n"
" send_sync = uint32(0);\n"
" send_packet = 0;\n"
" ack = logical(0); \n"
" end\n"
"otherwise \n"
"%case 2, % WAIT_ACK\n"
" if (rcv_valid == 1) && (sync == rcv_sync), %Got an ack,"
" and it's correct !!! \n"
" % I can't send anything on this cycle, because I'm "
"still holding\n"
" % the previous value\n"
" sync = sync + 1; % move to the next sync integer\n"
" send_sync = uint32(0);\n"
" send_packet = 0;\n"
" ack = logical(1);\n"
" state = 1;\n"
" else % Still waiting of a valid ack\n"
" timer = timer + 1;\n"
" if timer >= syc_resend,\n"
" send_sync = uint32(sync); % resend the same sy"
"nc/data...\n"
" send_packet = 1;\n"
" ack = logical(0);\n"
" timer = 0;\n"
" else \n"
" send_sync = uint32(0);\n"
" send_packet = 0;\n"
" ack = logical(0);\n"
" end\n"
" end\n"
"end"
editorLayout "100 M4x1[281 147 826 761]"
treatIntsAsFixpt 0
}
}
junction {
id 4
position [23.5747 49.5747 7]
chart 2
linkNode [2 0 0]
subviewer 2
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
}
data {
id 6
name "send_packet"
linkNode [2 0 7]
scope OUTPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
}
complexity SF_COMPLEX_INHERITED
}
dataType "inherited"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
complexity SF_COMPLEX_INHERITED
}
data {
id 7
name "rcv_sync"
linkNode [2 6 8]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
primitive SF_UINT32_TYPE
}
}
dataType "uint32"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
}
data {
id 8
name "rcv_valid"
linkNode [2 7 9]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
primitive SF_DOUBLE_TYPE
}
complexity SF_COMPLEX_INHERITED
}
dataType "double"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
complexity SF_COMPLEX_INHERITED
}
data {
id 9
name "packsize"
linkNode [2 8 10]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
method SF_INHERITED_TYPE
}
complexity SF_COMPLEX_INHERITED
}
dataType "inherited"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
complexity SF_COMPLEX_INHERITED
}
data {
id 10
name "send_sync"
linkNode [2 9 11]
scope OUTPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
primitive SF_UINT32_TYPE
}
complexity SF_COMPLEX_INHERITED
}
dataType "uint32"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
complexity SF_COMPLEX_INHERITED
}
data {
id 11
name "dv"
linkNode [2 10 12]
scope INPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
primitive SF_BOOLEAN_TYPE
}
}
dataType "boolean"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
}
data {
id 12
name "ack"
linkNode [2 11 0]
scope OUTPUT_DATA
machine 1
props {
array {
size "-1"
}
type {
primitive SF_BOOLEAN_TYPE
}
}
dataType "boolean"
fixptType {
slope 1
baseType SF_INT16_TYPE
}
}
instance {
id 13
name "Network Transmit /UDP Buffered Packet Send/Transmit Logic"
machine 1
chart 2
}
target {
id 14
name "sfun"
description "Default Simulink S-Function Target."
machine 1
linkNode [1 0 15]
}
target {
id 15
name "rtw"
codeFlags " comments=1 statebitsets=1 databitsets=1 emitlogicalops=1 el"
"seifdetection=1 constantfolding=1 redundantloadelimination=0"
" preservenames=0 preservenameswithparent=0 exportcharts=0"
machine 1
linkNode [1 14 0]
}
}