The second harmonic radiation of a single-pass free electron laser (FEL) and its dependence on the second harmonic of the undulator field are investigated. In analysis of properties of materials, the nonlinear generation of the second harmonic as a response to radiation is an important effect. In this context, the second harmonic generation of the radiation source (FEL) is undesirable since it masks the signal being analyzed. Conversely, in other cases, the second harmonic radiation of the FEL can be useful as radiation with a higher frequency. We investigate the possibility of suppression (or, conversely, enhancement) of the FEL second harmonic power depending on the phase and strength of the second harmonic of the FEL undulator field. The proposed approach is independent in principle of the radiation frequency. We consider examples of LCLS and PAL-XFEL in the X-ray range and SPARC and LEUTL in the visible range. The more effective influence of the undulator field harmonic in operation with narrow electron beams is demonstrated.