sentences:  While the solenoid's magnetic field would be in the opposite direction, the induced ferromagnet in the iron bar would be attracted either way, closing the signal relay regardless of the current flow direction.The solution is to replace the iron with a permanent magnet, and the relay switch is replaced with a double pole switch.Now the permanent magnet senses the field direction and is pushed or pulled.