Simulation error in Desktop Realtime.
2 views (last 30 days)
Show older comments
Hi All,
I'm trying to simulate an 4 wheeler autonoumous vehicle in Desktop Realtime and i'm having issues in simulating it. The model is working fine when running in simulation, but is having error only in Desktop Realtime. Also, the model is a fixed time step model.
The error that it shows is: Cannot generate a reusable function for Subsystem block 'BEV_LAT_OWN_v10/<< Synthesized_Atomic_Subsystem_For_Alg_Loop_2_Task_0 >>'. This subsystem is fed by the Ground block 'BEV_LAT_OWN_v10/Lateral Controller - Stanley/Vehicle Body 3DOF Dual Track1/Fh Ground' that has a nonscalar output signal. Either replace the Ground block with a Constant block having all zero values or modify the 'Function packaging' setting of the Subsystem block to Inline or Function.
If I change the Ground block to a constant block and give Zero as value then another error pops up saying: Error in 'BEV_LAT_OWN_v10/Lateral Controller - Stanley/Vehicle Body 3DOF Dual Track1': Failed to evaluate mask initialization commands.
Caused by:
- Dot indexing is not supported for variables of this type.
I'm not very familiar with MATLAB and would like to have your help in solving such an error. It would be really beneficial.
The reference model that I'm using is: https://in.mathworks.com/matlabcentral/fileexchange/63823-matlab-and-simulink-racing-lounge-vehicle-modeling
with Vehicle Body 3DOF Dual Track.
Thank you!
0 Comments
Answers (1)
Ninad
on 24 Jan 2024
Hi Abijith,
As per my understanding, you are simulating a fixed time step model of a 4-wheeler autonomous vehicle in Desktop Realtime and getting the following error:
Cannot generate a reusable function for Subsystem block 'BEV_LAT_OWN_v10/<< Synthesized_Atomic_Subsystem_For_Alg_Loop_2_Task_0 >>'. This subsystem is fed by the Ground block 'BEV_LAT_OWN_v10/Lateral Controller - Stanley/Vehicle Body 3DOF Dual Track1/Fh Ground' that has a nonscalar output signal. Either replace the Ground block with a Constant block having all zero values or modify the 'Function packaging' setting of the Subsystem block to Inline or Function.
I noticed that you already tried replacing the Ground block with a Constant block with all zeros and it failed.
You can also modify the "Function packaging" setting of the Subsystem block to Inline or Function. To do so, please refer the following MATLAB Documentation, "Function Reuse in Generated Code": https://in.mathworks.com/help/rtw/ug/reusing-functions-in-generated-code.html
Hope this helps.
Regards
Ninad
0 Comments
See Also
Categories
Find more on Target Computer Setup 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!