HP E4418B Programming Manual page 101

Power meters
Hide thumbs Also See for E4418B:
Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E4419b

Table of Contents