9-2
OTF-930
Operation Manual
ʻREAD POWER (dBm) ROUTINE ʻSubroutine description
Private Sub Power_Read_dBm() ʻSets routine name to
Power_Read_dBm
ʻDene Variables ʻComment
Dim Status_dBm As String * 30 ʻDimensions and 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
ʻRead Power ʻComment
Call ibwrt(otf930, “OP” + gpib_dl$) ʻSet output variable to
output power in dBm
Call ibrd(otf930, Status_dBm) ʻRead set output variable
MsgBox (“Power = “ & Str(Status_dBm)) ʻOutput read data to screen
End Sub ʻEnd subroutine