Is it possible to have certain motors not go past a certain degree

If you scroll slightly down from the vexforum website, you can find a tutorial I have built explaining pid, how to code it, and how to tune it.