Setting custom system target file fails in R2018a

3 views (last 30 days)
Our custom system target file for code generation has among other things this setting:
rtwgensettings.SelectCallback = 'valmetdna_select_callback_handler(hDlg, hSrc)';
The valmetdna_select_callback_handler.m file:
function valmetdna_select_callback_handler(hDlg, hSrc)
% Solver
slConfigUISetVal(hDlg, hSrc, 'Solver', 'FixedStepDiscrete');
slConfigUISetVal(hDlg, hSrc, 'SolverMode', 'SingleTasking');
slConfigUISetVal(hDlg, hSrc, 'StopTime', 'Inf');
% Optimization/Signals and Parameters
slConfigUISetVal(hDlg, hSrc, 'InlineParams', 'on');
% Data Import/Export
slConfigUISetVal(hDlg, hSrc, 'SaveTime', 'off');
slConfigUISetVal(hDlg, hSrc, 'SaveOutput', 'off');
slConfigUISetVal(hDlg, hSrc, 'SignalLogging', 'off');
% Diagnostics/Sample Time
slConfigUISetVal(hDlg, hSrc, 'InheritedTsInSrcMsg', 'none');
% Code Generation/General
slConfigUISetVal(hDlg, hSrc, 'GenCodeOnly', 'on');
% Code Generation/Interface
slConfigUISetVal(hDlg, hSrc, 'SupportNonFinite', 'off');
slConfigUISetVal(hDlg, hSrc, 'GRTInterface', 'off');
slConfigUISetVal(hDlg, hSrc, 'MatFileLogging', 'off');
% Valmet DNA
slConfigUISetEnabled(hDlg, hSrc, 'DnaLicenseName', false);
end
The following error messages appear in the Matlab Command Window when the target is selected in the Model Configuration Parameters dialog.
Warning: Reference to non-existent field 'popupstrings'.
> In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)
Reference to non-existent field 'popupstrings'.
Error in configset.internal.data.ParamStaticData/createFromTLC
Error in configset.internal.data.ParamStaticData
Error in configset.internal.data.ConfigSetAdapter/setupTLC
Error in configset.dialog.HTMLView/prepareData
Error in configset.dialog.HTMLView/refresh
Error in configset.internal.data.ConfigSetAdapter/refresh
Error in configset.internal.data.ConfigSetAdapter/update
Error in configset.internal.data.ConfigSetAdapter/callback
Error in configset.internal.data.ConfigSetAdapter/setupListener>@(varargin)obj.callback(varargin{:})
Warning: Error occurred while evaluating listener callback.
> In slConfigUISetVal
In valmetdna_select_callback_handler (line 4)
In stfInitTarget>loc_eval (line 137)
In stfInitTarget (line 118)
In RTW.TargetBrowser/uploadTarget
In targetBrowserCloseCB
In rtwprivate (line 16)
Steps to repeat problem: 1) Open new model File -> New -> Blank Model. 2) Open Simulation -> Model Configuration Parameters -> Code Generation 3) Select the custom target.
This code generation target has worked ok before. The issue came with R2018a update.

Accepted Answer

Jussi Peltonen
Jussi Peltonen on 15 Jun 2018
The problem was solved by adding line
rtwoptions(Idx).popupstrings = '';
to each index in the tlc file.

More Answers (0)

Categories

Find more on Manual Performance Optimization 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!