Keysight B2980 Programming Guide, Edition 1
2- 21
Programming Examples
Sampling Measurements
Table 2-5
Sampling Measurement Example
Sub B2900control(ByVal ioObj As Ivi.Visa.Interop.FormattedIO488, ByRef s As String,
ByRef filename As String)
filename = "../../../execution result/Sampling1.txt" ’2
ioObj.WriteString("*RST") ’ Reset ’4
Try ’ Set fixed range current measurement
ioObj.WriteString(":sens:func ""curr""") ’7
ioObj.WriteString(":sens:curr:rang:auto off")
ioObj.WriteString(":sens:curr:rang 2e-9")
’ Set measurement speed to 0.1 PLC
ioObj.WriteString(":sens:curr:nplc:auto off") ’12
ioObj.WriteString(":sens:curr:nplc 0.1")
’ Adjust trigger timing parameters
ioObj.WriteString(":trig:acq:del 2.0e-3") ’16
’ Generate 6 triggers in 4 ms period
ioObj.WriteString(":trig:sour tim") ’19
ioObj.WriteString(":trig:tim 4e-3")
ioObj.WriteString(":trig:coun 6")
Catch ex As Exception
Console.WriteLine("An error occurred: " + ex.Message)
End Try
’ Turn on input switch
ioObj.WriteString(":inp on") ’28
’ Initiate acquire
ioObj.WriteString(":init:acq") ’31
Try ’ Retrieve measurement result
ioObj.WriteString(":fetc:arr:curr?") ’34
s = ioObj.ReadString()
Catch ex As Exception
Console.WriteLine("An error occurred: " + ex.Message)
End Try
End Sub
Line
Description
2
Defines the file name used for saving the result data.
4
Resets the B2980.
7 to 9
Sets the current measurement function and the fixed range measurement.
12 to 13
Sets the aperture time to 0.1 PLC.