Operating instructions

R&S ESCI Basic Steps of IEC/IEEE-Bus Programming
1166.6004.12 7.11 E-1
Reading Out Error Messages
REM -------- Subroutine for reading the error queue -----------------------
Public SUB ErrorQueueHandler()
ERROR$ = SPACE$(100) 'Make space for error variable
CALL IBWRT(receiver%, "SYSTEM:ERROR?")
CALL IBRD(receiver%, ERROR$)
PRINT "Error Description : "; ERROR$
END SUB
REM
***********************************************************************
Evaluation of SCPI Status Registers
REM ------ Subroutine for evaluating Questionable Status Register ---------
Public SUB Questionablestatus()
Ques$ = SPACE$(20) 'Preallocate blanks to text variable
CALL IBWRT(receiver%, "STATus:QUEStionable:EVENt?")
CALL IBRD(receiver%, Ques$)
PRINT "Questionable Status: "; Ques$
END SUB
REM
***********************************************************************
REM ------ Subroutine for evaluating Operation Status Register ------------
Public SUB Operationstatus()
Oper$ = SPACE$(20) 'Preallocate blanks to text variable
CALL IBWRT(receiver%, "STATus:OPERation:EVENt?")
CALL IBRD(receiver%, Oper$)
PRINT "Operation Status: "; Oper$
END SUB
REM
***********************************************************************