You don't have to create anything on your own. Go to PID Controller block in Simulink, double click it, open PID Advanced part of it. Check Limit output part and then the Anti-windup method will become visible. Then, you can choose clamping as a method. Hope this helps.
The PID controller uses the Saturation block. If you don't want a Saturation block, or if your max and min are dynamic, you need to roll your own. The logic is something like,
if(in>max); out=max; elseif(in<min); out=min; else; out=in; end
This logic could be put in a subsystem using any of the following:
* relative operators & Switches * relative operators, Enabled Subsystems, Merge * if block, If-Action subsystems, Merge,
and then your subsystem could be a block in your custom library...you could find it useful again.