Agilent Technologies E5071C Manual page 1001

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

E5071C
Reading Data in Binary Format
Overview
Sample Program in Excel VBA
Sample Program in HT Basic
Other topics about Sample Programs
Overview
This sample program demonstrates how to retrieve formatted data arrays
in the Binary transfer format.
This program holds the sweep on channel 1, then retrieves and displays
the stimulus array.
See Retrieving Measurement Results for this programming.
Sample Program in Excel VBA
Sub read_bin_Click()
Dim defrm As Long
Dim vi As Long
Dim Result As String * 10000
Dim Res() As Double
Dim Nop As Long
Const TimeOutTime = 10000
' Open Analyzer
Call viOpenDefaultRM(defrm)
Call viOpen(defrm, "GPIB0::17::INSTR", 0, 0, vi)
Call viSetAttribute(vi, VI_ATTR_TMO_VALUE, TimeOutTime)
'
Call viVPrintf(vi, ":CALC1:PAR1:SEL" + vbLf, 0)
Call viVPrintf(vi, ":INIT1:CONT OFF" + vbLf, 0)
Call viVPrintf(vi, ":ABOR" + vbLf, 0)
'
' Reading out Measurement Frequency Data in Binary transfer format
Call viVPrintf(vi, ":FORM:DATA REAL" + vbLf, 0)
Call viVPrintf(vi, ":CALC1:DATA:FDAT?" + vbLf, 0)
Call Scpi_read_binary_double_array(vi, Res, Nop)
'
' Write data in cells of Excel
Range("A6:D1607").Clear
For i = 0 To Nop - 1
j = i Mod 2
1228

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents