Keysight Technologies E5260 Series Programming Manual page 179

Parametric measurement solutions
Hide thumbs Also See for E5260 Series:
Table of Contents

Advertisement

Dim range As Double
If mode = 1 Then
range = 10 ^ (rng - 20)
If rng = 20 Then
session.WriteString("UNT? 1" & vbLf)
Dim unt As String = session.ReadString(256)
Dim mdl(8) As String : Dim c As String
Dim a As Integer : Dim b As Integer = 0 : Dim d As Integer = 0
For a = 1 To Len(unt)
c = Mid(unt, a, 1)
If c = "," Then mdl(d) = Mid(unt, b + 1, a - b - 1) : d = d + 1
If c = ";" Then b = a
Next
If mdl(chan) = "E5291A" Then range = 0.2
End If
Else
If rng = 8 Then range = 0.5
If rng = 9 Then range = 5
If rng = 11 Then range = 2
If rng = 12 Then range = 20
If rng = 13 Then range = 40
If rng = 14 Then range = 100
If rng = 15 Then range = 200
End If
'value = value & Chr(13) & Chr(10) & "status = " & status
'value = value & Chr(13) & Chr(10) & "type = " & type
'value = value & Chr(13) & Chr(10) & "mode = " & mode
'value = value & Chr(13) & Chr(10) & "channel = " & chan
'value = value & Chr(13) & Chr(10) & "sign = " & sign
'value = value & Chr(13) & Chr(10) & "range = " & range
'value = value & Chr(13) & Chr(10) & "count = " & count & Chr(13) & Chr(10)
Dim meas As Double
If type = 0 Then meas = count * range / 20000 'source data
If type = 1 Then meas = count * range / 50000 'measurement data
data(j, i) = Chr(13) & Chr(10) & meas * 1000 & ", " & status
session.WriteString("DZ" & vbLf)
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Check_err:
session.WriteString("EMG? " & err & vbLf) : msg = session.ReadString(256)
MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
Exit Sub
End Sub
Line
43 to 66
Checks the measurement range or output range setting.
68 to 74
If you want to display and save the binary data elements, delete ' at the top of the lines.
76 to 80
Calculates the measurement data or source output data. And, stores the data into the
data array.
82 to 84
Applies 0 V from all channels. And transfers the data stored in the data variable to the
save_data subprogram (see
CSV file specified by the fname variable and displays the data on a message box.
86 to 89
Displays a message box to show an error message if the error is detected.
Keysight E5260/E5270 Programming Guide, Edition 4
' current range
'for E5260/E5270
' voltage range
Description
Table
3-1). And the subprogram will save the data into a
Programming Examples
Reading Binary Output Data
'43
'66
'68
'76
'80
'82
'86
3- 71

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

E5270 seriesE5260aE5262aE5263aE5270b

Table of Contents