![Agilent Technologies 8719ES Programmer'S Manual Download Page 434](http://html.mh-extra.com/html/agilent-technologies/8719es/8719es_programmers-manual_2867960434.webp)
Chapter 7
7-71
Programming Examples
Measurement Process Synchronization Examples
The error queue will hold up to 20 errors until all the errors are read out or the instrument
is preset. It is important to clear the error queue whenever errors are detected. Otherwise,
old errors may be mistakenly associated with the current instrument state.
Press
and then the unlabeled key several times quickly and watch the display.
The number of errors observed should correspond to the number of times you pressed the
key.
As another example, press
. A complete list of error messages
and their descriptions can be found in your analyzer’s reference guide.
The program is in an infinite loop waiting for errors to occur. End the program by pressing
or
on the controller keyboard.
NOTE
Not all messages displayed by the analyzer are put in the error queue:
operator prompts and cautions are not included.
BASIC Program Listing
10
! This program is an example of using the error queue to detect
20
! errors generated by the analyzer. The status byte is read and
30
! bit 3 is tested to determine if an error exists. The error queue
40
! is printed out and emptied.
50
!
60
! EXAMP4A
70
!
80
ASSIGN @Nwa TO 716
! Assign an I/O path for the analyzer
90
!
100 CLEAR SCREEN
110 ! Initialize the analyzer
120 ABORT 7
! Generate an IFC (Interface Clear)
130 CLEAR @Nwa
! SDC (Selective Device Clear)
140 OUTPUT @Nwa;"OPC?;PRES;"
! Preset the analyzer and wait
150 ENTER @Nwa;Reply
! Read the 1 when complete
160 !
170 DIM Error$[50]
! String for analyzer error message
180 !
190 LOCAL @Nwa
! Release analyzer from remote control
200 !
210 LOOP
! Endless loop to read error queue
220
REPEAT
230
Stat=SPOLL(@Nwa)
! Read status byte with serial poll
240
UNTIL BIT(Stat,3)
! Test for error queue present
250
!
260 !
Error queue bit is set
270
REPEAT
! Loop until error number is 0
280
OUTPUT @Nwa;"OUTPERRO;"
! Request error queue contents
290
ENTER @Nwa;Err,Error$
! Read error number and string
300
PRINT Err,Error$
! Print error messages
310
UNTIL Err=0
! No more errors in queue
320 !
330
LOCAL @Nwa
! Release analyzer from remote
340
BEEP 600,.2
! Beep to attract attention
350 END LOOP
! Repeat error search
360 !
370 END
System
Cal
CORRECTION ON
Reset
Break
Summary of Contents for 8719ES
Page 15: ...1 1 1 Alphabetical Command Reference ...
Page 293: ...2 1 2 Introduction to Instrument Control ...
Page 310: ...3 1 3 GPIB Programming ...
Page 334: ...4 1 4 Reading Analyzer Data ...
Page 343: ...5 1 5 Data Processing Chain ...
Page 350: ...6 1 6 Error Reporting ...
Page 364: ...7 1 7 Programming Examples ...
Page 502: ...A 1 A Preset Conditions ...
Page 517: ...B 1 B Command Listings ...