Interface Page 89 of 89
Standard Event Status Register
Decimal
Bit Value Use
7 128 Power Up Since Last Query
6 64 None
5 32 Command Error (Syntax)
4 16 Execution Error (Over Range, etc.)
3 8 None
2 4 Query Error
1 2 None
0 1 Operation Complete
This register is read by executing an “*ESR?” command per paragraph 11.5.1.2.2 (except
no *). Note that this is a destructive read. Reading the register clears it. Each bit of the
Event register must be enabled in order to cause the ESB bit of the Status Register to be
set. This enabling is done in the Standard Event Status Enable Register by issuing an
ESE command per paragraph 11.5.1.3.
3.5.5 IEEE-488 Sample Program (In Quick Basic)
REM $INCLUDE: 'qbdecl.bas'
'declarations
ADAP$ = "GPIB0": G2500$ = "DEV4": V% = 1
W% = 0: C$ = SPACE$(50): d$ = SPACE$(50): C1$ = SPACE$(50): D1$ = SPACE$(50)
STAT$ = SPACE$(50)
'find IEEE card and G2500
CALL IBFIND(ADAP$, GPIB0%)
CALL IBFIND(G2500$, G2500%)
CLS 'clear screen
‘ make sure unit is in stop status
CALL IBWRT(G2500%, "STOP")
'read identification from g2500
CALL IBWRT(G2500%, "*IDN?")
CALL IBRD(G2500%, D1$)
PRINT "Identification =" + D1$
'open a file to store data and status to
20
PRINT "FILE NAME TO STORE RESULT (less than 8 characters)"
INPUT NAME$
IF LEN(NAME$) = 0 THEN NAME$ = "DATA"
IF LEN(NAME$) > 8 THEN GOTO 20
NAME$ = NAME$ + ".TXT"
OPEN NAME$ FOR APPEND AS #1