Agilent Technologies B1500A Manual de servicio Pagina 237

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 598
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 236
Agilent B1500A/B1505A Programming Guide, Edition 11 3-59
Programming Examples
Sampling Measurements
mret = session.ReadString(16 * 3 * nop1 + 1) ’59
For i = 0 To nop1 - 1
id(i) = Val(Mid(mret, 4 + 16 * 3 * i, 12))
d1(i) = Val(Mid(mret, 16 + 4 + 16 * 3 * i, 12))
d2(i) = Val(Mid(mret, 16 * 2 + 4 + 16 * 3 * i, 12))
s1(i) = Mid(mret, 16 + 1 + 16 * 3 * i, 3)
s2(i) = Mid(mret, 16 * 2 + 1 + 16 * 3 * i, 3)
r1(i) = Math.Round(bias / d1(i), 3)
r2(i) = Math.Round(bias / d2(i), 3)
data(j, i) = Chr(13) & Chr(10) & id(i) & ", " & d1(i) * 1000 & ", " & r1(i) & ",
" & s1(i) & ", " & d2(i) * 1000 & ", " & r2(i) & ", " & s2(i)
Next i
session.WriteString("DZ" & vbLf) ’71
save_data(fname, title, value, data, nop1, nop2, session, t)
Exit Sub
Check_err: ’75
session.WriteString("EMG? " & err) : msg = session.ReadString(256)
MsgBox("Instrument error: " & err & Chr(10) & msg, vbOKOnly, "")
Exit Sub
Check_nop: ’80
MsgBox("No. of data: " & rep & " (not " & nop1 * 3 & ")", vbOKOnly, "")
End Sub
Line Description
59 to 69 Reads the returned data and stores it into the mret string variable. Finally, stores the
measured data into the data array.
71 to 73 Applies 0 V from all channels. And transfers the data stored in the data variable to the
save_data subprogram (see Table 3-1). And the subprogram will save the data into a
CSV file specified by the fname variable and displays the data on a message box.
74 to 78 Displays a message box to show an error message if the error is detected.
80 to 81 Displays a message box to show an error message if the number of returned data is not
correct (nop1).
Vista de pagina 236
1 2 ... 232 233 234 235 236 237 238 239 240 241 242 ... 597 598

Comentarios a estos manuales

Sin comentarios