4. Programming Interfaces
Giga-tronics 2400/2500 Microwave Synthesizer Series
12
Programming Manual, Part Number 34783, Rev A, July 2009
4.3.2.2 Programming Example; CW Operation Using Visual Basic
Step
Description
1.
Perform steps 1 through 3 of Table 7 on page 10 to create a Visual Basic project.
2.
Write the following
‘This routine sets CW frequency and power of a 2400/2500
synthesizer
‘through GPIB at address 6.
Dim
status
As Long
Dim
instrumentHandle
As Long
Dim
Frequency
As
Double
Dim
Power
As Double
Dim
statusText
As String
statusText = Space(100)
status
=
GT2400_OpenConnection(
0
,
6
,
0
,instrumentHandle)
If
status
<
SUCCESS Then
GT2400_GetErrorMessage(status, statusText)
MsgBox
statusText
End If
status
=
GT2400_SetRF(instrumentHandle,
1
)
Frequency = 20000
‘MHz
Power = 10
status
=
GT2400_SetCW(instrumentHandle,Frequency,Power,
0
,
0
)
status
=
GT2400_CloseAllConnections()
3.
Build the project.
4.
Run the program.
End of example