Thanks to both of you darrel and henrik ...

By the night I will be done with my pid rpm controller unit ...
Thanks to henrik's code which helped me so much with my projects ..
I modified his code to suit my rpm controller