Returning Data to the Computer

Data is requested from the OSA using a query. Queries usually take the form of a command with the question-mark character. For example, CENTERWL? requests the OSA's center wavelength setting. The syntax diagrams in Chapter 7 document available command queries. Most command queries and variable queries are normally sent in the form of ASCII strings. However, binary query results are returned for some commands. It is your responsibility to allocate memory for returned values in your application.

The OSA returns information as decimal values in the units shown in the following table. Units are determined by the settings of the reference level (RL) for some functions, such as the marker, the scale (LN, LG), or the amplitude units (MKREAD, AUNITS).

 

Parameter Units

 

 

 

Measured Data

 

Fundamental Unit

 

 

 

Current

 

Ampere

Frequenc y

 

Hertz

Power

 

dBm

 

Ratio

 

dB

Time

 

Second

Wavelength

 

Meters

 

 

 

Trace information that has been manipulated with math and move commands, or has been formatted with the MDS (measurement data size) or TDF (trace data format) command may be returned in other units. Refer to Chapter 2.

Trace information is returned two di￿erent ways, either indirectly with the use of markers, or directly as trace data with the TRA, TRB, or TRC commands. The next example marks trace A with a marker and returns the wavelength and amplitude values at the marker. Note that for every query executed, a value must be stored in the computer.

1-14