Processor-in-the-loop Arduino simulation with double data type

12 visualizaciones (últimos 30 días)
Kaloyan Yordanov
Kaloyan Yordanov el 22 de Jun. de 2018
Comentada: CHELLAKHI ABDELKHALEK el 30 de Dic. de 2023
I want to perform processor in the loop simulations of a subsystem (controller) in my model on an Arduino Uno board. I successfully generate a PIL block, however I run into the following error message when I start the simulation:
Data type "double" is not supported for SIL or PIL execution with the current target configuration. This is because the host size (8 bytes) and target size (4 bytes) do not match. To avoid this error, do not use this data type at the component interface.
I've tried using the single precision conversion tool with no effect and also tried surrounding the subsystem with the respective conversion blocks.

Respuestas (2)

Gayatri Menon
Gayatri Menon el 26 de Jun. de 2018
Hi,
Could you try adding data conversion block inside the subsystem and delete the folders that contain the generated code before trying again.
Thanks
Gayatri
  4 comentarios
Yuan Qi
Yuan Qi el 27 de Jun. de 2018
I solved it by changing the default parameter behavior to Inlined and the parameter structure to NonHierarchical.
CHELLAKHI ABDELKHALEK
CHELLAKHI ABDELKHALEK el 30 de Dic. de 2023
where you are doing this?
can you provide more information please.

Iniciar sesión para comentar.


Piyush Kadkol
Piyush Kadkol el 13 de Oct. de 2018
Hi Yuan, I tried changing the Default Parameter Behaviour to Inlined and Parameter Structure to NonHierarchical, but am still getting the error. Could you suggest anymore changes that are needed to be done to overcome this problem? Thanks!
  1 comentario
Jose GL
Jose GL el 30 de Mzo. de 2019
Hi!
I've the same problem with TI MCU.
The block that you will converter in PIL block has double data type, you need to changue all data type from double to single.
Regards

Iniciar sesión para comentar.

Categorías

Más información sobre Arduino Hardware en Help Center y File Exchange.

Productos


Versión

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by