Operator's Manual
WP700Zi-OM-E-RevA
94
You can, however, use one of the following:
On Error Resume Next
followed by some code that may make some attempt to deal with the problem, or at least to allow execution to
continue.
On Error GoTo 0
This cancels On Error Resume Next
Speed of Execution
To maximize the speed of execution of a script, the most important thing you can do is to minimize the number of
operations that are performed inside loops. Anything done once only is unlikely to be an important source of
delay. Please note that VBS is much slower than the internal computations of the instrument, so do everything
you can to save time, unless time is irrelevant to the application.
Using an array element takes longer than using a single variable. Here is an example:
For K = 1 to Total
If X (K) > X (K - 1) Then
Y = Cos (X (K) ) * Sin (X (K) ) * Sqr (X (K) )
End If
Next
To do the same thing we could also write this, using the index only once:
OldXK = X (0)
For K = 1 To Total
XK = X (K)
If XK > OldXK Then
Y = Cos (XK) * Sin (XK) * Sqr (XK)
OldXK = XK
End If
Next
VBS runs slower than the "internal" calculations, because the scripts are interpreted. This could be serious for
calculations where many operations are needed on each sample, such as convolution, correlation, and long
digital filters.
Scripting Ideas
What can we do in a VBS script that we cannot do with the normal instrument functions? Here are some
possibilities.
x
Create a new function that acts on waveform values.
x
Create a new parameter.
x
Create a new form of non-linear vertical scale.
x
Create a new form of non-linear horizontal scale.
x
Move some or all data horizontally, including reflections.
x
Combine data to form digital filters.
x
Show several function results side by side.
x
Show several function results interleaved.
You can even create output data that are not related to the input. The output data need not even be in the same
domain as the input data, because the system treats them as pure numbers. So you can create your own
transforms into the frequency domain, for example.
Example Waveform Script
Creating a window function for FFT calculations.
Содержание DDA 7 Zi series
Страница 1: ...Operator s Manual WavePro SDA and DDA 7 Zi Series Oscilloscopes ...
Страница 2: ... L R R H HUD RU D D ...
Страница 41: ...Operator s Manual WP700Zi OM E RevA 40 The detachable WavePro Zi front panel ...
Страница 376: ...WavePro 7Zi 375 WP700Zi OM E RevA Absolute Offset Relative ...
Страница 439: ...Operator s Manual WP700Zi OM E RevA 438 ...
Страница 440: ...WavePro 7Zi 439 WP700Zi OM E RevA ...
Страница 544: ...Thank you for purchasing a WavePro SDA or DDA 7 Zi Oscilloscope ...