Documentation

xPCSetSampleTime

Change real-time application sample time

Prototype

void xPCSetSampleTime(int port, double ts);

Arguments

port

Enter the value returned by the function xPCOpenTcpIpPort.

ts

Sample time for the real-time application.

Description

The xPCSetSampleTime function sets the sample time, in seconds, of the real-time application to ts. Use this function only when the application is stopped.

Note

Some blocks produce incorrect results when you change their sample time at run time. If you include such blocks in your model, the software displays a warning message during model build. To avoid incorrect results, change the sample time in the original model, and then rebuild and download the model.

Introduced before R2006a

Was this topic helpful?