R&S ESU Series Operating Manual page 795

Emi test receiver
Table of Contents

Advertisement

R&S ESU
7.2.1.4
Service Request Routine
A service request is processed in the service request routine.
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)
IF (STB% AND 4)
IF (STB% AND 8)
IF (STB% AND 128) > 0 THEN CALL Operationstatus
IF (STB% AND 32)
END IF
noDevice:
END SUB
REM ***********************************************************************
Reading out the status event registers, the output buffer and the error/event queue
is effected in subroutines.
7.2.1.5
Evaluation of SCPI Status Registers
REM ------ Subroutine for evaluating Questionable Status Register ---------
Public SUB Questionablestatus()
Ques$ = SPACE$(20)
'Preallocate blanks to text variable
status = viWrite(analyzer, "STATus:QUEStionable:EVENt?", 26, retCnt)
status = viRead(analyzer, Ques$, 20, retCnt)
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
status = viWrite(analyzer, "STATus:OPERation:EVENt?", 23, retCnt)
status = viRead(analyzer, Oper$, 20, retCnt)
PRINT "Operation Status: "; Oper$
END SUB
REM ***********************************************************************
7.6
> 0 THEN CALL Outputqueue
> 0 THEN CALL ErrorQueueHandler
> 0 THEN CALL Questionablestatus
> 0 THEN CALL Esrread
Remote Control – Programming Examples
Basic Programming Steps for the VISA Interface
Operating Manual 1302.6163.12 - 03

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents