我使用了一个名为'示范'在几年前由其他人制作的Simulink / dSpace(我们使用版本R2009a)。当我尝试增量构建时,会出现此模型错误:
为框图'演示'构建Real-Time Workshop目标时出错。
MATLAB错误消息:由于多种原因导致的错误: - >参考不存在的字段' xData'。 - > '演示/风速'中的错误:无法评估初始化命令。"
随后我尝试单击信号构建器块Wind speed
,但随后出现以下错误:
由于多种原因导致错误:
- >引用不存在的字段' xData'。 - >评估' OpenFcn'回调Sigbuilder块块(掩码)'风速'。引用不存在的字段' xData'。
有没有人知道这里出了什么问题?我非常感谢你。
Block {
BlockType SubSystem
Name "Wind speed"
Tag "STV Subsys"
Ports [0, 1]
Position [295, 275, 370, 315]
CopyFcn "sigbuilder_block('copy');"
DeleteFcn "sigbuilder_block('delete');"
LoadFcn "sigbuilder_block('load');"
ModelCloseFcn "sigbuilder_block('modelClose');"
PreSaveFcn "sigbuilder_block('preSave');"
StartFcn "sigbuilder_block('start');"
StopFcn "sigbuilder_block('stop');"
NameChangeFcn "sigbuilder_block('namechange');"
ClipboardFcn "sigbuilder_block('clipboard');"
OpenFcn "sigbuilder_block('open',[49.5 50.25 519.75 399.75 ]);"
CloseFcn "sigbuilder_block('close');"
MinAlgLoopOccurrences off
PropExecContextOutsideSubsystem off
RTWSystemCode "Auto"
FunctionWithSeparateData off
Opaque off
RequestExecContextInheritance off
MaskHideContents on
MaskType "Sigbuilder block"
MaskInitialization "if ~strcmp(get_param(bdroot(gcb),'SimulationStatus'),'stopped') tuvar = sigbuilder_bloc"
"k('maskInit'); end"
MaskDisplay "plot(0,0,100,100,[10,10,40,40,10],[80,20,20,80,80],[40,10],[50,50], [40,27,10],[65,72,56],[40"
",25,25,10],[28,28,43,43]);"
MaskIconFrame on
MaskIconOpaque off
MaskIconRotate "port"
MaskPortRotate "default"
MaskIconUnits "autoscale"
Port {
PortNumber 1
Name "Vvent"
RTWStorageClass "Auto"
DataLoggingNameMode "SignalName"
}
System {
Name "Wind speed"
Location [480, 93, 1016, 386]
Open off
ModelBrowserVisibility off
ModelBrowserWidth 200
ScreenColor "white"
PaperOrientation "landscape"
PaperPositionMode "auto"
PaperType "A4"
PaperUnits "centimeters"
TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
TiledPageScale 1
ShowPageBoundaries off
ZoomFactor "100"
Block {
BlockType Demux
Name "Demux"
Tag "STV Demux"
Ports [1, 1]
Position [150, 15, 160, 35]
Outputs "1"
}
Block {
BlockType FromWorkspace
Name "FromWs"
Tag "STV FromWs"
Position [30, 300, 115, 350]
VariableName "tuvar"
SampleTime "0"
SigBuilderData "DataTag0"
VnvData "DataTag1"
}
Block {
BlockType Outport
Name "Signal 1"
Tag "STV Outport"
Position [250, 20, 270, 30]
IconDisplay "Port number"
}
Line {
SrcBlock "Demux"
SrcPort 1
DstBlock "Signal 1"
DstPort 1
}
Line {
SrcBlock "FromWs"
SrcPort 1
DstBlock "Demux"
DstPort 1
}
}
}
答案 0 :(得分:0)
问题是我几天前在评论中所期望的那样
信号构建器块出了问题。我怀疑它被一系列更新到新的simulink版本所摧毁并再次降级。
在更新版本中运行模型,它运行时没有错误。还知道大多数dSPACE RTI块根本不支持降级,你可能需要重新创建完整的模型。