Knowing the location and being able to track trains in real time is of high importance to cus-tomers and train owners. Train planning and scheduling can be optimized if train location is known in real time. An increase in signalling track circuits and signals failures due to signalling cable thefts has had a sig-nificant impact on railway companies delivering services to customers. Thus this paper presents a real time tracking system for locomotives as a secondary/ replacement for track circuits. The system uses 5G as com-munication means to send data between remote train control system and locomotive(s); the location of the train is obtained through GPS, RFID. An artificial neural network is used for processing, switching between the various methods of obtaining location and communicates with remote train control system. The on-board colour light display unit is in sync with signals in the field and it acts as a backup for signals failure. The sys-tem can be used as either a primary or secondary system since it will be incorporated with interlocking. The information of train location will be sent to the relay room for incorporation with interlocking, and sent to centralised traffic control (CTC) through fibre optic or 5G.