Error in initialization code of simulink PID controller block when running standalone application

4 views (last 30 days)
I have a simulink model with several discrete PID controller blocks. Running the model in Matlab (r2023a) works fine.
I have created an app (using app designer) which runs the above model. This was then succesfully compiled to a standalone executable with a few warnings. Below is the PackagingLog.html:
Preparing Runtime...
mcc -o EVSIM4DESIGN -W 'WinMain:EVSIM4DESIGN,version=0.1.0' -T link:exe -d C:\Users\green\Documents\GitHub\EVSIM4DESIGN\App_designer\EVSIM4DESIGN_compiler\for_testing -v C:\Users\green\Documents\GitHub\EVSIM4DESIGN\App_designer\EVSIM4DESIGN.mlapp -a C:\Users\green\Documents\GitHub\EVSIM4DESIGN\MotionS_toolbox\util\src\units\baseUnitSystem.m -a C:\Users\green\Documents\GitHub\EVSIM4DESIGN\MotionS_toolbox\util\src\units\displayUnits.m -r 'C:\Program Files\MATLAB\R2023a\toolbox\compiler\packagingResources\default_icon.ico'
Compiler version: 8.6 (R2023a)
Analyzing file dependencies.
Warning: '<a href="matlab:slprivate('open_and_hilite_port_hyperlink', 'hilite', ['AddaxVehicle/HV BATTERY'], 'Inport', 2);">Input Port 2</a>' of '<a href="matlab:open_and_hilite_hyperlink ('AddaxVehicle/HV BATTERY','error')">AddaxVehicle/HV BATTERY</a>' is not connected.
Warning: '<a href="matlab:slprivate('open_and_hilite_port_hyperlink', 'hilite', ['AddaxVehicle/HV BATTERY'], 'Outport', 4);">Output Port 4</a>' of '<a href="matlab:open_and_hilite_hyperlink ('AddaxVehicle/HV BATTERY','error')">AddaxVehicle/HV BATTERY</a>' is not connected.
Warning: Unconnected output line found on '<a href="matlab:open_and_hilite_hyperlink ('AddaxVehicle/VCU/Subsystem/Unused//Test block/Switch','error')">AddaxVehicle/VCU/Subsystem/Unused//Test block/Switch</a>' (output port: 1)
Warning: Unconnected input line found on '<a href="matlab:open_and_hilite_hyperlink ('AddaxVehicle/VCU/Subsystem/Unused//Test block/Saturation','error')">AddaxVehicle/VCU/Subsystem/Unused//Test block/Saturation</a>' (input port: 1)
Warning: Unconnected input line found on '<a href="matlab:open_and_hilite_hyperlink ('AddaxVehicle/VCU/Subsystem/Unused//Test block/Switch','error')">AddaxVehicle/VCU/Subsystem/Unused//Test block/Switch</a>' (input port: 3)
Warning: Unconnected input line found on '<a href="matlab:open_and_hilite_hyperlink ('AddaxVehicle/VCU/Subsystem/Unused//Test block/Switch','error')">AddaxVehicle/VCU/Subsystem/Unused//Test block/Switch</a>' (input port: 2)
Warning: Your deployed application may fail because file or folder paths
not present in the deployed environment may be included in your MATLAB startup
file. Use the MATLAB function "isdeployed" in your MATLAB startup file to
determine the appropriate execution environment when including file and folder
paths, and recompile your application.
Warning: In "C:\Users\green\Documents\GitHub\EVSIM4DESIGN\MotionS_toolbox\elec\MDTiM_FW_Elec.slx", "Simulink.Mask, gcb" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
Parsing file "C:\Users\green\Documents\GitHub\EVSIM4DESIGN\App_designer\EVSIM4DESIGN.mlapp"
(referenced from command line).
Generating file "C:\Users\green\Documents\GitHub\EVSIM4DESIGN\App_designer\EVSIM4DESIGN_compiler\for_testing\readme.txt".
Packaging...
Creating the bundle...
Self contained installer created at C:\Users\green\Documents\GitHub\EVSIM4DESIGN\App_designer\EVSIM4DESIGN_compiler\for_redistribution\MyAppInstaller_mcr.exe.
Packaging complete.
Elapsed packaging time was: 56 seconds.
When now running the standalone application, I get following error in the app:
"An error occured while running the initialization code for the block '.../PID Controller': Unable to resolve the name pidpack.PIDConfig.maskInitilization."
According to the followng two links, the PID Controller block should be compatible with Simulink Compiler:
How could I solve this issue?
Kind regards,
Niels

Answers (0)

Categories

Find more on Schedule Model Components 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!