Remote Control
R&S
®
FSPN
526
User Manual 1179.4363.02 ─ 01
'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 ***********************************************************************
REM ------ Subroutine for evaluating Questionable Status Register ---------
Public Sub Questionablestatus()
Dim myQSR As String = Nothing
Try
myQSR = mbSession.Query("STATus:QUEStionable:EVENt?") 'Read QSR
Console.WriteLine("Questionable Status:" + myQSR)
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
End Sub
REM ------ Subroutine for evaluating Operation Status Register ------------
Public Sub Operationstatus()
Dim myOSR As String = Nothing
Try
myOSR = mbSession.Query("STATus:OPERation:EVENt?") 'Read OSR
Console.WriteLine("Operation Status:" + myOSR)
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
End Sub
11.11.1.8
Evaluation of Event Status Register
REM ------ Subroutine for evaluating the Event Status Register ------------
Public SUB Esrread()
Esr$ = SPACE$(20) 'Preallocate blanks to text
'variable
CALL InstrWrite (analyzer, "*ESR?") 'Read ESR
CALL InstrRead(analyzer, Esr$)
IF (VAL(Esr$) AND 1) > 0 THEN Debug.Print "Operation complete"
IF (VAL(Esr$) AND 2) > 0 THEN Debug.Print "Request Control"
IF (VAL(Esr$) AND 4) > 0
THEN Debug.Print "Query Error"
Programming Examples