User manual

Table Of Contents
Part 4: Automation Result Interface Reference
Digital Interface
Retrieves a 2D array containing the state of each sample on each line. The value 1 is returned if he sample
was above the threshhold, 0 if below.
Arguments (optional)
numSamples Long -1 = retrieve all data
Number of samples to retrieve. Default is -1.
numLines Long -1 = retrieve all digital lines Number of lines to retrieve. Default is -1.
startIndex Long 0 = first index Index of the first sample to be retrieved. Default is 0.
startLine Long 0 = first digital line
Index of the first line to be retrieved. Default is 0. The user
selects which lines to enable; only data from enabled lines
are included in the DataArray
Example
Reads values to use for DataArray arguments from a spreadsheet, then loops through the retrieved array,
saving the data to the spreadsheet.
Const ROWOFFSET = 10
Const COLOFFSET = 7
Dim nSamples As Long
Dim nLines As Long
Dim startIndex As Long
Dim startLine As Long
Dim wform
nSamples = Cells(9, 5) nLines = Cells(10, 5) startIndex = Cells(11, 5) startLine =
Cells(12, 5)
wform = app.LogicAnalyzer.Digital1.Out.Result.DataArray(nSamples, nLines,
startIndex, startLine)
Saves the retrieved samples to a spreadsheet, with each digital line in a column:
For j = 0 To UBound(wform, 2)
For i = 0 To UBound(wform, 1)
Cells(i + ROWOFFSET, j + COLOFFSET) = wform(i, j)
Next j
Next i
ExtendedStatus
Reserved for future use.
Applies to: all Result Interfaces.
4-11