User manual

Table Of Contents
MAUI Oscilloscopes Remote Control and Automation Manual
DataArray
Variant array containing data for a trace. The implementation depends on the type of waveform.
Applies to: Digital, Persist, Waveform, XY
XY 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 pre-
cision; raw values are 16-bit signed integers. See the
properties XVerticalPerStep, XVerticalResolution and
XVerticalOffset(and the corresponding Y coordinate)
for more information.
numSamples Long -1 = retrieve all data Number of samples to retrieved. 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. A
sparsing factor of 5 means to retrieve every 5th point.
Use the math function Sparse 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 XYwform
ScaleArray = Cells(9, 5) nSamples = Cells(10, 5) startIndex = Cells(11, 5)
sparseFactor = Cells(12, 5)
XYwform = app.Math.XY.Out.Result.DataArray
HorizontalPerStep = app.Math.XY.Out.Result.HorizontalPerStep
HorizontalOffset = app.Math.XY.Out.Result.HorizontalOffset
For i = 0 To UBound(XYwform)
For j = 0 To 1 Cells(i + ROWOFFSET, COLOFFSET) = i
Cells(i + ROWOFFSET, COLOFFSET + 1) = HorizontalPerStep * i HorizontalOffset
Cells(i + ROWOFFSET, COLOFFSET + 2) = XYwform(i, 0)
Cells(i + ROWOFFSET, COLOFFSET + 3) = XYwform(i, 1)
Next j
Next i
4-8