MATLAB: Does the execution time show a jerky behavior when the model is run using XPCEXPLR in xPC Target 4.0 (R2008b)

Simulink Real-Time

I run a model on a target using XPCEXPLR. However, when I notice the execution time on the target screen, it has a jerky behavior. i.e. it appears as if the time is updating in bursts.

Best Answer

This is an expected behavior in xPC Target 4.0 (R2008b) and is caused due to the operating system giving precedence to the xPC Target Explorer over the target execution.
There are two possible workarounds for this behavior:
1. The first one is to disable the refresh rate from the tools menu of xPC Target Explorer window. To do this, execute the following steps:
xPCTarget Explorer -> Tools -> Disable refresh
2. The second workaround is to disconnect the target machine using the xPC target explorer window while the model is running on the target.