This paper demonstrates the functionality of a power electronics based energy management system (EMS). An EMS can optimize the use of energy sources and energy storage systems in microgrids. It can provide an intelligent interface with the main grid when the microgrid is connected, and it makes the microgrid fault tolerant by providing power to critical loads when the main power source fails. The EMS presented in this paper is developed on a digitally controlled power electronics system which can act as a current source or a voltage source depending on the situation. The EMS functionality is demonstrated by modeling, simulations and experimental measurements.