Init function with the App designer

조회 수: 11 (최근 30일)
Berend-Peter van Aalderen
Berend-Peter van Aalderen 2020년 5월 29일
댓글: Vidhathri LNU 2020년 6월 30일
Good afternoon,
I am trying to run a simulink model from the app designer. Through a normal mfile the simulink model runs without issues. I put all my numbers now in an interface and a few lookup tables in a InitFcn. The problem is when I run the model through the app the following error appears
Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 335)
Error while evaluating Button PrivateButtonPushedFcn.
Error using Q...../RunmodelButtonPushed (line 99)
Error evaluating 'InitFcn' callback of block_diagram 'quartercar_airspring_V11'.
Callback string is 'Data_read'
Caused by:
Error using Q......./RunmodelButtonPushed (line 99)
Matrix dimensions must agree.
Is there an issue when I have a callback initfcn in my simulink model when I use it through the app designer? I could not find anything about this on the internet or in the help section.
I would be greatful for help.
Kind regards
Berend
  댓글 수: 1
Vidhathri LNU
Vidhathri LNU 2020년 6월 30일
There shouldn't be any issue in running a Simulink model with callback through app designer. Does your model work outside of app designer after introducing the callback? From the error message posted, it seems like 'initFcn' is causing the issue.

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by