Memory issues with xPC Target
显示 更早的评论
Hello all,
I am running a data acquisition and robot control program in simulink/xPC Target. It is a simple PID based on some force data, and I am recording (1kHz) 3 joint angles and 8 analog inputs for my analysis of the program. My data are then 11 columns and 10,000 rows - quite reasonable. Every time I run the simulation, the result is an "out of memory" error.
The computer is a 2.8GHz P4 with 2.5Gb RAM and 500Gb HD running Win 7 and Matlab R2009a with xPC 4.2.
For data collection, I am storing each set in an array and have attempted multiple saving techniques including ToFile (saving as a .mat), scope (saves to workspace), out blocks (saves to workspace), and Host/Target scopes (while saving to workspace). In each of these cases I receive the same error "out of memory" following the successful completion of a 10s program, even with a decimation of 10.
Watching the resource monitor during and following execution, it is obvious that the program is running up the RAM, but it does NOT use all of the RAM labeled "Free". I have also followed all other instructions on these help pages to no avail:
http://www.mathworks.com/support/tech-notes/1100/1107.html (Matlab detects 1255MB free and 5128MB in the page file)
I'm wondering these things:
Is there some way that I may be inadvertently running up the data?
Is there is a more efficient way to save data on the fly instead of at the end of a trial (an absolutely ridiculous way to do things if you ask me)?
Does anyone have some insight into a potential issue with this version of Matlab or xPC Target?
Thank you!
1 个评论
Arnaud Miege
2011-4-21
It's not clear whether the problems you are having are on the host (simulation) or on the target (real-time execution). Are you talking about storing data on the target or on the host? They are two different things and the techniques for getting round memory issues are different.
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!