Programming Guide – 45
PRINT #1, "ENTER 05"
INPUT #2, CONDREG
LOOP UNTIL (CONDREG AND 2 = 2)
FOR J = 1 TO 10000:NEXT ' wait for power meter to settle
GOSUB METER
P1 = POWER
PRINT #1, "OUTPUT 05;:INP:ATT 40" ' change attenuation setting
DO ' wait in loop until attenuator settles
PRINT #1, "OUTPUT 05;:STAT:OPER:EVENT?"
PRINT #1, "ENTER 05"
INPUT #2, CONDREG
LOOP UNTIL (CONDREG AND 2 = 2)
FOR J = 1 TO 10000:NEXT ' wait for power meter to settle
GOSUB METER
P2 = POWER
SLOPE = (P1-P2)/30 ' calculate user slope
PRINT #1, "OUTPUT 05;:UCAL:SLOP ";SLOPE ' set user slope
PRINT #1, "OUTPUT 05;:UCAL:USRM ON;:INP:ATT 0;OFFS 0"
PRINT #1, "OUTPUT 05;:OUTP:APM ON;POW ";P2;" dBm" ' put attenuator in absolute
' power mode, and set power
' The HA9 attenuator should now match the power meter.
' The power can now be changed using the PWR command.
END
METER:
' This section contains the procedure for reading the power meter. It is dependent on the
' particular meter you are using; therefore, the appropriate terminating characters have to
' be set. The main program expects the power to be returned in the variable POWER.
RETURN
SCPI Command Set
The GPIB interface of the attenuator conforms to the ANSI/IEEE standards 488.1-1987 and
488.2-1987. The RS232 interface conforms to ANSI/IEEE standard 488.2-1987 where
applicable.
The common commands are defined in ANSI/IEEE 488.2. All other commands conform to the
SCPI command language, version 1995.0.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com