Borrar filtros
Borrar filtros

Why do I get "Error: struct contains references from non-struct array object" when building my S-Function in Simulink Real-Time?

1 visualización (últimos 30 días)
Hi, I was trying to generate an S-function from a the 'Car_block.slx' for execution in Simulink Real-Time 2017b (the reason for not using newer version is that NI DAQs are not supported anymore in newer versions, and it would be great to see them back).
When doing the build and saving the block for previous versions (2017b), I obtain something like 'block_2017_car_atomic.slx'
Then, in order to be able to compile in 2017b, then I make the mex 'Car_block_sf.mexw64' with the sentence proveded in 'mexgenerator.m': mex -R2017b Car_block_sf.c Car_block_sfcn_rtw\rtGetNan.c Car_block_sfcn_rtw\rtGetInf.c
Finally, I try to run the 'block_2017b_car_atomic.slx' and I have no errors when simulating in the machine. Yet, when compiling to Simulink Real-Time (slrt.tlc), it appears to me the following error:
Error: Error detected: Struct contents reference from a non-struct array object.
.
Please, could you tell me why is this happening to me, and what should I do to be able to run my code in Simulink Real-Time 2017b?
Appart from that, would you be so kind to tell me if there is another way to use 'Vehicle Body 3DOF Dual Track' block (introduced in 'Vehicle Dynamics Blockset' in 2018a) in 2017b? As saving for previous version replaces blocks for empty subsystems.
Thanks a lot for your time and attention.
  2 comentarios
Iker Pacho Fernández
Iker Pacho Fernández el 29 de Jul. de 2022
Sorry, but which variable? The diagnostics page doesn’t tell me which variable is causing the error. Only a point is appearing (.)

Iniciar sesión para comentar.

Respuestas (1)

Ayush
Ayush el 27 de Dic. de 2023
I understand that you are facing the error: struct contains references from non-struct array object
Thanks!

Categorías

Más información sobre Simulink Functions en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by