Effacer les filtres
Effacer les filtres

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

10 vues (au cours des 30 derniers jours)
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 commentaire
Tim King
Tim King le 11 Mai 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

Connectez-vous pour commenter.

Réponse acceptée

Tim King
Tim King le 11 Mai 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 :) )

Plus de réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Tags

Produits


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by