HP Drive Manual de usuario Pagina 35

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 114
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 34
Using IVI with Visual C# and Visual Basic
35
Imports Agilent.Agilent34401.Interop
Module Module1
Sub Main()
Dim dmm As New Agilent34401
dmm.Initialize("GPIB::23", False, True,
"simulate=true")
dmm.Function =
Agilent34401FunctionEnum.Agilent34401FunctionDCVolts
dmm.DCVoltage.Configure(1.5, 0.001)
dmm.Trigger.Delay = 0.01
Dim reading As New Double
reading = dmm.Measurement.Read(1000)
dmm.Close()
Console.WriteLine(“The reading is {0}”, reading)
Console.ReadLine()
End Sub
End Module
The main differences include the following:
To use Visual Basic, select Visual Basic in Project Types.
To enforce type checking, insert a line at the start of the code. Type
Option Explicit On
To call the DCVolts function you need to insert a line of code. Type
dmm.Function =
Agilent34401FunctionEnum.Agilent34401FunctionDCVolts
To dimension a variable for the instrument and reading, use
Dim dmm
and
Dim
reading
.
Further Information
Learn more about Visual C# at http://msdn.microsoft.com/vsharp/.
Learn more about Visual Basic at http://msdn.microsoft.com/vbasic/.
Microsoft® and Visual Studio® are registered trademarks of Microsoft Corporation
in the United States and/or other countries.
Vista de pagina 34
1 2 ... 30 31 32 33 34 35 36 37 38 39 40 ... 113 114

Comentarios a estos manuales

Sin comentarios