Extendedstatus, Firsteventtime – Teledyne LeCroy WaveExpert series Automation Manual User Manual
Page 48
![background image](/manuals/353447/48/background.png)
A
BOUT
R
ESULTS
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) ' index out lines
For i = 0 To UBound(wform, 1) ' index out samples in line
Cells(i + ROWOFFSET, j + COLOFFSET) = wform(i, j)
Next
Next
ExtendedStatus
Applies to: All Result interfaces.
Description: Reserved for future use.
Example:
N/A
FirstEventTime
Applies to: All Result interfaces.
Description: Absolute trigger time of the acquisition, or the time of the first trigger in an acquisition that utilizes
multiple sweeps. Examples of multi-sweep acquisitions are Sequence Mode and when a source channel is
configured for pre-processor averaging.
Times are returned encoded as a currency value (VT_CY) within a variant, this allows the use of the full 64-bit
resolution of the timestamp value. Values are referenced to 1st Jan 2000, with 1ns resolution. Note that VT_CY
values are stored as 64-bit (8 byte) two's complement integers, scaled by 10,000 to give a fixed-point number with
15 digits to the left of the decimal point, and 4 digits after. See the example for details on decoding
FirstEventTime
as well as other properties that return times such as LastEventTime and UpdateTime.
Example:
Dim FirstEventTime
Dim TimeString as String
FirstEventTime = app.Acquisition.C1.Out.Result.FirstEventTime
timeString = DecodeTimeProperty(FirstEventTime)
What follows is a function for decoding the FirstEventTime, LastEventTime and UpdateTime properties.
Function DecodeTimeProperty(ByVal EventTime) As String
' Decodes result returned by FirstEventTime, LastEventTime and UpdateTime
properties
Dim days, thedate, hours, thehour, minutes, theminute, seconds
Dim outstring As String
days = EventTime / (86400 * 100000#) ' use 1e5 since the data returned
is scaled by 10,000
thedate = DateAdd("d", days, "1-Jan-00")
hours = (days - Int(days)) * 24 'calculate remaining hours
thehour = Int(hours) 'truncate to get hour in the day
minutes = (hours - thehour) * 60 'calculate minutes since hour began
theminute = Int(minutes) 'truncate to get minute value
seconds = (minutes - theminute) * 60 'calculate number of seconds
'Format output string
DecodeTimeProperty = thedate & " " & thehour & ":" & theminute & ":" &
seconds
2-12
916435 RevA