R2022a, Failed to evaluate mask initialization Caused by: Too many input arguments

24 visualizzazioni (ultimi 30 giorni)
This code worked in R2019b and R2020b, but does not in R2022a:
set_param('pathofblock/name_of_blockwithmask','RAM_type',RAM_type); % RAM_type is either 'BRAM' or 'URAM'
Error in 'pathofblock/name_of_blockwithmask': Failed to evaluate
mask initialization commands.
Caused by:
Too many input arguments.
  1 Commento
Tim King
Tim King il 11 Mag 2023
after looking into it further I found that R2022a has wrapped the intialization code in another function that doesn't include the arguments I had in my function...
R2019b version of mask code:
init_foo(gcb,...
RAM_type,RAM_type_prev)
R2022a version (converted by matlab when i opened model in R2022a):
% Initialization code section
function initialization()
init_foo(gcb,...
RAM_type,RAM_type_prev)
end
% Parameter callback section

Accedi per commentare.

Risposta accettata

Tim King
Tim King il 11 Mag 2023
I found the problem!
I was calling...
add_block('Simulink/Commonly Used Blocks/Subsystem',[sys '/' subsystem_name ]); %add subsystem
and with R2022a this capital 'S' is no longer recognized, you must use the small 's'.
(in R2020b and before this capital 'S' worked fine, I guess the folks at mathworks no longer like Tower of Power :) )

Più risposte (0)

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Tag

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by