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

조회 수: 2 (최근 30일)
Thomas Marullo
Thomas Marullo 2017년 5월 11일
댓글: Thomas Marullo 2017년 5월 16일
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?

답변 (1개)

Ankit Bhatnagar
Ankit Bhatnagar 2017년 5월 15일
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
Thomas Marullo
Thomas Marullo 2017년 5월 16일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Target Computer Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by