Agilent Technologies 34420A Especificaciones Pagina 229

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 294
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 228
... continued
The following subroutine may be included in the GLOBAL.BAS file.
’ HPIB.DLL Access
’ Put into your GLOBAL.BAS file
Global isc As Long
Global device As Long
Global hHpib As Integer
Global errnum As Integer
Sub check_srq ()
condition = 1
’ Display any errors caused by the return of an HPIB command.
If errnum% <> NOERROR Then
MsgBox ("Error = " + HpibErrStr$(errnum%))
End If
’ Wait for the completion of the current command.
errnum% = HpibOutPutS(hHpib%, device&, "*OPC?", 5)
errnum% = HpibEnter(hHpib%, device&, done!)
’ If there is an error bit set, obtain the error.
errnum% = HpibSpoll(hHpib%, device&, response%)
If response% And 32 Then
syst_err$ = "SYST:ERR?"
errnum% = HpibOutPutS(hHpib%, device&, syst_err$, Len(syst_err$))
errnum% = HpibEnter(hHpib%, device&, errx!)
actual% = 80
MsgBox ("Error=" + Str$(errx!))
errnum% = HpibOutPutS(hHpib%, device&, "*CLS", 4)
End If
’ Obtain other HPIB errors.
errnum% = HpibStatus(hHpib%, isc&, condition, Status%)
If errnum% <> NOERROR Then
MsgBox ("Error = " + HpibErrStr$(errnum%))
End If
If Status% = 1 Then
errnum% = HpibSpoll(hHpib%, device&, Status%)
If errnum% <> NOERROR Then
MsgBox ("Error = " + HpibErrStr$(errnum%))
End If
End If
End Sub
6
Chapter 6 Application Programs
Microsoft Visual Basic Language Program
229
Vista de pagina 228
1 2 ... 224 225 226 227 228 229 230 231 232 233 234 ... 293 294

Comentarios a estos manuales

Sin comentarios