Long story short I'm designing a controller for some industrial equipment. There's a couple of opto-coupled inputs designed to take a non-polarised 24VDC signal, basically just an on-off input, into the micro. When it comes to the particular installation one of the inputs will be connected to a remote timer with a relay output. To get it to work I'll take 24V from the PSU on my controller board and send it up a wire, through that remote relay, and then back into one side of the optocoupler, and then ground the other (to 0V on the PSU).
The PSU I'm using is a small PCB-mount Meanwell with an isolated DC output, which means that presumably the output will be shifted about halfway up the mains voltage relative to earth due to the filter capacitors. Should I tie the 0V/GND output of this PSU to mains earth so that it's not floating at 100 ish volts? Does it matter in this case? What are the considerations when deciding whether to use a floating DC output or tie it to ground? I assume one would be ground loops or stray currents flowing between things, which doesn't apply in this case.
Cheers!