![Ronde & Schwarz 1304.0004.03 User Manual Download Page 1019](http://html1.mh-extra.com/html/ronde-and-schwarz/1304-0004-03/1304-0004-03_user-manual_14849851019.webp)
Remote Commands
R&S
®
FPL1000
1019
User Manual 1178.3370.02 ─ 09
REM ------------ Service request routine ----------------------------------
Public SUB Srq()
ON ERROR GOTO noDevice 'No user existing
CALL viReadSTB(analyzer, STB%) 'Serial poll, read status byte
IF STB% > 0 THEN 'This instrument has bits set in
'the STB
SRQFOUND% = 1
IF (STB% AND 16) > 0 THEN CALL Outputqueue
IF (STB% AND 4) > 0 THEN CALL ErrorQueueHandler
IF (STB% AND 8) > 0 THEN CALL Questionablestatus
IF (STB% AND 128) > 0 THEN CALL Operationstatus
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.
11.12.7.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
Using the Status Register