Limiting range on controller

Hopefully this isn’t confusing when I explain it. One of the groups in my class is trying to build a linear slid mechanism on their robot. It works great, but when they use it with a controller if they move the slide to far in either direction it breaks the mechanism. I am trying to figure out a way to code their controller that will limit the slides range of motion in either direction so that they don’t have to worry about it breaking.

Any help would be greatly appreciated.

Hi @Ted_Kinczkowski! This sounds like a really interesting mechanism :smiley:

Would you be able to provide any pictures of it so we can better understand the mechanism? Thank you!