The expansion of electric microgrids has led to the incorporation of new elements and technologies into the power grids, carrying power management challenges and the need of a well-designed control architecture to provide efficient and economic access to electricity. This paper presents the development of a flexible hourly day-ahead power dispatch architecture for distributed energy resources in microgrids, with cost-based or demand-based operation, built up in a multi-class Python environment with SQLExpress and InfluxDB databases storing the dispatcher and microgrid data, and its experimental implementation using Modbus communication. The experimental power dispatch architecture is described and each operation stage is detailed, including the considered mathematical models of the energy resources, the database management, the linear-programming optimization of power dispatch, and the Modbus setpoint writing. Validation studies of the proposed control system are presented for real-time digital-simulated devices and physical resources as a real application at the Universidad Pontificia Bolivariana (UPB) campus microgrid. The simulated and physical microgrid characteristics are described and the hourly dispatch results for generation, storage and load devices are presented, standing out as a reliable power management architecture for economic commitment and load peak shaving in simulated and real microgrids. The proposed architecture demonstrates its readiness for present and future electrical system challenges, effectively incorporating meteorological variations, renewable energy sources, and power demand fluctuations into the control framework, with a strong dependence on the quality of the meteorological forecast.