With the min at top and the max at bottom?
This was written for a rotary but should work for a linear as well (ignore the bad quote formatting by the forum software and see the original post):
Perfect, that solves my issue.