5 Programming Examples252 Keysight Models 6811C, 6812C, and 6813C Programming GuideHarmonic measurementsThe MEASure and FETCh queries can return the amplitude and phase of up to the50th harmonic of voltage and current. They can also return the total harmonicdistortion in the output voltage or current. For example, to return readings for anindividual harmonic component, use the following commands:MEASure:CURRent:HARMonic:AMPLitude? MEASure:CURRent:HARMonic:PHASe? MEASure:VOLTage:HARMonic:AMPLitude? MEASure:VOLTage:HARMonic:PHASe? Harmonic numbers are related to the programmed frequency of output voltage.Queries sent with an argument of 0 return the DC component. An argument of1 indicates the fundamental frequency, 2 indicates the second harmonic,3 indicates the third, and so on. The maximum harmonic component that can beread is limited by the fundamental measurement bandwidth, which is 12.5 kHz.An error is generated if a query is sent for a harmonic that has a frequency greaterthan 12.5 kHz. To return all the harmonic components with a single query, use thefollowing commands:MEASure:ARRay:CURRent:HARMonic:AMPLitude?MEASure:ARRay:CURRent:HARMonic:PHASe?MEASure:ARRay:VOLTage:HARMonic:AMPLitude?MEASure:ARRay:VOLTage:HARMonic:PHASe?These queries always return 51 data values, from the DC component up to the50th harmonic. Any harmonics that represent frequencies greater than 12.5 kHzare returned as the value 0. To return the percentage of total harmonic distortionin the output voltage or current, use the following commands:MEASure:CURRent:HARMonic:THD?MEASure:VOLTage:HARMonic:THD?