update
after finding more a detailed view of the board
this is the input and output connections on the board
Attachment 404640
with this information the answer to the original question
the e-stop or limit switches are connected between the common DCM terminal and one of the 4 inputs (IN1 to IN4)
the relay board's GND needs to be connected to the motion controller DCM
one of the motion controller open collector outputs (OUT 1 to OUT 4) needs to connect to
one of the relay boards inputs (IN 1 or IN 2)
john