Error Handling - LeCroy WaveRunner Xi series Operator's Manual

Oscilloscopes
Hide thumbs Also See for WaveRunner Xi series:
Table of Contents

Advertisement

In the following fi
gure is a type of error message that you may see if one of your calculations has tried to set a
value outside the
range -32768 t
will not happen, you need some ki
the all
owed
range
at the beginning, resulting in the message at the bottom of the instrument screen: This array is
fixed or temporar
ily locked: OutResult.DataArray.

Error Handling

Note that the construction OnError GoTo Label: is not allowed in VBS. In fact no GoTos or labels are allowed.
Therefore there is no way for you to provide handlers to deal with errors and exceptions. You must be aware of all
possibilities at all points in your program, and you must either be certain that errors will not occur, or you must
take action to
ensure that they do not.
Examples:
Sqr
Log
A / B
Array
Size
If there is any possibility that any of these might occur, take steps to deal with this before it can happen.
For example, you may write some kind of generator of pseudo-random statistical values. If these b
distribution that in principle has an infinite range, or a finite range which is wider than the signed 16-bits allowed,
check each value. If a value falls outside the range, you could set it to the maximum or generate another
example.
WRXi-OM-E Rev C
o +32767. It takes extra time to guard against this, but unless you are sure that it
nd of check. In the example on the next page, the red trace has gone outside
You cannot take the square root of a negative
number.
You cannot take the log of zero or of a negative
number.
You cannot divide by zero.
You cannot use an index outside the bounds of an
array.
Unscaled data cannot go outside the range -32768
to 32767.
O
'
M
PERATOR
S
ANUAL
elong to a
203

Advertisement

Table of Contents
loading

Table of Contents