Simulation error in Desktop Realtime.

2 visualizzazioni (ultimi 30 giorni)
Abijith B Menon
Abijith B Menon il 30 Mar 2022
Risposto: Ninad il 24 Gen 2024
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.
with Vehicle Body 3DOF Dual Track.
Thank you!

Risposte (1)

Ninad
Ninad il 24 Gen 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

Community Treasure Hunt

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

Start Hunting!

Translated by