Agilent Technologies N1911A Programming Manual page 83

P-series power meters
Hide thumbs Also See for N1911A:
Table of Contents

Advertisement

Example 1:
10
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
service it.
230
240
250
260
270
280
290
300
310
320
330
340
350
360
370
N1911A/1912A P-Series Power Meters Programming Guide
! Program to generate an SRQ when a channel A sensor
! connect or disconnect occurs
!
ASSIGN @Pm TO 713 ! Power meter GPIB address
ON ON INTR 7 GOTO Srq_i! Define service request handler
CLEAR @Pm
OUTPUT @Pm;"*CLS;*RST" ! Clear registers and resetmeter
!
! Configure the device status register so that a sensor
! connect or disconnect on channel A will cause an SRQ.
!
OUTPUT @Pm;"STAT:DEV:ENAB 2"
OUTPUT @Pm;"STAT:DEV:NTR 2"
OUTPUT @Pm;"STAT:DEV:PTR 2"
OUTPUT @Pm;"*SRE 2"
!
ENABLE INTR 7;2
LOOP
! Forever
END LOOP
!
! When a SRQ is detected, the following routine will
!
Srq_i:
!
St=SPOLL(@Pm) ! Serial Poll (reads status byte)
IF BIT(St,1)=1 THEN
OUTPUT @Pm;"STAT:DEV:EVEN?"
ENTER @Pm;Event
OUTPUT @Pm;"STAT:DEV:COND?"
ENTER @Pm;Cond
IF Cond=0 THEN
PRINT "Sensor disconnected"
ELSE
PRINT "Sensor connected"
END IF
END IF
GOTO 170
Power Meter Remote Operation
! Selective device clear
! Enable an SRQ to cause an interrupt
! Idle loop
! Device status reg bit set ?
! Yes , read register
! (this also clears it)
! Return to idle loop
1
55

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

1912aN1912a

Table of Contents