Hi Hassan,
it would be probably best to contact technical support with this question. There are multiple reasons why the real-time kernel might not be able to allocate a hardware timer resource, which is most probably the issue you are seeing. If you want someone here to try to answer, please post at least the version of MATLAB you are running and the operating system (including its version) you are running it on.
Best Regards, Jan
