Or close at full speed until the encoder reads 10 and then go at slower speed until the switch is triggered. Reset the encoder to zero at the switch.
Or close at full speed until the encoder reads 10 and then go at slower speed until the switch is triggered. Reset the encoder to zero at the switch.