Télécharger Imprimer la page

Keysight Technologies 3458A Guide D'utilisation page 121

Multimètre

Publicité

Configuring for Measurements
3
Interrupts
When a bit of the status register is set and has been enabled to assert SRQ (RQS
command), the multimeter sets the GPIB SRQ line true. This can be used to alert
the controller to interrupt its present operation and find out what service the
multimeter requires. (Refer to your controller-operating manual for information on
how to program it to respond to the interrupt.)
To allow any of the status register bits to set the SRQ line true, you must first
enable the bit(s) with the RQS command. For example, suppose your application
requires an interrupt when a high or low limit is exceeded (bit 1), power is cycled
(bit 3), or when an error occurs (bit 5). The decimal equivalents of these bits are 2,
8, and 32, respectively. The decimal sum is 42. You can enable these bits to assert
SRQ by sending:
OUTPUT 722;"RQS 42"
Now, whenever one of the events associated with bits 1, 3, or 5 occurs, it will set
bit 6 in the status register and assert SRQ. Notice that the bits that are not
enabled still respond to their corresponding conditions. They do not, however, set
bit 6 or assert SRQ. The following program is an example of interrupts using
Keysight Series 200/300 BASIC.
10 !HI/LO LIMIT EXCEEDED,ERROR, POWER CYCLED INTERRUPT
20 OUTPUT 722;"PRESET NORM"
30 OUTPUT 722; "CSB"
40 ON INTR 7 GOTO 90
50 ENABLE INTR 7;2
60 OUTPUT 722;"RQS 42;MATH PFAIL;SMATH MIN -5;SMATH MAX 5"
70 OUTPUT 722;"TRIG AUTO"
80 GOTO 80
90 OUTPUT 722; "STB?"
100 ENTER 722;A
110 IF BINAND (A,2) THEN PRINT "HI/LO LIMIT EXCEEDED"
120 IF BINAND (A,8) THEN PRINT "POWER WAS CYCLED"
130 IF BINAND (A,32) THEN PRINT "ERROR OCCURRED"
140 END
Keysight 3458A User's Guide
121

Publicité

loading