Borrar filtros
Borrar filtros

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

10 visualizaciones (últimos 30 días)
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 comentario
Tim King
Tim King el 11 de Mayo de 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

Iniciar sesión para comentar.

Respuesta aceptada

Tim King
Tim King el 11 de Mayo de 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 :) )

Más respuestas (0)

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by