How to make a threaded assembly that has limits?

I am making an assembly a snapshot of which I have attached.

I have only set concentric mate and face coinciding mate here.

I want the assembly to rotate along threads when it is moved and stop moving where the threads lock in to each other(the threads end).

How can this be done?

SolidworksAssemblies