You can configure a modern frequency counter to make hundreds of reading per second, which can be useful for characterizing a signal that changes over time. Keep in mind that frequency counters are optimized for measuring a stable or slowly changing signal. Also remember, for making accurate readings, it is better to make a single good reading than trying to average lots of readings. Following are the steps to set up a frequency counter for the fastest measurements. You can use the Keysight 53131A, 53132A and 53181A frequency counter SCPI commands as examples.

Tip 1: Set the counter to a known state.

After sending a reset command, it is a good practice not to send any additional commands until the instrument has come back to a ready state. Adding a wait or delay of 1 second to a program is enough for most instruments to return to a ready state. If the instrument receives a command while it is resetting, the command may be lost.

*RST  ‘Reset the counter, 
           ‘Clear the counter and interface
*CLS  ‘Clear errors and status registers
*SRE 0 ‘Clear service request enable register
*ESE 0 ‘Clear event status enable register
‘Preset enable registers and transition filters
:STATus:PRESet 

Tip 2: Set the output format to match the data type used in the instrument.

This will prevent a delay as the instrument converts the data to a different format during post processing.

:FORMAT ASCII  ‘Data in ASCII format

Tip 3: Make sure all post-processing and printing operations are disabled.

When you disable these functions, the processor dedicates it resources to making the readings and sending them to the computer, rather than responding to extra interrupts, such as updating the display.

:CALC:MATH:STATE OFF
:CALC2:LIM:STATE OFF
:CALC3:AVER:STATE OFF
:HCOPY:CONT OFF
:ROSC:SOUR INT
:ROSC:EXT:CHECK OFF
‘Disable automatic interpolator calibration
:DIAG:CAL:INT:AUTO OFF
‘Turn off display 
:DISP:ENABLE OFF

Tip 4: Tell the counter the expected frequency.

The 53131A, 53132A, and 53181A have the ability to optimize their configuration based on the frequency you are measuring. For faster measurements, use the command "FREQ:EXP1.<value>" to tell the counter the expected frequency. The actual signal being measured must be within 10% of the value you provide in the command

:FUNC "FREQ 1"  ‘Measure Frequency
:FREQ:EXP1 10000000 ‘Set Expected Frequency

Tip 5: Set the trigger level.

The input signal will create a trigger condition as it passes through the level set in the command. Set the trigger level so that it intersects the signal at its maximum slew rate. The input signal will be is changing at its fastest rate and will minimize the amount of time it takes to satisfy the trigger condition. A sine or a square wave has the maximum slew rate at the zero crossing (assuming a 0V offset).

:EVENT1:LEVEL 0  ‘Set trigger level to 0V

Tip 6: Set up triggering to make immediate readings.

When instruments use dual-level triggering, both triggering conditions must be met before a reading can be made. For the 53131A, 53132A, and 53181A, setting the trigger arm condition to immediate will satisfy the first level of triggering. You can set the trigger event to a request for reading with the "*DDT #15FETC?" command. Using this trigger condition eliminates the need to send a bus trigger or a FETCH? command for each reading.

*DDT #15FETC?   ‘Decrease number of bytes
                                ‘transferred over bus
                                ‘Immediate Arming
:FREQ:ARM:STAR:SOUR IMM
:FREQ:ARM:STOP:SOUR TIM

You can also download a Visual Basic program to set up the counter for the fastest readings. The Visual Basic program allows several different types of triggering, and it configures the counter to operate in the fastest mode possible for each triggering mode. For the fastest possible readings, select the option that sets both the start and stop trigger to IMMEDIATE.