EasyManua.ls Logo

Santec OTF-930 - Example Programs; GPIB Program

Default Icon
52 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Optical Tunable Filter OTF-930
9-1
Example Programs
9.1. GPIB Program
ʻSet Wavelength Routine ʻSubroutine description
Private Sub Wavelength_Set() ʻSets routine name to
Wavelength_Set
ʻDene Variables ʻComment
Dim ans As String * 30 ʻDimensions ans array as
String of length 30
Dim otf930 As Integer ʻDimensions otf930 as
integer
Dim otf930a As Integer ʻDimensions otf930a as
integer for error checking
ʻInitialise Device ʻComment
Call SendIFC(0) ʻInitialise GPIB interface
Call ibdev(0, 1, 0, T10s, 0, 0, otf930) ʻOpen and initialise device
Call ibln(otf930, 1, 0, otf930a) ʻ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(otf930, “WA” + ans + gpib_dl$) ʻSet wavelength to value
dened 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 and an output function to read the Optical Power.
9