Remote Control
R&S
®
ESRP
971
User Manual 1175.7445.02 ─ 08
If (mySTB And 32) > 0 Then Call Esrread()
End If
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
End Sub 'End of SRQ routine
Reading out the status event registers, the output buffer and the error/event queue is
effected in subroutines.
11.17.1.5
Reading Out the Output Buffer
REM -------- Subroutine for the individual STB bits -----------------------
Public SUB Outputqueue() 'Reading the output buffer
result$ = SPACE$(100) 'Make space for response
CALL InstrRead(analyzer, result$)
Debug.Print "Contents of Output Queue:"; result$
END SUB
REM ***********************************************************************
REM -------- Subroutine for the output queue -----------------------
Public Sub Outputqueue() 'Reading the output buffer
Try
Dim result As String = mbSession.ReadString()
Console.WriteLine("Contents of Output Queue:" + result)
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
End Sub
11.17.1.6
Reading Error Messages
REM -------- Subroutine for reading the error queue -----------------------
Public SUB ErrorQueueHandler()
ERROR$ = SPACE$(100) 'Make space for error variable
CALL InstrWrite (analyzer, "SYSTEM:ERROR?")
CALL InstrRead(analyzer, ERROR$)
Debug.Print "Error Description:"; ERROR$
END SUB
REM ***********************************************************************
REM -------- Subroutine for reading the error queue -----------------------
Sub ErrorQueueHandler()
Dim result As String
Dim hasErr As Boolean = True
Do
mbSession.Write("SYST:ERR?")
result = mbSession.ReadString()
Dim parts As String() = result.Split(",")
If parts(0) = 0 Then
Remote Control – Programming Examples