252
SDA-OM-E Rev H
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 be
' fitted into the screen in unscaled mode.
To continue a comment on to another line, another quotation mark is required on the new line.
Variable Types
VBS supports the following variable types:
Integer
signed 16 bit value in the range -32768 to 32767
Long
signed 32 bit value in the range -2
31
to +2
31
- 1
Single
real number or floating point number
Double
real number or floating point number
Boolean
Boolean or logical value
String
string of characters
They are supported when making comparisons using real numbers, beware of testing for equality,
because of rounding errors. It may be better to apply a tolerance band. For Boolean, integers and
strings, equality is valid.
You can use variables in VBS without declaring the type. The context may force an implicit type
assignment. For example, if the result of a calculation is of a different type from the defined type,
the type may be changed. Always set out calculations in such a way that type changes will not
affect the final result in an undesirable or unpredictable way. If you want to change the type of a
variable or a result, use a conversion function that will show others what you intend to happen.
The conversion functions are CDbl, CInt, CLng, CSng, CStr.
Содержание 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 ...