EasyManua.ls Logo

ADCMT 6156 - Page 204

Default Icon
260 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6146/6156 DC Voltage/Current Generators Operation Manual
5.9.3 Program Example 2-Memory Setting, Scan Operation and Voltage/Source Measurement
5-56
Call gpibwrt(intDMMDes, "*STB?") ' STB query
Call gpibrd(intDMMDes, strRecvStr) ' Data reception
lngDMMSTB = CLng(strRecvStr) ' STB value storing
lngDMMSTB = lngDMMSTB And 16 ' AND operation on the Message Available bit
Loop Until lngDMMSTB = 16 ' Repeats until the measurement is complete.
Call gpibrd(intDMMDes, strRecvStr) ' Receives the measured value.
' Stores the voltage measured data on the sheet.
ActiveSheet.Cells(lngRowNo, lngVDataCol).value = strRecvStr
Call gpibwrt(intDMMDes, "F5") ' DC current measurement function
Call gpibwrt(intDMMDes, "*TRG") ' Sends the trigger and starts measurement.
Do
Call gpibwrt(intDMMDes, "*STB?") ' STB query
Call gpibrd(intDMMDes, strRecvStr) ' Data reception
lngDMMSTB = CLng(strRecvStr) ' STB value storing
lngDMMSTB = lngDMMSTB And 16 ' AND operation on the Message Available bit
Loop Until lngDMMSTB = 16 ' Repeats until the measurement is complete.
Call gpibrd(intDMMDes, strRecvStr) ' Receives the measured value.
' Stores the number of measurement and the current measured data on the sheet.
ActiveSheet.Cells(lngRowNo, lngMeasNoCol).value = lngMeasCnt
ActiveSheet.Cells(lngRowNo, lngIDataCol).value = strRecvStr
Call gpibwrt(intDMMDes, "F1") ' DC voltage measurement function
Call gpibwrt(intVIGDes, "*TRG") ' Increments the VIG memory number.
lngRowNo = lngRowNo + 1 ' Increments the row number.
End If
DoEvents ' Turns over the control to OS temporarily.
Loop Until blnSWEb = True ' Repeats until the Sweep End bit is set.
Next
Call gpibwrt(intVIGDes, "SBY") ' Sets the VIG output to OFF.
Call ibonl(intVIGDes, 0) ' Sets VIG offline.
Call ibonl(intDMMDes, 0) ' Sets DMM offline.
End Sub

Table of Contents

Related product manuals