Agilent Technologies E2094S Guía de usuario Pagina 23

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 146
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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 pagina 22
1 2 ... 18 19 20 21 22 23 24 25 26 27 28 ... 145 146

Comentarios a estos manuales

Sin comentarios