Remote Operation
Example Programs
| Example 2. Locating the largest signal | ||
Description | This program finds the largest signal, zooms to a narrow span, and then uses | ||
| markers to return signal wavelength and amplitude to the computer. | ||
Program | PRINT “OSA Zoom Example” |
| |
| OUTPUT 723;”disp:wind:text:data ‘Display the largest Signal’” | ||
| ! |
|
|
|
|
| |
| OUTPUT 723;”*rst” | ! Preset the instrument | |
| PRINT “Presetting the instrument” |
| |
| ! |
|
|
|
|
| |
| OUTPUT 723;”disp:wind:trac:all:scal:auto” | ! Automeasure | |
| PRINT “Performing Automeasure” |
| |
| ! |
|
|
| ! |
|
|
|
|
| |
| OUTPUT 723;”cal:alig:mark1” | ! Perform an autoalignment | |
| PRINT “Performing Autoalign” |
| |
| ! |
|
|
|
|
| |
| ! 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” |
| |
| ! |
|
|
| 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;”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 | |
| ! |
|
|
| OUTPUT 723;”calc1:mark1:x?” | ! Read marker wavelength | |
| ENTER 723;Markwl |
| |
| ! |
|
|
| OUTPUT 723;”calc1:mark1:y?” | ! Read marker amplitude | |
| ENTER 723;Markamp |
| |
| ! |
|
|
| PRINT “ | Marker values” |
|
|
|
| |
| Markwl=Markwl*1.E+9 | ! Convert to nm | |
| PRINT Markwl;”nm”,Markamp;”dBm” |
| |
| ! |
|
|
| LOCAL 723 |
|
|
| END |
|
|