User manual

Table Of Contents
Part 4: Automation Result Interface Reference
Waveform Interface
Arguments (optional)
arrayValuesScaled Boolean 1 (TRUE) = data is scaled
0 (FALSE) = data is raw
Determines whether returned values are scaled or raw.
Passing TRUE indicates scaled data; FALSE indicates raw
data. Default is TRUE. Scaled values are double precision;
raw values are 16-bit signed integers. See the properties
VerticalPerStep, VerticalResolution and VerticalOffset for
more information.
numSamples Long -1 = retrieve all data Number of samples to retrieve. Default is -1.
startIndex Long 0 = first sample Index of the first sample to be retrieved. Default is 0.
sparsingFactor Long 1 = no sparsing
Determines the sparsing factor to use. Default is 1. For
example, a sparsing factor of 5 means to retreive every 5th
point. Use the math function Sparse in order to configure
sparsing offset.
Example
Reads values to use for DataArray arguments from a spreadsheet, then loops through the retrieved array,
saving the data to the spreadsheet along with sample index and sample time.
Const ROWOFFSET = 10
Const COLOFFSET = 7
Dim HorizontalPerStep As Double
Dim HorizontalOffset As Double
Dim ScaleArray As Boolean
Dim nSamples As Long
Dim startIndex As Long
Dim sparseFactor As Long
Dim wform
ScaleArray = Cells(9, 5) nSamples = Cells(10, 5) startIndex = Cells(11, 5)
sparseFactor = Cells(12, 5)
wform = app.Acquisition.C1.Out.Result.DataArray
HorizontalPerStep = app.Acquisition.C1.Out.Result.HorizontalPerStep
HorizontalOffset = app.Acquisition.C1.Out.Result.HorizontalOffset
For i = 0 To UBound(wform)
Cells(i + ROWOFFSET, COLOFFSET) = i
Cells(i + ROWOFFSET, COLOFFSET +1) = HorizontalPerStep * i +HorizontalOffset
Cells(i + ROWOFFSET, COLOFFSET+2) = wform(i)
Next i
4-9