This is a tricky task as there are 2 variables to consider:- speed and time. Trial and error are called for here.
With the motor pinions in the centre, adjust the variables until the motorM4 or Rack at M3 travels to the end of the stroke (a 1/2 run) they then complete 2 full runs and return to the start position.