Programming Examples

Example 2 - Status Registers and Queues

9.2 Example 2 - Status Registers and Queues

Function

This program sends a commands and queries typed in by the user. The contents of the status byte and the standard event status register are displayed. These registers are updated for each new command, and each time a Service ReQuest (SRQ) occurs. The number of the most recent error, and the most recent contents of the output queue is also displayed.

Listing

10!--------------------------------------------------

20!

30! Agilent 8156A Programming Example 2

40!

50! Status Structure, and a useful self learning tool

60!

70!--------------------------------------------------

80!

90! Declarations and initializations

100!

110INTEGER Value,Bit,Quot,Xpos,Ypos

120DIM Inp$[100]

130DIM A$[300]

140Att=728

150ON INTR 7 GOSUB Pmm_srq

160!

170! Mask the registers

180!

190OUTPUT Att;"*SRE 248;*ESE 255"

The *SRE 248 command enables bits 7 (Operation Status Summary), 5 (ESB), 4 (MAV), and 3 (Questionable Status Summary) in the status byte (bit 6 (SRQ) cannot be disabled in this register). The *ESE 255 command enables all of the bits in the Event Status Register.

200 !

210! Set up the screen

220!

230CLEAR SCREEN

240PRINT TABXY(40,3);"Status Byte"

250PRINT TABXY(4,1);" OPS SRQ ESB MAV QUE"

260PRINT TABXY(4,2);" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"

270PRINT TABXY(4,3);" : : : : : : : : :"

280PRINT TABXY(4,4);" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"

290

PRINT TABXY(4,5);"

^"

 

300

PRINT TABXY(4,6);"

:"

 

310

PRINT TABXY(4,7);" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"

320

PRINT

TABXY(4,8);" :

OR

:"

330

PRINT

TABXY(4,9);" +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"

132

Page 132
Image 132
Agilent Technologies 8156A manual Example 2 Status Registers and Queues

8156A specifications

Agilent Technologies 8156A is a high-performance optical source offering advanced capabilities for testing and characterizing optical systems. Specifically designed for applications in telecommunications and data communications, the 8156A stands out due to its precision, versatility, and reliability, making it an essential tool for engineers and researchers in the telecommunications industry.

One of the main features of the 8156A is its ability to generate a stable, accurate, and tunable optical signal. This optical source operates across a wide wavelength range, typically from 1260 nm to 1675 nm, covering key regions used in fiber optics. The tunable laser module is particularly beneficial for applications requiring the testing of fiber optic components, systems, and networks, enabling users to specify any wavelength within this range.

The device employs advanced technologies, including distributed feedback (DFB) laser technology, offering low noise and high output power while ensuring minimal phase and frequency jitter. This results in precise measurements that are crucial for evaluating the performance of optical devices. The 8156A also features a built-in optical power meter, allowing for seamless integration and real-time monitoring of optical power levels during testing.

Another significant characteristic of the 8156A is its user-friendly interface, which includes easy-to-read displays and intuitive controls. This design simplifies operation, allowing users to set up tests quickly and efficiently. Additionally, it provides various output options, including single-mode and multi-mode fiber interface compatibility, expanding its usability across different applications.

The 8156A is equipped to handle numerous protocols and systems, including passive optical networks (PON), optical transport networks (OTN), and traditional wavelength-division multiplexing (WDM) technologies. Its agility in adapting to various protocols enhances its role in research and development settings.

Moreover, the device offers a range of automation features, enabling users to script complex measurement sequences, making it an adaptable solution for both laboratory and field environments. Combined with its robust build quality, the Agilent Technologies 8156A optical source not only ensures reliable operation but also provides a long service life, making it a valuable investment for any optical testing application.