MATLAB: How does the memory available on xPC Target affect the speed of the application in xPC Target 3.4(R2008a)

memorySimulink Real-Timetargetxpc

I would like to know if the memory (RAM) available to the target PC would affect the speed of the application running on xPC Target.

Best Answer

In a Windows or Linux environment, small memory causes more paging to occur and therefore a larger memory makes a difference in speed. In case of an xPC Target memory size doesn't have any effect on execution as there is no paging involved.
Where memory size does matter is in the maximum size of a model and in how many signals you can log to memory before a wrap. Currently, a model can be up to half the size of memory. During the download phase, enough space to hold the compressed image is allocated as a RAM disk. Then the model is decompressed for execution into a second memory region.
If you have output ports in the top level model, the signal connected to them are routed to the output logging array. By default we allow for 100000 doubles in the logging buffer. That is set on the xPC Target options page of the Real-Time Workshop page of each model's configuration parameters. You can increase that depending on the memory available in the machine after loading the model.