EasyManua.ls Logo

Rohde & Schwarz SML01 - Command Synchronization

Rohde & Schwarz SML01
299 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
R&S®SML / R&S®SMV03 Programming Examples
1090.3123.12 E-6 7.3
Command synchronization
The possibilities for synchronization implemented in the following example are described in Chapter 5,
Section "Command Order and Command Synchronization".
REM -------- Examples of command synchronization ---------
REM Command ROSCILLATOR:SOURCE INT has a relatively long execution time
REM (over 300ms). It is to be ensured that the next command is only executed
REM when the reference oscillator has settled.
REM -------- First possibility: Use of *WAI ------------
CALL IBWRT(generator%, "ROSCILLATOR:SOURCE INT; *WAI; :FREQUENCY 100MHZ")
REM -------- Second possibility: Use of *OPC? --------
OpcOk$ = SPACE$(2) 'Space for *OPC? - Provide response
CALL IBWRT(generator%, "ROSCILLATOR:SOURCE INT; *OPC?")
REM -------- here the controller can service other instruments -----------
CALL IBRD(generator%, OpcOk$) 'Wait for "1" from *OPC?
REM -------- Third possibility: Use of *OPC
REM In order to be able to use the service request function in conjugation
REM with a National Instruments GPIB driver, the setting "Disable Auto
REM Serial Poll" must be changed to "yes" by means of IBCONF.
CALL IBWRT(generator%, "*SRE 32") 'Permit service request for ESR
CALL IBWRT(generator%, "*ESE 1") 'Set event-enable bit for
'operation-complete bit
ON PEN GOSUB OpcReady 'Initialization of the service request routine
PEN ON
CALL IBWRT(generator%, "ROSCILLATOR:SOURCE INT; *OPC")
REM Continue main program here.
STOP 'End of program
OpcReady:
REM As soon as the reference oscillator has settled, this subroutine is
REM activated
REM Program suitable reaction to the OPC service request.
ON PEN GOSUB OpcReady 'Enable SRQ routine again
RETURN
REM ***********************************************************************

Table of Contents

Related product manuals