YOKOGAWA wt1600 User Manual page 136

Digital power meter
Hide thumbs Also See for wt1600:
Table of Contents

Advertisement

Sample1(GPIB) Get Normal Data
----------------------------------------------------------------------------------------
Private Function GpibNormal() As Integer
Dim msg As String
Dim qry As String
Dim sts As Integer
Dim item As Integer
Dim comma As Integer
Dim length As Integer
Dim cnt As Integer
term = Chr$(10)
msg = Space$(100)
qry = Space$(900)
List1.AddItem "Now Initializing. Wait a moment."
Dummy = DoEvents()
sts = InitGpib
If (sts <> 0) Then
End If
'Initialize the settings
msg = "*RST" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Set the measurment condition
msg = "VOLTAGE:RANGE 100V" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
msg = "CURRENT:RANGE 1A" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
msg = "RATE 500MS" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Set the numerical data output items
'ASCII format, Preset pattern1, Number of data = 60
msg = "NUMERIC:FORMAT ASCII;NORMAL:PRESET 1;NUMBER 60" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Set the transition filter used to detect the completion of the data updating
msg = "STATUS:FILTER1 FALL" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
'Clear the extended event register (Read and trash the response)
msg = "STATUS:EESR?" + term
sts = ilwrt(Dev, msg, Len(msg))
If (sts < 0) Then
End If
sts = ilrd(Dev, qry, Len(qry))
If (sts < 0) Then
End If
IM 760101-11E
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
Call DisplayGPIBError(sts, msg)
GpibNormal = 1
Exit Function
7.4 Output of Normal Measurement Data
'Command buffer
'Query buffer
'terminator
'Initialize GPIB
'Initialize the settings
'Send Command
'Voltage range = 100V
'Send Command
'Current range = 1A
'Send Command
'Update Rate = 500ms
'Send Command
'Send Command
'Falling edge of bit0(UPD)
'Send Command
'Send Command
'Receive Query
7
7-7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents