Technical data
150 Agilent Connectivity Guide
6 Programming Your Instruments
’ and adjusting the frequency, amplitude, and offset.
With Fgen
.WriteString "*RST" ’ Reset the function generator
.IO.Clear ’ Clear errors and status registers
.WriteString "FUNCtion SINusoid" ’ Select waveshape
’ Other options are SQUare, RAMP, PULSe, NOISe, DC, and USER
.WriteString "OUTPut:LOAD 50" ’ Set the load impedance in Ohms
’ (50 Ohms default)
’ May also be INFinity, as when using oscilloscope or DMM
.WriteString "FREQuency 2500" ’ Set the frequency.
.WriteString "VOLTage 1.2" ’ Set the amplitude in Vpp.
’ Also see VOLTage:UNIT
.WriteString "VOLTage:OFFSet 0.4" ’ Set the offset in Volts
’ Voltage may also be set as VOLTage:HIGH and VOLTage:LOW for
’ low level and high level
.WriteString "OUTPut ON" ’ Turn on the instrument output
End With
Exit Sub
MyError:
txtError = Err.Description & vbCrLf
Resume Next
End Sub