Kepco KLR Series Developers Guide Manual de usuario Pagina 38

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 128
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 37
3-16 KLR-DEV 060713
FIGURE 3-4. EXAMPLE OF USING A LIST, WRITTEN IN VISUAL BASIC (SHEET 2 OF 2)
3.4.3 SETTING LIMIT MODEL
The filename for this example is VBlimit model Example.txt, located in the ivi\driv-
ers\kepco\examples folder (see Figure 3-5 for complete code). This example is very similar to
the other examples in this section. The difference is that functions in the driver are used to per-
form the operation instead of setting the value to a specific state. Access to the functions is
identical to the method used to access the open and close of the driver. The functions used are:
KpDCPwr_SetAttributeViReal64 which sets the various attributes to a specific value.
KpDCPwr_EnablePasswordState which sends the string to the unit to enable the ability to set
the limit model.
Delay (100)
ReadInstrumentError driver
driver.Close
Exit Sub
errorHandler:
MsgBox Err.Description
driver.Close
Exit Sub
End Sub
Private Sub ReadInstrumentError(agDrvr As IIviDriver)
' Read instrument error queue until its empty.
Dim errCode As Long
errCode = 999
Dim errMsg As String
StatusTextBox.Text = StatusTextBox.Text & vbCrLf
While errCode <> 0
agDrvr.Utility.ErrorQuery errCode, errMsg
StatusTextBox.Text = StatusTextBox.Text & "ErrorQuery: " & errCode & ", " & errMsg & vbCrLf
Wend
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
Vista de pagina 37
1 2 ... 33 34 35 36 37 38 39 40 41 42 43 ... 127 128

Comentarios a estos manuales

Sin comentarios