
Remote Commands
R&S
®
FPL1000
1017
User Manual 1178.3370.02 ─ 11
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
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
10.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 ------------
Public SUB Operationstatus()
Oper$ = SPACE$(20) 'Preallocate blanks to text
'variable
CALL InstrWrite (analyzer, "STATus:OPERation:EVENt?")
CALL InstrRead(analyzer, Oper$)
Using the Status Register