![KEPCO KLR SERIES Скачать руководство пользователя страница 37](http://html1.mh-extra.com/html/kepco/klr-series/klr-series_developers-manual_1956489037.webp)
KLR-DEV 060713
3-15
FIGURE 3-3. SETTING THE OUTPUT AND TAKING A MEASUREMENT EXAMPLE,
WRITTEN IN VISUAL BASIC (SHEET 2 OF 2)
3.4.2
USING A LIST TO PERFORM A SERIES OF OPERATIONS
The filename for this example is
VBListexample.txt
, located in the ivi\drivers\kepco\examples
folder (see Figure 3-6 for complete code).
FIGURE 3-4. EXAMPLE OF USING A LIST, WRITTEN IN VISUAL BASIC (SHEET 1 OF 2)
' display the measured voltage
StatusTextBox.Text = StatusTextBox.Text & "Measured Voltage is " & measVoltage & " at chan-
nel " & channel
StatusTextBox.Refresh
ReadInstrumentError driver
driver.Close
StatusTextBox.Text = StatusTextBox.Text & "Driver closed." & vbCrLf
StatusTextBox.Refresh
Exit Sub
ErrorHandler:
MsgBox Err.Description
driver.Close
Exit Sub
End Sub
' Wait the specified number of seconds
Private Sub Delay(DelayTime As Single)
Dim Finish As Single
Finish = Timer() + DelayTime
Do
Loop Until Finish <= Timer()
End Sub
'/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'This program executes a 6 point current and voltage list.
' It also specifies 3 different dwell times.
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
Option Explicit
Public driver As KepcoDCPwr
Public outputPtr As IKepcoKLROutput
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdStart_Click()
Set driver = New KepcoDCPwr
On Error GoTo errorHandler
' initialize the driver
driver.Initialize "GPIB0::6::INSTR", _
False, _
True, _
"Cache=true,InterchangeCheck=false,QueryInstrStatus=true,Simulate=false"
Dim result As Boolean
result = driver.Initialized
' get references to the needed interfaces
Set outputPtr = driver.Outputs.Item(driver.Outputs)
Set listPtr =driver.list
Содержание KLR SERIES
Страница 2: ......
Страница 10: ......
Страница 42: ......
Страница 58: ...4 16 KLR DEV 060713 FIGURE 4 10 FUNCTION GENERATOR PANEL FIGURE 4 11 CONFIGURE User Sequence vi BLOCK DIAGRAM ...
Страница 59: ......
Страница 60: ......
Страница 61: ...FIGURE 4 13 FUNCTION GE ...
Страница 62: ......
Страница 86: ......
Страница 90: ......