
9
NumReadings = 1024
’ Take 1024 readings
.
Resp = Space$(80)
Cmd = Space$(80)
’ Configure the instrument for scanning DCV.
’
SendKI ("*RST")
' Put instrument in known state.
SendKI ("FORM:DATA ASCII
") ' Format data as an ASCII string.
SendKI ("FORM:ELEM READ")
' Return the reading with units only.
SendKI ("SAMP:COUN " + CStr(NumReadings))
' Take 1024 readings.
SendKI ("FUNC 'VOLT:DC', " + ScanList)
' Set function to DCV.
SendKI ("VOLT:RANG 100," + ScanList)
' Set Range to 100V.
SendKI ("VOLT:AVER:STAT OFF," + ScanList)
SendKI ("VOLT:DIG 4," + ScanList)
' Read to 4 significant digits.
SendKI ("VOLT:NPLC 0.002," + ScanList)
' Set NPLC to 0.002.
SendKI ("CALC3:OUTP OFF")
' Turn off limit test.
SendKI ("SYST:LSYN OFF")
' Turn off line-sync.
SendKI ("DISP:ENAB OFF")
' Turn off display.
SendKI ("SYST:AZER:STAT OFF")
' Turn off auto-zero.
SendKI ("CALC3:LIM1:STAT OFF," + ScanList)
' Turn off limits.
SendKI ("TRIG:DEL 0")
' Set trigger delay to 0 seconds.
SendKI ("TRAC:CLE")
' Clear reading buffer.
SendKI ("ROUT:SCAN " + ScanList)
' Set scan list.
SendKI ("ROUT:SCAN:LSEL INT")
' Initiate scan.
SendKI ("*OPC?")
' Determines if mainframe is ready.
Resp = QueryKI()
SendKI ("INIT")
' Initiate scan and store in buffer.
SendKI ("*OPC?")
Resp = QueryKI()
' Wait for scan to complete.
SendKI ("ROUT:SCAN:LSEL NONE;*OPC?")
' Stop scan.
Resp = QueryKI()
SendKI ("TRACE:DATA?")
' Get readings from buffer.
Resp = QueryKI()
Format_Readings (Resp)
SendKI ("DISP:ENAB ON")
' Turn display back on.
CloseWinsocket
' Disconnect connection to mainframe.
TestRunning = False
End Sub
Topics
Topics
Topics
Содержание 7710
Страница 2: ......