58
S:\agilent\8920\8920b\PRGGUIDE\BOOK\CHAPTERS\measrslt.fb
Chapter 2, Methods For Reading Measurement Results
Background
Background
One of the most common remote user interface operations performed on an
Test Set is to query and read a measurement result. Gene rally, this operation is
accomplished by sending the query command to the Test Set, followed
immediately by a request to read the requested measurement result. Using
Hewlett-Packard Rocky Mountain BASIC (RMB) language, this operation would
be written using the OUTPUT and ENTER command as follows:
OUTPUT 714;"MEAS:RFR:POW?"
ENTER 714;Power
Using this programming structure, the control program will stay on the ENTER
statement until it is satisfied - that is - until t he Test Set has returned the requested
measurement result. This structure works correctly as long as the Test Set returns
a valid measurement result. If, for some reason, the Test Set does not return a
measurement result, the control program becomes “hung” on the ENTER
statement and program execution effectively stops.
In order to prevent the control program from becoming “hung” programmers
usually enclose the operation with some form of timeout function. The form of the
timeout will of course depend upon the programming language being used. The
purpose of the timeout is to specify a fixed amount of time that the control
program will wait for the Test Set to re turn the reque sted re sult. Aft er this time has
expired the control program will abandon the ENTER statement and try to take
some corrective action to regain control of the Test Set.
If the control program does not send the proper commands in the proper sequence
when trying to regain control of the Test Set, unexpec ted operation will result.
When this condition is encountered, power must be cycled on the Test Set to
regain control.