SDA Operator’s Manual
SDA-OM-E Rev H
249
newArray(i) = ScaleFactor * (unscaledData(i)) ^ 2
Next
OutResult.DataArray(False) = newArray ' signed long integer data output
Example Parameter Function Script: RMS of a waveform
' Example script to produce a parameter.
' This script calculates the root mean square
' of the input waveform.
' Note that a trace of nominal length 1000 has data from
' 0 to 1001. The 1001st point is not visible, so you
' normally use points 0 to 1000,
' giving 1001 points and 1000 intervals between points.
startData = 0
endData = InResult.Samples
LastPoint = endData - 1 ' because the last point is invisible.
ReDim newArray(InResult.Samples) ' to store the results
unscaledData = InResult.DataArray(True)
' InResult.DataArray(False) provides
' integer data from -32768 to 32767.
' InResult.DataArray(True) provides real data
' in the same unit as the vertical scale of the trace.
Total = 0
For i = 0 To LastPoint
Total = Total + (unscaledData(i)) ^ 2
Next
NewArray(0) = Sqr (Total / (Las 1)) Place the result in the
zeroth element.
OutResult.ValueArray(True) = newArray ' integer data output
The default waveform function script: explanatory notes
InResult.Samples is the number of points in the incoming waveform.
InResult.DataArray(Boolean) (or InResult1.DataArray or InResult2.DataArray) is the array of input
data. If the Boolean is True you get scaled real data in the units of the trace. If the Boolean is
false you get unscaled integer data in the range -32768 to + 32767.
The value of InResult.Samples is the total number of data in a trace. It is two more than the
nominal value given on the screen. The first point DataArray(0), coincides with the left edge of the
screen, apart from the wobble caused by the trigger-to-sample clock difference. If the trace length
is nominally 500, the right edge of the screen coincides with DataArray(500), which is the 501
st
point. The last point, number 502, is just off the right of the screen, and is never seen. That is why
the loop in the script runs only to endData - 1.
OutResult.Samples is the number of data in the output trace, and is set to be the same as the
number of data in the input trace. If you set the output length less than the input length, you get a
shorter trace, the remainder being made of zeroes. If you try to set the output values to
something illegal, you may find that a part of the trace retains the values from a previous
acquisition.
Содержание SDA
Страница 1: ...SERIAL DATA ANALYZER OPERATOR S MANUAL December 2007 ...
Страница 148: ...Standard Horizontal Parameter Help Markers Standard Vertical Parameter Help Markers 148 SDA OM E Rev H ...
Страница 223: ...SDA Operator s Manual Example 6 SDA OM E Rev H 223 ...
Страница 225: ...SDA Operator s Manual SDA OM E Rev H 225 ...
Страница 232: ...In this figure the panel has been pasted onto the Excel sheet for comparison 232 SDA OM E Rev H ...
Страница 243: ...SDA Operator s Manual This example used the CORREL Array1 Array2 function of Excel as depicted below SDA OM E Rev H 243 ...
Страница 246: ...246 SDA OM E Rev H ...
Страница 247: ...SDA Operator s Manual Excel Example 5 Using a Surface Plot SDA OM E Rev H 247 ...
Страница 279: ...SDA Operator s Manual Convolving two signals SDA OM E Rev H 279 ...
Страница 310: ...The jitter wizard is accessed from the Analysis drop down menu 310 SDA OM E Rev H ...
Страница 327: ...SDA Operator s Manual SDA OM E Rev H 327 ...
Страница 328: ...328 SDA OM E Rev H ...
Страница 394: ...394 SDA OM E Rev H ...
Страница 395: ...SDA Operator s Manual SDA OM E Rev H 395 ...