Double powering relay
You MUST add a current limiting resistor as shown below: -

The value depends on the type of isolator you are using but, from 24 volts, 2k2 is probably going to be OK. It can be fitted in series with pin 1 or pin 2.