Kepco KLR Series Developers Guide Manual de usuario Pagina 36

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 128
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 35
3-14 KLR-DEV 060713
FIGURE 3-3. SETTING THE OUTPUT AND TAKING A MEASUREMENT EXAMPLE, WRITTEN IN VISUAL
BASIC (SHEET 1 OF 2)
'/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' This program demonstrates how to set the output voltage and current
' measure the voltage
' using the IVI-COM driver.
'/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Option Explicit
Public driver As KepcoDCPwr
Public outputPtr As IKLROutput
Public protectionPtr As IKLRProtection
Public measurementPtr As IKLRMeasurement
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdStart_Click()
Set driver = New KepcoDCPwr
On Error GoTo ErrorHandler
' initialize the driver - note ID device is true
driver.Initialize "GPIB0::6::INSTR", _
True, _
True, _
"Cache=true,InterchangeCheck=false,QueryInstrStatus=true,Simu-
late=false"
Dim result As Boolean
result = driver.Initialized
Set outputPtr = driver.Outputs.Item(driver.Outputs)
Set protectionPtr = driver.Protections.Item(driver.Protections)
Set measurementPtr = driver.Measurements.Item(driver.Measurements)
' set voltage level
outputPtr.VoltageLevel 75
' enable OV protection and set OV level
protectionPtr.ConfigureOVP 15
' set current level
outputPtr.CurrentLimit 10
' enable the output
outputPtr.Enabled = True
Delay 10
' Measure the voltage
Dim measVoltage As Double
measVoltage = measurementPtr.Measure(KepcoDCPwrMeasurementVoltage)
Vista de pagina 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 127 128

Comentarios a estos manuales

Sin comentarios