The United States Department of Energy defines Microgrid as a group of interconnected loads and distributed energy resources within clearly defined electrical boundaries that acts as a single controllable entity with respect to the grid. A microgrid can connect and disconnect from the grid to operate in grid-connected or islanded mode. This attribute of microgrid is of key importance in the real-time simulations performed for distribution feeder system. The problem statement is to simulate a microgrid connected distribution feeder model in controller hardware in loop and implement grid connected and islanded mode use-cases for 61850-GOOSE protocol using OpenFMB framework. The feasibility of configuring analog inputs and outputs of simulation in Protection and Control (P&C) Intelligent Electronic Device (IED) and communicate data to Remote Terminal Unit (RTU) using 61850-GOOSE protocol is researched and evaluated. The contribution of this thesis is embedded in converting RTU output data into respective understandable language for HILs subscriber and publisher block. To perform this operation, a new North American Energy Standard interoperability framework known as Open Field Message Bus (OpenFMB) is used. The validation of protection and performance of real-time grid following and forming mode in a microgrid with 800kW of Distributed Energy Resources is the overall purpose of this work.