assuming you have the KJD17
a N/C E-stop switch can be wired between the KJD17 terminals A1 and 24 to remotely switch off the KJD17 and kill the mains supply to the machine
if you find a 2 pole N/C plus N/C E -stop switch instead of the more usual N/C plus N/O you find on the likes of E-bay
the second N/C contact can signal an E-stop to the PC
this has the advantage that a brocken wire to the PC N/C E-stop will be detected
using a N/O contact works but does not detect a broken wire !!
(some E-stop switches are available as the push button mechanism that you have to buy the individual N/C or N/O switches but they are usually more expensive )
see page 12
https://docs.rs-online.com/3897/0900766b816e95d8.pdf
John