Remote Commands
R&S
®
FSVA3000/ R&S
®
FSV3000
1208
User Manual 1178.8520.02 ─ 01
14.15.2.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
14.15.2.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$)
Debug.Print "Operation Status:"; Oper$
END SUB
REM ***********************************************************************
Programming Examples