Using pull down resistor?
The sensor model E3JK-R2M2 2M has a single-pole dual-throw relay output. You do not need a pulldown resistor. You can apply a &quot;digital high&quot; voltage level to one contact of the relay (black or gray, according to the datasheet). A &quot;digital low&quot; to the other, and connect the common (white) to your computer. The relay output will then alternate between high and low.
Whatever &quot;digital high&quot; and &quot;digital low&quot; means in this context depends on the signal levels your computer input expects too see.
Do note that relay contacts may bounce during switchover. If you cannot compensate for this in software you'll have to research &quot;hardware switch debouncing&quot;.