Function generator is a piece of electronic test equipment used to generate repetitive waveforms. These waveforms can then be injected into a device under test and analyzed as they progress through the device, confirming the proper operation of the device or pinpointing a fault in the device.
Function generators usually generate a triangle waveform as their basic output. The triangle is generated by repeatedly charging and discharging a capacitor from a constant current source. This produces a linearly-ascending or descending voltage ramp. As the output voltage reaches upper and lower limits, the charging and discharging is reversed, producing the linear triangle wave. By varying the current and the size of the capacitor, different frequencies may be obtained.
A 50% duty cycle square wave is easily obtained by noting whether the capacitor is being charged or discharged.
Most function generators also contain a diode shaping circuit that can convert the triangle wave into a reasonably-accurate sine wave.
Function generators, like most signal generators, may also contain an attenuator, various means of modulating the output waveform, and often contain the ability to automatically and repetitively "sweep" the frequency of the output waveform between two operator-determined limits. This capability makes it very easy to evaluate the frequency response of a given electronic circuit.