![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/5/08/5083dd7c-fa72-432e-9013-cc5f30dff585/5083dd7c-fa72-432e-9013-cc5f30dff585-bg82.png)
4-24
Remote Operation
Example Programs
Example 6. Returning trace data
Description
This program locates the largest signal and then zooms to a narrow span. The
trace length is changed to 101 points and the entire trace data is read in and
printed on the display.
Program
PRINT “OSA Trace Example”
OUTPUT 723;”disp:wind:text:data ‘Trace Readout’”
!
DIM Tdata(1:101) ! Create a trace array
DIM Wdata(1:101) ! Wavelength data
!
PRINT “Presetting the instrument”
PRINT
OUTPUT 723;”*rst” ! Preset the instrument
!
OUTPUT 723;”disp:wind:trac:all:scal:auto” ! Automeasure
PRINT “Performing Automeasure”
PRINT
!
OUTPUT 723;”cal:alig:mark1” ! Perform an autoalignment
PRINT “Performing Autoalign”
PRINT
!
PRINT
! Next line is the operation complete query used so that the text is not printed
! until after the Autoalign is complete
OUTPUT 723;”*opc?”
ENTER 723;Dum
PRINT “...measurement begins”
PRINT
!
OUTPUT 723;”sens:wav:span 10 nm” ! Set span
!
OUTPUT 723;”init:imm” ! Take a single sweep
OUTPUT 723;”calc1:mark1:max” ! Marker to peak
OUTPUT 723;”calc1:mark1:scen” ! Marker to center
!
OUTPUT 723;”init:imm” ! Take a single sweep
!
! Read in the trace data
OUTPUT 723;”sens:swe:poin 101” ! Set trace length to 101
OUTPUT 723;”init:imm” ! Take a single sweep
!
OUTPUT 723;”form ascii” ! Set data format to ASCII
OUTPUT 723;”trac:data:y? tra” ! Request data
ENTER 723;Tdata(*) ! Read data trace
!
! Read start, stop and trace length
!
OUTPUT 723;”sens:wav:star?” ! Read start wavelength
book.book Page 24 Monday, January 31, 2000 10:34 AM