필터 지우기
필터 지우기

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

조회 수: 11 (최근 30일)
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
Tim King
Tim King 2023년 5월 11일
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

댓글을 달려면 로그인하십시오.

채택된 답변

Tim King
Tim King 2023년 5월 11일
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 :) )

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by