®
R&S
FPL1000
Reading out the status event registers, the output buffer and the error/event queue is
effected in subroutines.
10.12.7.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
Catch exp As Exception
End Try
End Sub
10.12.7.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
Manuel d'utilisation 1179.5860.09 - 12
Dim result As String = mbSession.ReadString()
Console.WriteLine("Contents of Output Queue:" + result)
Console.WriteLine(exp.Message)
mbSession.Write("SYST:ERR?")
result = mbSession.ReadString()
Dim parts As String() = result.Split(",")
If parts(0) = 0 Then
hasErr = False
Console.WriteLine(result)
Else
Console.WriteLine(result)
End If
Remote commands
Using the status register
1031
1031