
Remote Commands
R&S
®
FPL1000
1020
User Manual 1178.3370.02 ─ 09
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.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
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
Loop While hasErr
End Sub
11.12.7.7
Evaluation of SCPI Status Registers
REM ------ Subroutine for evaluating Questionable Status Register ---------
Public SUB Questionablestatus()
Ques$ = SPACE$(20)
'Preallocate blanks to text
'variable
CALL InstrWrite (analyzer, "STATus:QUEStionable:EVENt?")
CALL InstrRead(analyzer, Ques$)
Debug.Print "Questionable Status:"; Ques$
END SUB
REM ***********************************************************************
REM ------ Subroutine for evaluating Operation Status Register ------------
Using the Status Register