MATLAB: Do I lose the connection between the host and target PC while running a model with File Scope Blocks in xPC Target 4.3 (R2010a)

Simulink Real-Time

I am trying to run a model containing File Scope blocks using xPC target 4.3 (R2010a).
I am using TCP/IP to connect to the target. The files created by the File Scope block is anywhere between 10MB and 100MB.
However, when I try to stop the target, the connection is lost and I receive the following error message.
??? Error using ==> xpcgate
TCP/IP Connect Error
Error in ==> C:\Program
Files\MATLAB\R2010a\toolbox\rtw\targets\xpc\xpc\@xpctarget\@ftp\get.p>get
at 13
Connection Failed. Please check Communication settings
The only way to re-establish the connection is to re-boot the target. This sometimes causes the target files to be lost.

Best Answer

The model on the target can be stopped without the host by pressing "C" on the target keyboard, then typing "stop" to stop the model.
The TCP/IP timeout probably happens when you try to retrieve the files generated by the File Scope blocks. Large amount of data causes TCP/IP timeout. Increasing the communication timeout should resolve the issue.
To increase the communication timeout from the host machine, refer to the code below.
tg.CommunicationTimeOut % Get the current value of the communication timeout.
tg.CommunicationTimeOut = 30 % Set a new value for the communication timeout.