Teledyne LeCroy WaveExpert 100H Operators Manual User Manual
Page 275
Wave Expert
WE-OM-E Rev A
273
parameter result into newValueArray(0). As with the arrays of the Waveform Script, you cannot
refer directly to elements of the input and output arrays. You may not write something like
OutResult.ValueArray (0) = P.
Note that the unit of the parameter is displayed as the same as the vertical unit of the trace, even if
you have squared the data, for example, unless you change the unit yourself.
To find out how to edit a parameter script, click here.
The default parameter script is shown below.
' TODO add your custom code here accessing OutResult and InResult objects
' Here's a small example that just inverts the waveform
numParam = InResult.Samples
ReDim newValueArray(numParam)
scaledData = InResult.DataArray
For i = 0 To numParam-1
newValueArray(i) = -scaledData(i)_' Change this to do something useful.
Next
OutResult.ValueArray = newValueArray 'only support raw data
Your parameter script should include something like this:
A. Do calculation to obtain your parameter value from the input data array.
B. newValueDataArray (0) = ParameterValue
C. OutResult.ValueArray = newValueArray
You can test this script using setup MeanDemoScriptApr2.lss.
You can edit scripts using Notepad, but you will not get any notification of errors.
You are not allowed to write OutResult.ValueArray(0) = MeanParameter.
InResult.DataArray and OutResult.DataArray are only to be used as shown in the default scripts
and in the example scripts. You cannot refer to, or modify, any individual element in these arrays.
Scripting with VBScript
Separators
The two separators in VBS are the colon : and the single quotation mark .
Using the colon, you can place two or more statements on a line, for example:
XMin = 0.0 : XMax = 800.0 : YMin = 0.0 : YMax = 600.0
There is also an implied separator whenever a new line is begun.
Using the quotation mark you can signify that the remainder of the line is a comment:
non-executable material that is usually used to clarify the workings of the script. For example:
RMSMax = 32767 / Sqr (2) ' RMS of the largest sinusoid that can