Init function with the App designer
9 views (last 30 days)
Show older comments
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 Comment
Vidhathri LNU
on 30 Jun 2020
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.
Answers (0)
See Also
Categories
Find more on Simulink Environment Customization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!