Agilent Technologies E2094S Guia do Utilizador Página 23

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 146
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 22
Building a VISA Application in Windows 2
Agilent VISA User’s Guide 23
Sample Program Contents
A summary of the VISA function calls used in the preceding sample
Visual Basic program follows. For a more detailed explanation of VISA
functionality, see Chapter 3, “Programming with VISA.” See the VISA
Online Help for more detailed information on these VISA function
calls.
Call viOpen(defrm, "GPIB0::22::INSTR", 0, 0,
vi)
' Initialize device
Call viVPrintf(vi, "*RST" + Chr$(10), 0)
' Ask for the device's *IDN string.
Call viVPrintf(vi, "*IDN?" + Chr$(10), 0)
' Read the results as a string.
Call viVScanf(vi, "%t", strRes)
' Display the results
MsgBox "Result is: " + strRes, vbOKOnly,
"*IDN? Result"
' Close the vi session and the resource
manager session
Call viClose(vi)
Call viClose(defrm)
End Sub
Table 3 Summary of VISA Function Calls in Visual Basic Sample
Function(s) Description
viOpenDefaultRM You must first open a session with the default
resource manager with the viOpenDefaultRM
function. This function will initialize the default
resource manager and return a pointer (defrm) to that
resource manager session.
Vista de página 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 145 146

Comentários a estes Manuais

Sem comentários