If you have never used the I/O board I would look at
this to set it up.
After you configure it, it should show up in your Dashboard like
so.
Which should easily be able to be added into your code using the appropriate methods for you language. Ex.
Labview
E-stop also offers a nice breakout for it, if you don't want to make your own.(Which is what I am currently trying!)
http://www.andymark.com/product-p/am-0543.htm