EasyManuals Logo

Agilent Technologies 33120A User Manual

Agilent Technologies 33120A
312 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #263 background imageLoading...
Page #263 background image
Using the Status Registers
This program teaches the following concepts:
How to use the Status Registers to generate an interrupt if a SCPI
error occurs. The program sets up the Status Byte and Standard
Event register and interrupts the controller if an error is detected.
How to service the interrupt if an error occurs and read the function
generator’s error queue using the SYST:ERR? command.
BASIC / GPIB (Program 4)
10 !
20 ! This program uses the status registers to generate an
30 ! interrupt if a SCPI error occurs. The function generator
40 ! is programmed to output an FM waveform.
50 !
60 CLEAR 7 ! Clear interface - send "device clear"
70 ASSIGN @Fgen TO 710 ! Assign I/O path to address 710
80 COM @Fgen ! Use same address in subprogram
90 INTEGER Hpib,Mask,Value,B ! Declare integer variables
100 OUTPUT @Fgen;"*RST" ! Reset function generator
110 !
120 ! Set up error checking
130 !
140 Hpib=7 ! GPIB select code is "7"
150 ON INTR Hpib CALL Err_msg ! Call subprogram if error occurs
160 Mask=2 ! Bit 1 is SRQ
170 ENABLE INTR Hpib;Mask ! Enable SRQ to interrupt program
180 !
190 OUTPUT @Fgen;"*CLS" ! Clear status registers (clear out old errors)
200 OUTPUT @Fgen;"*SRE 32" ! Enable "Standard Event" bit in Status Byte
210 ! to pull the IEEE-488 SRQ line
220 OUTPUT @Fgen;"*ESE 60" ! Enable error bits (2, 3, 4, or 5) to set
230 ! "Standard Event" bit in Status Byte
240 ! and wait for operation complete
6
Chapter 6 Application Programs
Using the Status Registers
261

Table of Contents

Other manuals for Agilent Technologies 33120A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Agilent Technologies 33120A and is the answer not in the manual?

Agilent Technologies 33120A Specifications

General IconGeneral
BrandAgilent Technologies
Model33120A
CategoryInverter
LanguageEnglish

Related product manuals