Method 2: Homing on the positive limit switch and index pulse
Using this method the initial direction of movement is rightward if the positive limit switch is inactive
(here shown as low). The position of home is at the first index pulse to the left of the position where
the positive limit switch becomes inactive.