Distributed photovoltaics interfere with continuous power generation after grid connection. In the face of the failure of a single module, the current grid-connected control system needs to readjust system parameters to flexibly adapt to equipment operating conditions. Therefore, this paper is researching a photovoltaic power generation grid-connected control system based on PLC. In the hardware part, PLC is used to complete power generation control, monitoring MCU, data acquisition, control, and other modules. In the software part, the grid-connected state is optimized and controlled according to the distributed photovoltaic output power and the remaining energy storage capacity. The PLC is the execution center, which will control the on-off state of the equipment switch after the data operation. The experimental results show that the designed system can optimally control the power generation and energy storage units according to the power change, reduce the cost of electricity consumption through the adjustment of charge and discharge, reduce the IO usage rate, and improve the concurrent response ability of users. The design system not only guarantees the quality and efficiency of photovoltaic grid connection but also realizes rapid networking and independent tracking of power points to meet the requirements of flexible communication.