Reference to non-existent field 'xData'

6 views (last 30 days)
Arthur Fieuws
Arthur Fieuws on 11 Feb 2016
Commented: Arthur Fieuws on 18 Feb 2016
I use a model called 'demonstration' on Simulink/dSpace made by someone else a few years ago (we use version R2009a). When I try to incremental build, this Model error appears: "Error building Real-Time Workshop target for block diagram 'demonstration'. MATLAB error message: Error due to multiple causes: --> Reference to non-existent field 'xData'. --> Error in 'demonstration/Wind speed': Initialization commands cannot be evaluated."
Subsequently I tried to click on the signal builder block 'Wind speed', but then the following error appears: "Error due to multiple causes: -->Reference to non-existent field 'xData'. -->Error evaluating 'OpenFcn' callback of Sigbuilder block block (mask) 'Wind speed'. Reference to non-existent field 'xData'."
Does anyone have a clue what's going wrong here? I thank you very much.
EDIT: this is the code of the block 'Wind speed':
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
}
}
}
  5 Comments
Walter Roberson
Walter Roberson on 11 Feb 2016
XData is commonly a property of graphic objects, not a field. However, if the code did something like,
s = get(SomeHandle);
then if it tried to access s.XData when SomeHandle had no XData property then that would be an attempt to access a field rather than attempting to access a property.
We would need to dig into the code to really see.
Arthur Fieuws
Arthur Fieuws on 18 Feb 2016
Edited: Arthur Fieuws on 18 Feb 2016
@Kirby @Walter Hi, I think this is the code you mean? (this is the code for the problem causing block 'Wind speed') Strange enough there is no trace of '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
}
}
}

Sign in to comment.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 12 Feb 2016
It is most likely due to compatibility issues between different versions of Simulink version. You might be using R2009a to open a model that is created by a Simulink version later than R2009a. SignalBuilder block is a masked block. It does contain some graphical element. If there is no other error, you can drag the SignalBuilder block from your Simulink library and try to duplicate the parameters. Otherwise, I would advise to find out the version difference and try to use a newer version if possible.
  5 Comments
Fangjun Jiang
Fangjun Jiang on 18 Feb 2016
If you can open the SignalBuilder block in R2015a, just open it and see what type of signals are there. I assume "Wind speed" is just one signal. Then drag a new SignalBuilder block in R2009a and duplicate the signal. This would be the easiest way to resolve the issue. As last attempt, could yo check if you need a workspace variable called "tuvar"? It is specified in the model text you copied.
Arthur Fieuws
Arthur Fieuws on 18 Feb 2016
Thank you, I think that worked, although the code is slightly different.

Sign in to comment.

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!