Application Programs 6
Keysight 34420A User’s Guide 251
... continued
Rem Need to set timeout so that sampling and averaging can complete.
Rem This assumes triggers occur at a rate high enough to be a
Rem negligible factor.
errnum% = GpibTimeout(hGpib%, isc&, samp_count% * nplc% / 20)
Call check_srq
Rem Use "INIT" and "FETCH" to initiate measurement and read back
Rem results into an array.
cmd$ = "INIT"
errnum% = GpibOutputS(hGpib%, device&, cmd$, Len(cmd$))
Call check_srq
reed$ = "FETC?"
errnum% = GpibOutputS(hGpib%, device&, reed$, Len(reed$))
errnum% = GpibEnterA(hGpib%, device&, Readings!(0), samp_count%)
Text1.Text = Str$(Readings!(0))
Call check_srq
Rem Close the instrument
errnum% = GpibClose(hGpib%)
End Sub
Sub Command5_Click ()
form1.PrintForm
End Sub