headcode
A code used to distinguish classes of train for the benefit of signalmen, formerly by using white oil lamps (or white discs) placed on brackets on the front of the locomotive. The various lamp positions defined the class of train.
headcode: locomotive identity signal for signalmen
A headcode is a visual identifier displayed on the front of a locomotive to tell signalmen what class of train is approaching. Before radio communication and electric signalling displays, this was the only way a signal operator could know whether an express passenger train, a stopping train, a freight train, or an empty stock movement was coming down the line. The information determined which route the signalman would set and which signals to clear.
The traditional system used oil lamps mounted in brackets on the locomotive's smokebox or buffer beam. Different combinations of lamp positions, typically arranged in rows, represented different train classes. A two-lamp horizontal arrangement might indicate an express passenger service; a diagonal arrangement might show a stopping passenger train; a single central lamp could mean freight. The signalman read these codes from a distance during day or night. Most railways developed their own coding schemes, so a three-lamp vertical arrangement on the Great Western Railway meant something different than the same arrangement on the London and North Eastern Railway.
As railways grew busier and faster, reliability became critical. Oil lamps were unreliable in bad weather, could be obscured by steam or smoke, and required constant maintenance. Many railways moved to illuminated discs or destination boards showing place names or numbers instead. By the mid-twentieth century, electronic headcodes displayed as numbers on illuminated panels became standard on modern services. A four-digit number entered by the driver could be read by automatic lineside readers and transmitted directly to signal boxes, eliminating the need for signalmen to interpret lamps at all.
Modern headcode systems
Contemporary railways use electronic headcodes that communicate with automatic train protection and signalling systems. The headcode is no longer a visual code on the locomotive but a data message sent ahead of the train. On heritage railways and preserved lines, original oil lamp and disc headcodes are still maintained as part of the operating tradition, though they serve historical interest rather than practical signalling function.
The term persists in railway operations even where the physical apparatus has vanished. Signallers and drivers still refer to a train's headcode when discussing routing and scheduling, though modern systems have abstracted it into a purely informational identifier rather than a visual display. Understanding headcode history is essential for anyone studying how railways managed traffic without computers or modern communications.