![HP E4401B Programmer'S Manual Download Page 119](http://html.mh-extra.com/html/hp/e4401b/e4401b_programmers-manual_161548119.webp)
Chapter 3
3-55
Programming Examples
Status Register–Determine When a Measurement is Done
Status Register–Determine When a
Measurement is Done
This C programming example does the following:
• Open an HP-IB session at address 18.
• Clear the analyzer.
• Reset the analyzer.
• Clear the status byte of the analyzer.
• Put the analyzer in a single sweep.
• Set the input port to the 50 MHz amplitude reference.
• Set the analyzer center frequency to 50 MHz, resolution bandwidth
to 300 kHz.
• Set the analyzer to 10 MHz.
• Initiate the measurement.
• Set the service request mask to assert SRQ when either a
measurement is completed or an error message has occurred.
• Configure the computer to respond to an interrupt, open a context,
install the handler, and enable it.
• Send an undefined command to the device.
• Averaging the successive measurements.
• Set video averaging to 20 sweeps.
• Turn Average On.
• Initiate a measurement.
• Wait until SRQ is generated and for the handler to be called, Print
something while waiting. When interrupt occurs it will be handled
by interrupt handler.
• When an interrupt occurs, recognize it.
• Report the nature of the interrupt on the HP ESA analyzer.
• Disable and uninstall the interrupt handler.
• Clear the status register of the analyzer.
• Clear the status byte of the analyzer.
• Close the Session.
• Interrupt handler: Trigger event handler. Make sure it is an SRQ
event, ignore if stray event. If it is SRQ, get the status byte and
Summary of Contents for E4401B
Page 6: ...vi ...
Page 14: ...xiv Contents ...
Page 64: ...2 34 Chapter2 HP ESA Status Registers Using the Analyzer Status Registers ...
Page 65: ...3 1 3 Programming Examples ...
Page 151: ...4 1 4 Programming Command Cross References ...
Page 286: ...5 132 Chapter5 Language Reference UNIT Subsystem ...
Page 287: ...6 1 6 HP 8590 HP ESA Spectrum Analyzers Programming Conversion Guide ...
Page 292: ...1 HP 8590 HP ESA Spectrum Analyzers Conversion Guide ...
Page 368: ...7 1 7 Error Messages ...
Page 393: ...7 26 Chapter7 Error Messages 201 to 799 Device Specific Errors ...