2 Programming the Test Set
STATus Subsystem
•
*STB? (status byte) queries the value of the status byte register without erasing its contents.
How to Use the Status Registers
A program often needs to be able to detect and manage error conditions or changes in instrument status.
There are two methods you can use to programmatically access the information in status registers:
•
The polling method
•
The service request (SRQ) method
In the polling method, the instrument has a passive role. It only tells the controller that conditions have
changed when the controller asks the right question. In the SRQ method, the instrument takes a more
active role. It tells the controller when there has been a condition change without the controller asking.
Either method allows you to monitor one or more conditions.
The polling method works well if you do not need to know about changes the moment they occur. The SRQ
method should be used if you must know immediately when a condition changes. To detect a change using
the polling method, the program must repeatedly read the registers.
Use the SRQ method when:
•
you need time-critical notification of changes
•
you are monitoring more than one device which supports SRQs
•
you need to have the controller do something else while waiting
•
you can’t afford the performance penalty inherent to polling
Use polling when:
•
your programming language/development environment does not support SRQ interrupts
•
you want to write a simple, single-purpose program and don’t want the added complexity of setting up
an SRQ handler
•
To monitor a condition:
a.Determine which register contains the bit that reports the condition.
b.Send the unique SCPI query that reads that register.
c.Examine the bit to see if the condition has changed.
You can monitor conditions in different ways.
•
Check the current instrument hardware and firmware status.
Do this by querying the condition registers which continuously monitor status. These registers represent
the current state of the instrument. Bits in a condition register are updated in real time. When the condition
monitored by a particular bit becomes true, the bit is set to 1. When the condition becomes false, the bit is
reset to 0.
•
Monitor a particular condition (bit).
You can enable a particular bit(s), using the event enable register. The instrument will then monitor that
particular condition(s). If the bit becomes true (0 to 1 transition) in the event register, it will stay set until the
58
Sequence Analyzer User's & Programmer's Reference
Содержание E6650A EXF
Страница 34: ...1 About the Test Set Mouse and Keyboard Control 34 Sequence Analyzer User s Programmer s Reference...
Страница 94: ...2 Programming the Test Set Common Commands 94 Sequence Analyzer User s Programmer s Reference...
Страница 129: ...4 Mode Functions Undefined variable Primary ProductName Sequence Analyzer User s Programmer s Reference 129...
Страница 145: ...5 System Functions Undefined variable Primary ProductName Sequence Analyzer User s Programmer s Reference 145...
Страница 206: ...5 System Functions System 206 Sequence Analyzer User s Programmer s Reference...
Страница 214: ...6 List Sequence Measurements File File See File on page 146 214 Sequence Analyzer User s Programmer s Reference...
Страница 474: ...6 List Sequence Measurements Mode Mode See Mode on page 130 474 Sequence Analyzer User s Programmer s Reference...
Страница 478: ...6 List Sequence Measurements Print Print See Print on page 151 478 Sequence Analyzer User s Programmer s Reference...
Страница 642: ...6 List Sequence Measurements System System See System on page 152 642 Sequence Analyzer User s Programmer s Reference...