9-2
ECL-210 Operation Manual
‘READ POWER (dBm) ROUTINE
‘Subroutine description
Private Sub Power_Read_dBm()
‘Sets routine name to
Power_Read_dBm
‘Define Variables
‘Comment
Dim ActualPower_dBm As String * 30
‘Dimensions array as
String of length 30
Dim TargetPower_dBm As String * 30
‘Dimensions 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
‘Read Actual Power
‘Comment
Call ibwrt(ecl210, “A:OP” + gpib_dl$)
‘Set output variable to
actual output power in dBm
Call ibrd(ecl210, ActualPower_dBm)
‘Read set output variable
MsgBox(“Actual Power= “ & Str(ActualPower_dBm))
‘Output read data to screen
‘Read Target Power
‘Comment
Call ibwrt(ecl210, “A:OPT” + gpib_dl$)
‘Set output variable to
target output power in dBm
Call ibrd(ecl210, TargetPower_dBm)
‘Read set output variable
MsgBox(“Target Power = “ & Str(TargetPower_dBm))
‘Output read data to screen
End Sub
‘End subroutine
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com