Renewable energy generating units (REGNs) are widely used in microgrids (MGs). REGNs can reduce the operating cost of a MG; they also affect the operating states of the connected grids, especially the voltages. The larger the power generation of REGNs, the greater the impact on voltage of MGs. Therefore, the power generation of a REGN in a MG should be limited for the grid security. In the current study the binary search method is employed to determine the maximum power generation of REGNs in an islanded MG considering the current and voltage limits. The algorithm for determining the maximum power generation of a REGN without violating the current and voltage limits is presented. The practical applicability of the presented algorithm is demonstrated using an example MG with a 380V radial distribution feeder. Simulation results are also presented and discussed in this paper.