RIGOL DSG3000 Series User Manual
Page 169

RIGOL
DSG3000 Programming Guide
4-13
Dim list As Long
Dim nmatches As Long
Dim matches As String * 200
'Keep the device number acquired
' Acquire the usb resource of visa
Call viOpenDefaultRM(defrm)
Call viFindRsrc(defrm, "USB?*", list, nmatches, matches)
' Turn on the device
Call viOpen(defrm, matches, 0, 0, vi)
' Send command to query the status of the LF switch
Call viVPrintf(vi, ":LFO?" + Chr$(10), 0)
' Acquire the status of LF
Call viVScanf(vi, "%t", strRes)
If strRes = 1 Then
' Send the setting command
Call viVPrintf(vi, ":LFO OFF" + Chr$(10), 0)
Label1(0).ForeColor = &H808080 'Gray
Else
Call viVPrintf(vi, ":LFO ON" + Chr$(10), 0)
Label1(0).ForeColor = &HFFFF& 'Yellow
End If
' Turn off the resource
Call viClose(vi)
Call viClose(defrm)
6. Execution Results
1) Click "LF" to turn on the LF output. The control above the LF button turns yellow (as shown in the
figure below). At this point, the RF signal generator can output LF signal via the [LF OUTPUT]
connector according to the current configuration. Click "LF" again to turn off the LF output and
the control above the LF button turns gray.