EXTERNAL CAVITY TUNABLE LD LIGHT SOURCE ECL-210
9-1
9
Example Programs
9.1. GPIB Program
‘Set Wavelength Routine
‘Subroutine description
Private Sub Wavelength_Set()
‘Sets routine name to
Wavelength_Set
‘Define Variables
‘Comment
Dim ans As String * 30
‘Dimensions ans array as
String of length 30
Dim ecl210 As Integer
‘Dimensions ecl210 as
integer
Dim ecl210a As Integer
‘Dimensions ecl210a as
integer for error checking
‘Initialise Device
‘Comment
Call SendIFC(0)
‘Initialise GPIB interface
Call ibdev(0, 1, 0, T10s, 0, 0, ecl210)
‘Open and initialise device
Call ibln(ecl210, 1, 0, ecl210a)
‘Check for device presence
(error checking)
gpib_dl$ = Chr$(13) + Chr$(10)
‘Set Cr/Lf as delimitter
‘Set Wavelength Subroutine
‘Comment
ans = InputBox(“Required Wavelength (nm)”)
‘Ask user for required
wavelength value
Call ibwrt(ecl210, “A:WA” + ans + gpib_dl$)
‘Set wavelength to value
defined by user input
End Sub
‘End subroutine
The following program provides an example of the use of the Control Commands for GPIB
communication. The program is written in Visual Basic and has an input function to set the wavelength
of an ECL-210 unit placed in slot A of a MLS rack, and an output function to read the current optical
ouput power and the target optical output power of the same ECL-210 unit.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com