Program limit switch in Graphical C

I have a student that wants a limit switch on their claw arm. How do we program
A. The remote, so that if they hold the “up button” too long, it won’t damage the gears
B. The autonomous so it will go to the limit and then stop?


Here’s his first thought: