A-3 Visual Basic
A-3
Visual Basic
This function can be called in a Visual Basic program. It performs an RF Calibration in Cable
& Antenna Analyzer mode. Communication with the instrument uses USB protocol.
Public Sub OnePortCalibrationInCAAMode()
Const MAX_CNT = 200
Dim stat As Variant
Dim dfltRM As Variant
Dim sesn As Variant
Dim retCount As Long
Dim Buffer As String * MAX_CNT
Dim Response As String * VI_FIND_BUFLEN
Dim sInputString As String
Rem Begin by initializing the system
stat = viOpenDefaultRM(dfltRM)
If (stat < VI_SUCCESS) Then
Rem Error initializing VISA...exiting
Exit Sub
End If
Rem Open communication with USB Protocol
Rem NOTE: For simplicity, we will not show error checking
Rem 0x0B5B::0xFF60::32850021_76227-3_102 = Vendor id::Product
id::dut usb id
stat = viOpen(dfltRM,
"USB0::0x0B5B::0xFF60::32850021_76227-3_102::INSTR", VI_NULL, VI_NULL,
sesn)
Rem Set some visa attributes
stat = viSetAttribute(sesn, VI_ATTR_TMO_VALUE, 90000)
stat = viSetAttribute(sesn, VI_ATTR_SEND_END_EN, VI_TRUE)
stat = viSetAttribute(sesn, VI_ATTR_SUPPRESS_END_EN, VI_FALSE)
stat = viClear(sesn)
'Switch to Cable-Antenna Analyzer Mode
A-6
PN: 10580-00322 Rev. F
Appendix A — Examples
S331L PM
Need help?
Do you have a question about the Site Master S331L and is the answer not in the manual?