# :MEASure:HORizontal:FREQuency

Frequency Commands

- :MEASure:HORizontal:FREQuency
- :MEASure:HORizontal:FREQuency:EDIRection
- :MEASure:HORizontal:FREQuency:FAVorite
- :MEASure:HORizontal:FREQuency:LOCation?
- :MEASure:HORizontal:FREQuency:OCCurrences
- :MEASure:HORizontal:FREQuency:REGion
- :MEASure:HORizontal:FREQuency:SOURce
- :MEASure:HORizontal:FREQuency:STATus?
- :MEASure:HORizontal:FREQuency:STATus:DETails?
- :MEASure:HORizontal:FREQuency:STATus:REASon?
- :MEASure:HORizontal:FREQuency:UREFerence:STATe
- :MEASure:HORizontal:FREQuency:UREFerence:VALue

## Command Syntax

    :MEASure:HORizontal:FREQuency

## Query Syntax

    :MEASure:HORizontal:FREQuency?

## Description

Performs a frequency measurement on NRZ waveforms. Moves the frequency measurement to the top of the Results table. Displays the measurement if it is not already shown on the table. The query form of the command returns the measured value. The frequency of the first complete cycle on the screen is measured using the mid-threshold levels of the waveform (50% levels if standard measurements are selected). Sources can be any displayed waveform, waveform memory, or function. For example, CHAN1_1, WMEMory1, or FUNCtion1. Use `:MEASure:TBASe:GENeral:METHod` to change the definition of the waveform's top/base. Use `:<waveform>:THReshold:GENeral:METHod` to change the definition of the waveform's threshold.

## Example Command Sequence

    :MEASure:HORizontal:FREQuency:SOURce CHAN2_1
    :MEASure:HORizontal:FREQuency
    :MEASure:HORizontal:FREQuency?

## Measurement Ready?

To confirm that the measurement is ready to read, you can query the measurement's status:

    if ('CORR' in Infiniium.query(':MEASure:HORizontal:FREQuency:STATus?')):
    	measurement = Infiniium.query(':MEASure:HORizontal:FREQuency?')

If averaging is turned on (`:ACQuire:SMODe AVERage`), you can also confirm if the measurement result is ready by comparing the number of specified averages (`:ACQuire:COUNt?`) versus the number of measurement sweeps that have occurred (`:ACQuire:COUNt?`). The technique uses the `:COUNt?` common measurement query. For example,

    if (Infiniium.query(':MEASure:HORizontal:FREQuency:COUNt?') >= Infiniium.query(':ACQuire:COUNt?')):
    	measurement = Infiniium.query(':MEASure:HORizontal:FREQuency?')

You can also use an acquisition limit test to test that a number of waveforms or samples have completed before returning a measurement. Refer to the `:LTESt:ACQuire:CTYPe` command.

## Querying Measurement Results and Statistics

You can query measurement results using the `:MEASure:HORizontal:FREQuency?` query after making the proper instance settings.

If a measurement is installed into Results table (using the `:MEASure:HORizontal:FREQuency` command) and you have made the proper instance settings, you can query statistics using common child queries.

Also, you can query measurement results and statistics directly from the Results table (without having to make the proper instance settings beforehand). See Querying Measurement Results and Statistics.