Note Power Supplies can be confusing. It isn't clear what kind of 24V and 5V supplies you have. Firstly they should be separate and isolated. You show one box with both. Maybe you have a PC ATX Power supply? Those have a common GND which is not ideal.
Secondly there are 24V supplies and dual supplies that output both +24V and -24V. It isn't clear what type you have. With a simple single ended +24V supply the "return" pin is sometimes called GND, sometimes called 0V, and sometimes called 24V return, and sometimes called 24V-. So hopefully your Power Supply Pin marked 24V- is really a GND not actually -24V. If you measure the voltage from 24V+ to 24V- do you measure 24V or 48V? (do not connect anything to the power supply before understanding this).
HTH