EasyManua.ls Logo

Rohde & Schwarz SME02 - List Management; Command Synchronization

Rohde & Schwarz SME02
462 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...
SME Programming Examples
1038.6002.02 9D.3 E-11
6. List Management
REM ----------------------------- Example of list management -------------------------
CALL IBWRT(generator%, "LIST:SELECT "+CHR$(34)+"LIST1"+CHR$(34))
’Select list "LIST1", is generated if necessary
CALL IBWRT(generator%, "LIST:POWER -30,-15,-10,-5,0,0.1)
’Fill power list with values
CALL IBWRT(generator%, "LIST:FREQ 575MHz,235MHz,123MHz,456MHz,735MHz,333MHz"
’Fill frequency list with values
CALL IBWRT(generator%, "LIST:DWELL 0.2") ’200ms per item
CALL IBWRT(generator%, "TRIGGER21:LIST:SOURCE AUTO") ’Permanently repeat list automatically
CALL IBWRT(generator%, "POWER:MODE LIST") ’Switch over instrument to list mode
REM **********************************************************************
7. Command synchronization
The possibilities for synchronization implemented in the following example are described in Section
3.7.6, 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 with a National
REM Instruments GPIB driver, the setting "Disable Auto Serial Poll" must be changed to "yes"
REM 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 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