How to get a large data set into an xPC Target model

1 visualización (últimos 30 días)
Thomas Marullo
Thomas Marullo el 11 de Mayo de 2017
Comentada: Thomas Marullo el 16 de Mayo de 2017
I want to add a large data set into my xPC Model so it can pull from it every step as the input but run for a long time. So I tried using a From Workspace block and the size of my data is 165000x40 and results in a Out Of Physical Memory error and Corrupted File on my xPC system when I try to load it. But the Simulation runs just fine in Simulink. The DLM file is 25MB so it's not a really large file, but I believe this block and variable is the problem. Is there any other way to get large data into xPC and use it like a From Workspace block where it is time-based?

Respuestas (1)

Ankit Bhatnagar
Ankit Bhatnagar el 15 de Mayo de 2017
Hi,
There isn't a way to use a disc or file to save the data for the xPC target. xPC target goes out of memory as 165000*40*64 bites is more than the memory it has.
One thing you can try is to typecast this value as int32 as double requires 64 bits and use it in your target PC. Although certain blocks like scope do require variables to be in double format, you may need to check.
  1 comentario
Thomas Marullo
Thomas Marullo el 16 de Mayo de 2017
Thank you for your answer. I like the int32 idea and I will try it.
My xPC system has 8GB of RAM. The DLM file is 110 MB large. Assuming the lookup table data goes into RAM, 165000*40*64 = 422,400,000 bytes or 422MB. Where am I running of memory?

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by