
Remote commands
R&S
®
FSVA3000/ R&S
®
FSV3000
1423
User Manual 1178.8520.02 ─ 08
IF (STB% AND 32) > 0 THEN CALL Esrread
END IF
noDevice:
END SUB 'End of SRQ routine
REM ***********************************************************************
REM ---------- Subroutine for evaluation Service Request Routine ----------
Public Sub Srq()
Try
Dim mySTB As Short = mbSession.ReadStatusByte()
'Serial poll, read status byte
Console.WriteLine("Reading Service Request Routine:" + mySTB.ToString())
If mySTB > 0 Then 'This instrument has bits set in the STB
If (mySTB And 16) > 0 Then Call Outputqueue()
If (mySTB And 4) > 0 Then Call ErrorQueueHandler()
If (mySTB And 8) > 0 Then Call Questionablestatus()
If (mySTB And 128) > 0 Then Call Operationstatus()
If (mySTB And 32) > 0 Then Call Esrread()
End If
Catch exp As Exception
Console.WriteLine(exp.Message)
End Try
End Sub 'End of SRQ routine
Reading out the status event registers, the output buffer and the error/event queue is
effected in subroutines.
12.15.2.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
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
Programming examples