What control software are you using? E-stop normally uses the in5 pin and limit switches can be linked to the other inputs. depends on what control software you are using as to set up though most are similar.

Michael