Learn how The Perm National Research University in Russia developed a complete hardware-in-the-loop (HIL) simulation system of a microgrid managed by a distributed controller network. This system, used for research and education purposes, heavily relies on the NI PXI platform, reconfigurable FPGA technology and LabVIEW software. R-series FPGA-based input/output modules proved to be an excellent solution for the low-level voltage/current measurements and simulation, while PXI and LabVIEW acted as a flexible and scalable platform for implementing complex hardware configurations combined with mathematical models such as SCADA and HMI.