Remote Control
R&S
®
ESRP
967
User Manual 1175.7445.02 ─ 08
11.17.13
11.17.14
11.17.15
11.17.16
11.17.1
Service Request
The service request routine requires an extended initialization of the instrument in
which the relevant bits of the transition and enable registers are set. In addition the ser-
vice request event must be enabled in the VISA session.
11.17.1.1
Initiate Service Request
REM ---- Example of initialization of the SRQ in the case
' of errors -------
PUBLIC SUB SetupSRQ()
CALL InstrWrite (analyzer, "*CLS") 'Reset status reporting system
CALL InstrWrite (analyzer, "*SRE 168") 'Enable service request for
'STAT:OPER, STAT:QUES and ESR
'register
CALL InstrWrite (analyzer, "*ESE 60") 'Set event enable bit for
'command, execution, device-
'dependent and query error
CALL InstrWrite (analyzer, "STAT:OPER:ENAB 32767")
'Set OPERation enable bit for
'all events
CALL InstrWrite (analyzer, "STAT:OPER:PTR 32767")
'Set appropriate OPERation
'Ptransition bits
CALL InstrWrite (analyzer, "STAT:QUES:ENAB 32767")
'Set questionable enable bits
'for all events
CALL InstrWrite (analyzer, "STAT:QUES:PTR 32767")
'Set appropriate questionable
'Ptransition bits
CALL viEnableEvent(analyzer, VI_EVENT_SERVICE_REQ, VI_QUEUE, 0)
'Enable the event for service
'request
Status = viWaitOnEvent(analyzer, VI_EVENT_SERVICE_REQ, SRQWaitTimeout, VI_NULL,
VI_NULL)
IF (status = VI_SUCCESS) THEN CALL Srq
'If SRQ is recognized =>
'subroutine for evaluation
END SUB
REM ***********************************************************************
Remote Control – Programming Examples