For npn MJE13007 transistor, I connect the collector to the 24V relay, the other end of the relay to 24V positive, the emitter to negative, and the base to the 1K resistor to the optocoupler output. The microcontroller outputs a high level signal every second, and the relay works normally.
But I connect the collector to the positive pole, the emitter to one end of the relay, and the other end of the relay to 24V negative, and the base is input high, the relay just doesn't work. .
Master, where is the problem with my line? Theoretically speaking, it is impossible for a triode to control only the negative electrode but not the positive electrode.

Does anyone know why? Thanks for the help!