
FSE
Programming Examples
1065.6016.12
7.5
E-16
Reading out the status event registers, the output buffer and the error/event queue is effected in
subroutines.
REM -------- Subroutines for the individual STB bits ------
Outputqueue:
’Reading the output buffer
Message$ = SPACE$(100)
’Make space for response
CALL IBRD(analyzer%, Message$)
PRINT "Message in output buffer :"; Message$
RETURN
Failure:
’Read error queue
ERROR$ = SPACE$(100)
’Make space for error variable
CALL IBWRT(analyzer%, "SYSTEM:ERROR?")
CALL IBRD(analyzer%, ERROR$)
PRINT " Error text :"; ERROR$
RETURN
Questionablestatus: ’Read questionable status register
Ques$ = SPACE$(20) ’Preallocate blanks to text variable
CALL IBWRT(analyzer%, "STATus:QUEStionable:EVENt?")
CALL IBRD(analyzer%, Ques$)
PRINT "Questionable Status:"; Ques$
RETURN
Operationstatus: ’Read operation status register
Oper$ = SPACE$(20) ’Preallocate blanks to text variable
CALL IBWRT(analyzer%, "STATus:OPERation:EVENt?")
CALL IBRD(analyzer%, Oper$)
PRINT "Operation Status:"; Oper$
RETURN
Esrread: ’Read event status register
Esr$ = SPACE$(20) ’Preallocate blanks to text variable
CALL IBWRT(analyzer%, "*ESR?") ’Read ESR
CALL IBRD(analyzer%, Esr$)
IF (VAL(Esr$) AND 1) > 0 THEN PRINT "Operation complete"
IF (VAL(Esr$) AND 4) > 0 THEN GOTO Failure
IF (VAL(Esr$) AND 8) > 0 THEN PRINT "Device dependent error"
IF (VAL(Esr$) AND 16) > 0 THEN GOTO Failure
IF (VAL(Esr$) AND 32) > 0 THEN GOTO Failure
IF (VAL(Esr$) AND 64) > 0 THEN PRINT "User request"
IF (VAL(Esr$) AND 128) > 0 THEN PRINT "Power on"
RETURN
REM **********************************************************************
REM ------------- Error routine ----------------
Error handling:
PRINT "ERROR ’Output error message
STOP ’Stop software
Содержание 1065.6000.20
Страница 3: ......
Страница 5: ......
Страница 17: ......
Страница 57: ...Contents Description of Commands FSE 1065 6016 12 I 6 4 E 16...
Страница 379: ...Contents Programming Examples FSE 1065 6016 12 I 7 2 E 1...
Страница 391: ......
Страница 393: ...Contents Maintenance and Instrument Interfaces FSE 1065 6016 12 I 8 2 E 15...
Страница 419: ......
Страница 421: ...Contents Error Messages FSE 1065 6016 12 I 9 2 E 1...
Страница 429: ......