User`s manual

58 Chapter 2
O:\Manuals\E6380A_Progguid\Book\Measrslt.fm
Methods For Reading Measurement Results
RMB ‘MAV’ Example Program
RMB ‘MAV’ Example Program
The following RMB example program demonstrates a technique that
can be used in situations where a 32.767 measurement result time-out
value is not adequate.
Measurement result time-out value is defined to mean the amount of
time the control program is willing to wait for the Test Set to return a
valid measurement result to the control program.
The technique uses the MAV (Message Available) bit in the Test Set’s
HP-IB Status Byte to determine when there is data in the Output
Queue. A polling loop is used to query the Status byte. The time-out
duration for returning the measurement result is handled by the
polling loop. An HP-IB interface activity time-out is also set up to
handle time-outs resulting from problems with the HP-IB interface.
Lines 10 through 230 in this example set up a measurement situation
to demonstrate the use of the recommended technique. The
recommended technique is exampled in the Measure Function.
NOTE
Lines 50 and 60 should be included in the beginning of all control
program. These lines are required to ensure that the Test Set is
properly reset. This covers the case where the program was previously
run and was stopped with the Test Set in an error condition.