MATLAB: Simulink Real Time Workshop – how to measure code execution time

real time workshopsimulink

I have a Simulink model from which I generate code using Real Time Workshop for a Quanser Q8 data acquisition board. How do I measure the actual execution time of my model?

Best Answer

If you are using Quanser's QUARC software to access the Q8, there is also a Computation Time block that is available. This block measures and outputs the computation time of the attached Function Call Subsystem (or model), using a high-resolution independent time source. In Windows, this time has nanosecond resolution.
Related Question