Hi Omar,
I agree that data checking will definitely be a must and will be implemented in the program.
Attached is the Simulink model that I used to create these issues. It is nothing more than the provided template model with the ‘spiToPi’ data store changed from 255 to 200 as its initial value.