An oil filling machine for diesel locomotives with distributed control systems is introduced.The function of the system and the principles are described.The hardware and software of control system are discussed.Last a experiment result of control system