Using 24V ground when using internal pull-up resistor

Is this 24V output an NPN open-collector output? It would need to be to allow
direct connection. Anything else and an opto-coupler is probably the simplest
robust solution.

If the grounds cannot be commoned, again opto-coupler...