Chapter 3 Programming Your Universal Counter for Remote Operation

How to Program the Counter to Synchronize Measurements

How to Program the Counter to Synchronize Measurements

Synchronizing Measurement Completion

The Counter has three different methods for synchronizing the end of a measurement and computer transfer of data. The three methods are:

1.Using the *WAI command

2.Using the *OPC? command

3.Using the *OPC command to assert SRQ

The following discussion shows how to use all three methods.

Resetting the Counter and Clearing the HP-IB Interface

Before attempting any programming, it is a good idea to set the Counter to a known state. The following command grouping illustrates how to reset the Counter. Before issuing these commands, execute a device clear to reset the interface and Counter. Consult your interface card ’s documentation for how to issue a device clear since the device clear command will be specific to the interface you are using. Perform the following:

1.Issue a Device Clear. (See your computer or interface card documentation for how to issue this command.)

2.Issue the following commands:

*RST

*CLS *SRE 0 *ESE 0 :STAT:PRES

Using the *WAI Command

This method is most useful when only the Counter is on the bus and you want the Counter to send the data when it is ready. In this example, the Counter is instructed to take 50 measurements and return the statistics for these 50 measurements. After the :INIT command is issued, the Counter is instructed to hold off execution of any more commands by the *WAI command. When the Counter has completed the 50 measurements and statistics, it executes the :CALC3:AVERAGE:ALL? command, which asks for the results.

3-46

Programming Guide

Page 114
Image 114
HP 132A, 53131A manual How to Program the Counter to Synchronize Measurements, Synchronizing Measurement Completion