Power Meter Remote Operation
Status Reporting
EPM-P Series Power Meters Programming Guide
1-83
100
! Set upper limit to 2dBm and configure the operation
status
110 ! so that an over limit condition will cause an SRQ.
120 !
130 OUTPUT @Pm;”SENS:LIM:UPP 2DBM”
140 OUTPUT @Pm;”SENS:LIM:STAT ON”
150 OUTPUT @Pm;”STAT:OPER:PTR 4096”
160 OUTPUT @Pm;”STAT:OPER:ENAB 4096”
170 OUTPUT @Pm;”*SRE 128”
180 !
190 ENABLE INTR 7;2 ! Enable an SRQ to cause an interrupt
200 LOOP ! Idle loop
210 ! Forever
220 END LOOP
230 !
240 ! When a SRQ is detected , the following routine will
service it.
250 !
260 Srq_i: !
270 St=SPOLL(@Pm) ! Serial Poll (reads status byte)
280 IF BIT(St,7)=1 THEN ! Operation status bit set?
290 OUTPUT @Pm;”STAT:OPER?”! Yes , read register
300 ENTER @Pm;Oper ! (this also clears it)
310 OUTPUT @Pm;”STAT:OPER:ULF?”
320 ENTER @Pm;Ulf
330 IF Ulf=2 THEN PRINT “Over limit detected”
340 END IF
350 GOTO 190 ! Return to idle loop
360 END
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com