9-2
OTF-920 Operation Manual
‘READ POWER (dBm) ROUTINE
‘Subroutine description
Private Sub Power_Read_dBm()
‘Sets routine name to
Power_Read_dBm
‘Define Variables
‘Comment
Dim Status_dBm As String * 30
‘Dimensions and array as
String of length 30
Dim otf920 As Integer
‘Dimensions otf920 as
integer
Dim otf920a As Integer
‘Dimensions otf920a as
integer for error checking
‘Initialise Device
‘Comment
Call SendIFC(0)
‘Initialise GPIB interface
Call ibdev(0, 1, 0, T10s, 0, 0, otf920)
‘Open and initialise device
Call ibln(otf920, 1, 0, otf920a)
‘Check for device presence
(error checking)
gpib_dl$ = Chr$(13) + Chr$(10)
‘Set Cr/Lf as delimitter
‘Read Power
‘Comment
Call ibwrt(otf920, “OP” + gpib_dl$)
‘Set output variable to
output power in dBm
Call ibrd(otf920, Status_dBm)
‘Read set output variable
MsgBox (“Power = “ & Str(Status_dBm))
‘Output read data to screen
End Sub
‘End subroutine
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com