Problem using field of structure parameter as constant block value.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
After creating a structure parameter like this:
FTIP = Simulink.Signal;
FTIP.CoderInfo.StorageClass = 'ExportedGlobal';
FTIP.DataType = 'Bus: FTIPBus';
FTIP.Complexity = 'Real';
FTIP.Dimensions = 1;
FTIP.DimensionsMode = 'Fixed';
FTIP.SamplingMode = 'Sample based';
FTIP.InitialValue = 'FTIPStruct';
I can display a field in the matlab command window like this:
FTIP_Param.Value.Gain1
ans = 10
But when I use the same 'FTIP_Param.Value.Gain1' as the value of a constant block I get the error: 'Structure field Value not found'
0 Kommentare
Antworten (1)
Mark McBroom
am 12 Nov. 2017
You didn't state this, but I assume that RTIP_Param is a Simulink.Parameter? If so, try using RTIP_Param.Gain1. In this case, the "Value" is not needed when accessing the data object.
Siehe auch
Kategorien
Mehr zu Event Functions finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!