In a domain of a safety increasing of railway and road traffic, hydraulic barrier drives installed at level crossings have an important role. Frequent traffic accidents at level crossings, involving road vehicles and trains, are result of inappropriately equipped level crossings with signalling and safety equipment. Limited use of hydraulic barrier drives is the result of complicated adaptation in the process of implementing such systems to the existing infrastructure of some of the equipment manufacturers and railway operators. Hydraulic barrier drive PBH21, which uses a modular architecture, was developed and designed in this paper. Applying modular design principles and functional modeling methods, using functional flow diagrams, PBH21 has ability to adapt on the technologies and infrastructures of other major manufacturers of such equipment within EU countries and other countries in the world that have developed railway infrastructure. Due to the protection of certain design solutions from competition, certain details are not presented in this paper.