R&S FSLWiMAX, WiBro Measurements - Programming Examples (K92/93)
1300.2519.12 7.39 E-11
REM ––––––– Third possibility: Use of *OPC –––––––––––––––––––––––––––––
REM In order to be able to use the service request function in
REM conjugation with a National Instruments GPIB driver, the setting
REM "Disable Auto Serial Poll" must be changed to "yes" by means of
REM the GPIB configuration
R
EM (e.g. Windows Start menu: Settings –> Control Panel –> GPIB)!
CALL InstrWrite(analyzer, "*SRE 32") 'Permit service request for ESR
CALL InstrWrite(analyzer, "*ESE 1") 'Set event–enable bit for
'operation–complete bit
CALL InstrWrite(analyzer, "INIT:IMM;*OPC") 'Start sweep and
'synchronize with OPC
status = viWaitOnEvent(vi, VI_EVENT_SERVICE_REQ, SRQWaitTimeout, VI_NULL,
VI_NULL) 'Wait for service request
REM ––––––– Fourth possibility: Use of INIT:IMM ––––––––––––––––––––––––
REM In order to be able to use the service request function in
REM conjugation with a National Instruments GPIB driver, the setting
REM "Disable Auto Serial Poll" must be changed to "yes" by means of
REM the GPIB configuration
REM (e.g. Windows Start menu: Settings –> Control Panel –> GPIB)!
CALL InstrWrite(analyzer, "*SRE 128") 'Permit service request for ESR
CALL InstrWrite(analyzer, "*ESE 0") 'Set event–enable bit for
'operation–complete bit
CALL InstrWrite(analyzer, "STATus:OPERation:ENABle 16")
'Enable bit 4 of status operation
'register'
CALL InstrWrite(analyzer, "STAT:OPERation:NTRansition 16")
'Set Negative transition to 1
CALL InstrWrite(analyzer, "STATus:OPERation:PTRansition 0")
'Set Positive transition to 0
CALL InstrWrite(analyzer, "INIT:IMM") 'Start sweep and synchronize with
'OPC
status = viWaitOnEvent(vi, VI_EVENT_SERVICE_REQ, SRQWaitTimeout, VI_NULL,
VI_NULL) 'Wait for service request
REM Continue main program here.
END SUB
REM ***********************************************************************