Keysight N1911A Programming Manual page 78

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

Advertisement

1
Power Meter Remote Operation
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
380
78
! Program to generate an SRQ when a channel A sensor
! connect or disconnect occurs
!
ASSIGN @Pm TO 713
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)
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
END
N1911A/1912A P-Series Power Meters Programming Guide
! Power meter GPIB address
! Selective device clear
! Enable an SRQ to cause an interrupt
! Idle loop
! Serial Poll (reads status byte)
! Device status reg bit set ?
! Return to idle loop
! Yes , read register
! (this also clears it)

Advertisement

Table of Contents
loading

This manual is also suitable for:

N1912a

Table of Contents