📄 testbcirobotcommsrx_noextmode.mdl
字号:
MaskValueString "3"
System {
Name "Heartbeat (TX)"
Location [118, 498, 710, 652]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Gain
Name "'x'"
Position [190, 65, 220, 95]
Gain "double('x')"
}
Block {
BlockType ZeroOrderHold
Name "0.1 s"
Position [280, 61, 315, 99]
SampleTime "0.1"
}
Block {
BlockType DiscretePulseGenerator
Name "3 seconds"
Position [25, 63, 70, 97]
PulseType "Time based"
Period "3"
PulseWidth "0.2"
}
Block {
BlockType Constant
Name "Constant"
Position [125, 30, 155, 60]
Orientation "left"
ShowName off
Value "0"
}
Block {
BlockType Constant
Name "Constant1"
Position [125, 100, 155, 130]
Orientation "left"
ShowName off
}
Block {
BlockType SubSystem
Name "FreePortComms_TX"
Tag "MC9S12Target_FreePortCom"
Ports [1]
Position [380, 29, 540, 131]
AncestorBlock "mc9S12tool/Send user data"
FontSize 12
ShowPortLabels off
TreatAsAtomicUnit off
MaskHelp "helpview('C:\\Documents and Settings\\fworn"
"le\\My Documents\\frank\\_cProgs\\Motorola\\rtmc9S12_CW_R13\\bin\\mc9S12.map'"
", 'mc9S12_FPRXD_In_blkref')"
MaskPromptString "Sample time|Communication port|Baudrate|Cha"
"nnel number|Number of elements|Data Type|Block sends raw data"
MaskStyleString "edit,popup(SCI0|SCI1|COM1|COM2|COM3|COM4),p"
"opup(300|600|1200|2400|4800|9600|19200|38400|57600|115200),edit,edit,popup(SI"
"NGLE|INT8|UINT8|INT16|UINT16|INT32|UINT32|BOOLEAN),checkbox"
MaskTunableValueString "on,on,on,on,on,on,on"
MaskCallbackString "||||||"
MaskEnableString "on,on,on,on,on,on,on"
MaskVisibilityString "on,on,on,off,on,off,on"
MaskToolTipString "on,on,on,on,on,on,on"
MaskVarAliasString ",,,,,,"
MaskVariables "sampletime=@1;port=@2;baudrate=@3;channel=@"
"4;buf_size=@5;data_type=@6;format=@7;"
MaskInitialization "[buf_sizestr, portNamestr, baudratestr, cha"
"nnelstr, data_type_str, sampletime_str] = mbc_freeporttxd(sampletime, port, b"
"audrate, channel, buf_size, data_type, format);\n"
MaskDisplay "fprintf('Transmit %s element(s)\\nComm port"
": %s\\nBaudrate: %s bps\\nChannel: %s\\nData type: %s\\n Sample rate: %s', bu"
"f_sizestr, portNamestr, baudratestr, channelstr, data_type_str, sampletime_st"
"r)"
MaskSelfModifiable on
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
MaskValueString "0.1|SCI1|115200|0|1|UINT8|on"
System {
Name "FreePortComms_TX"
Location [542, 167, 996, 332]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
ZoomFactor "100"
Block {
BlockType Inport
Name "In1"
Position [45, 60, 65, 80]
FontSize 12
}
Block {
BlockType DataTypeConversion
Name "Data Type Conversion"
Position [160, 56, 215, 84]
DataType "uint8"
}
Block {
BlockType "S-Function"
Name "SEND_VIA_FREE_PORT"
Tag "MC9S12target"
Ports [1]
Position [280, 49, 420, 91]
List {
ListType RTWdata
portStr "1"
portNameStr "SCI1"
baudrateStr "115200"
formatStr "1"
}
FontSize 12
FunctionName "freePortComms_txd"
Parameters "sampletime, channel, buf_size, data_typ"
"e, port, baudrate, format"
MaskIconFrame on
MaskIconOpaque on
MaskIconRotate "none"
MaskIconUnits "autoscale"
}
Line {
SrcBlock "Data Type Conversion"
SrcPort 1
DstBlock "SEND_VIA_FREE_PORT"
DstPort 1
}
Line {
SrcBlock "In1"
SrcPort 1
DstBlock "Data Type Conversion"
DstPort 1
}
}
}
Block {
BlockType Switch
Name "Switch"
Position [125, 65, 155, 95]
ShowName off
Criteria "u2 > Threshold"
Threshold "0.5"
InputSameDT off
SaturateOnIntegerOverflow off
}
Line {
SrcBlock "'x'"
SrcPort 1
DstBlock "0.1 s"
DstPort 1
}
Line {
SrcBlock "Switch"
SrcPort 1
DstBlock "'x'"
DstPort 1
}
Line {
SrcBlock "Constant1"
SrcPort 1
Points [-20, 0; 0, -25]
DstBlock "Switch"
DstPort 3
}
Line {
SrcBlock "3 seconds"
SrcPort 1
DstBlock "Switch"
DstPort 2
}
Line {
SrcBlock "Constant"
SrcPort 1
Points [-20, 0; 0, 25]
DstBlock "Switch"
DstPort 1
}
Line {
SrcBlock "0.1 s"
SrcPort 1
DstBlock "FreePortComms_TX"
DstPort 1
}
}
}
Block {
BlockType Constant
Name "L"
Position [305, 254, 425, 276]
Value "[0 0 0 1 1 1 0 0 ]"
ShowAdditionalParam on
OutDataTypeMode "double"
}
Block {
BlockType MultiPortSwitch
Name "Multiport\nSwitch"
Ports [4, 1]
Position [505, 167, 540, 323]
Inputs "3"
ShowAdditionalParam on
zeroidx on
InputSameDT off
}
Block {
BlockType Sum
Name "Sum"
Ports [2, 1]
Position [255, 105, 275, 125]
ShowName off
IconShape "round"
Inputs "|+-"
InputSameDT off
OutDataTypeMode "Inherit via internal rule"
}
Block {
BlockType Constant
Name "dark"
Position [305, 214, 425, 236]
Value "[0 0 0 0 0 0 0 0]"
ShowAdditionalParam on
OutDataTypeMode "double"
}
Block {
BlockType Display
Name "numeric"
Ports [1]
Position [415, 100, 505, 130]
Decimation "1"
}
Block {
BlockType Constant
Name "r"
Position [305, 294, 425, 316]
Value "[0 0 0 0 1 0 1 0]"
ShowAdditionalParam on
OutDataTypeMode "double"
}
Block {
BlockType Display
Name "raw"
Ports [1]
Position [275, 50, 365, 80]
Decimation "1"
}
Line {
SrcBlock "r"
SrcPort 1
DstBlock "Multiport\nSwitch"
DstPort 4
}
Line {
SrcBlock "L"
SrcPort 1
DstBlock "Multiport\nSwitch"
DstPort 3
}
Line {
SrcBlock "dark"
SrcPort 1
DstBlock "Multiport\nSwitch"
DstPort 2
}
Line {
SrcBlock "Sum"
SrcPort 1
DstBlock "0 ... 2"
DstPort 1
}
Line {
SrcBlock "'0'"
SrcPort 1
Points [25, 0]
DstBlock "Sum"
DstPort 2
}
Line {
SrcBlock "FreePortComms_RX"
SrcPort 1
Points [35, 0]
Branch {
DstBlock "Sum"
DstPort 1
}
Branch {
Points [0, -50]
DstBlock "raw"
DstPort 1
}
}
Line {
SrcBlock "0 ... 2"
SrcPort 1
Points [25, 0]
Branch {
DstBlock "numeric"
DstPort 1
}
Branch {
Points [0, 70]
DstBlock "Multiport\nSwitch"
DstPort 1
}
}
Line {
Name "top centre"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 1
DstBlock "Display"
DstPort 1
}
Line {
Name "top right"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 2
DstBlock "Display"
DstPort 2
}
Line {
Name "bottom right"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 3
DstBlock "Display"
DstPort 3
}
Line {
Name "bottom centre"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 4
DstBlock "Display"
DstPort 4
}
Line {
Name "bottom left"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 5
DstBlock "Display"
DstPort 5
}
Line {
Name "top left"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 6
DstBlock "Display"
DstPort 6
}
Line {
Name "centre"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 7
DstBlock "Display"
DstPort 7
}
Line {
Name "dot"
Labels [-1, 1]
SrcBlock "Demux"
SrcPort 8
DstBlock "Display"
DstPort 8
}
Line {
SrcBlock "Multiport\nSwitch"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -