Restricted mate

How do I create a "mate" that prevents intersection or isrestricted in some sense?

For simplicity, I have a hole in a slab with a rod that has aconcentric mate with the hole. (think of a nail through a piece ofwood or a screw and a hole). The rod is "capped" and I want the capto prevent the rod from going through the plane.

Basically the rod can move in and out of the hole but it isrestricted because of the end cap. As of now I can move the rod butthe cap will go through the slab.

ThanksSolidworksAssemblies