A typical solenoid valve works by creating a magnetic field after receiving an electric current, which prompts the valve to open or close. In an engine with a diesel fuel shut-off solenoid, the solenoid is connected to the main electrical system of the machine. It receives an electrical current from the battery, which prompts the solenoid valve to open, allowing diesel fuel to run from the gas tank to the engine.
When working properly, a shut-off solenoid transports diesel fuel from the fuel line to the solenoid though an inlet pipe. At the entrance of this inlet pipe is a rubber stopper held in place by a metallic spring attached to the back of it and a metal bar running perpendicular from the stopper to a metal pin located near the solenoid coil. When the solenoid valve creates a magnetic field as a result of an electric current, it causes the pin to retreat, pulling the stopper from the inlet pipe. With the stopper removed, fuel is free to run from the fuel line to the engine. What differentiates a diesel fuel shut-off solenoid from a regular solenoid, however, is its ability to receive and interpret signals from the main electrical system.
The main electrical system of the machine monitors the temperature and mechanical fluctuations of the engine, and can therefore detect malfunctions and unusually high temperatures. When the electrical system detects that something went wrong with the machine, it interrupts the electrical current sent to the solenoid valve, prompting the spring to push the stopper back into the inlet pipe. When the valve closes, it prevents diesel fuel from reaching the engine, causing the engine to stop.