63
Chapter 2, Methods For Reading Measurement Results
HP® BASIC ‘ON TIMEOUT’ Example Program
360 Exit the Measure function and return the res ul t value.
370 The following lines of code handle the case where the request for a measurement
result has timed out.
380 Set up a timeout for any I/O activity on the GPIB while the control program is
trying to regain control of the Test Set. This will allow the function to gracefully
stop program execution if the control program cannot regain control of the Test
Set. This timeout should only occur if there is some type of hardware failure,
either in the Test Set or the external controller, which preven ts them from
communicating via GPIB.
390 Send a Selected Device Clear (SDC) to the Test Set to put the GPIB subsystem
into a known state. This allows the control program to regain programmatic
control of the Test Set.
400 Command the Test Set to abort the currently executing measurement cycle. Set
the trigger mode back to repetitive retriggerin g . Setting the Test Set back to
repetitive retriggering will be implementation dependent.
410 Re-enable event initiated branching. If any event initiated branches were logged
while the Measure function was executin g they will be executed when system
priority permits.
420 Exit the Measure function and return a result value of 9.E+99.
430 The following lines of code handle the case where the control program cannot
regain control of the Test Set. The acti ons taken in this section of the code will be
implementation dependent. For the example case a message is displayed to the
operator and the program is stopped.
440 Display a message to the operator tha t the control program cannot regain cont rol
of the Test Set.
450 Stop execution of the control program.
Table 7 Comments for Measure Function from ON TIMEOUT
Example Program (Continued)
Program Line
Number Comments