R&S ESU Series Operating Manual page 792

Emi test receiver
Table of Contents

Advertisement

R&S ESU
7.2.1.1
Initiate Service Request
REM ---- Example of initialization of the SRQ in the case of errors --------
PUBLIC SUB SetupSRQ()
status = viWrite(analyzer, "*CLS", 4, retCnt)
'Reset status reporting system
status = viWrite(analyzer, "*SRE 168", 8, retCnt)
'Permit service request for STAT:OPER,STAT:QUES and ESR registe
status = viWrite(analyzer, "*ESE 60", 7, retCnt)
'Set event enable bit for command, execution, device-dependent
'and query error
status = viWrite(analyzer, "STAT:OPER:ENAB 32767", 20, retCnt)
'Set OPERation enable bit for all events
status = viWrite(analyzer, "STAT:OPER:PTR 32767", 19, retCnt)
'Set appropriate OPERation Ptransition bits
status = viWrite(analyzer, "STAT:QUES:ENAB 32767", 20, retCnt)
'Set questionable enable bits for all events
status = viWrite(analyzer, "STAT:QUES:PTR 32767", 19, retCnt)
'Set appropriate questionable Ptransition bits
END SUB
REM ***********************************************************************
7.2.1.2
Waiting for the Arrival of a Service Request
There are basically two methods of waiting for the arrival of a service request:
Blocking (user inputs not possible)
This method is appropriate if the waiting time until the event to be signalled by an
SRQ is short (shorter than the selected time-out), if no response to user inputs is
required during the waiting time, and if – as the main criterion – the event is abso-
lutely certain to occur.
Reason:
From the time the WaitSRQ() function is called until the occurrence of the expected
event, it does not allow the program to respond to mouse clicks or key entries during
the waiting time. Moreover, it causes program abort if the SRQ event does not occur
within the predefined time-out period.
The method is, therefore, in many cases not suitable for waiting for measurement
results, especially with triggered measurements.
The following function calls are required:
status = viEnableEvent(analyzer, VI_EVENT_SERVICE_REQ, VI_QUEUE, VI_NULL)
status = viWaitOnEvent(analyzer, VI_EVENT_SERVICE_REQ, 10000, etype, eevent)
'Wait for service request
IF (result% = 1) THEN CALL Srq
'If SRQ is recognized => subroutine for evaluation
Operating Manual 1302.6163.12 - 03
Remote Control – Programming Examples
Basic Programming Steps for the VISA Interface
7.3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents