W
R
X
S
AVE
UNNER
I
Selecting a Math Function Call . .............................................................................................................................. 174
The Excel Control Dialog ........................................................................................................................................ 174
Entering a File Name .............................................................................................................................................. 175
Organizing Excel sheets . ......................................................................................................................................... 175
Setting the Vertical Scale ....................................................................................................................................... 176
Trace Descriptors ................................................................................................................................................... 176
Multiple Inputs and Outputs . ................................................................................................................................. 176
Examples ................................................................................................................................................................ 177
Simple Excel Example 1 .................................................................................................................................................... 1 77
Simple Excel Example 2 .................................................................................................................................................... 1 79
How Does this Work? ....................................................................................................................................................... 1 83
Writing VB Scripts .................................................................................................................................................. 186
Types of Scripts in VBS ..................................................................................................................................................... 1 86
Loading and Saving VBScripts .......................................................................................................................................... 1 87
The default parameter function script: explanatory notes .............................................................................................. 1 90
Scripting with VBScript . .................................................................................................................................................... 1 91
Variable Types . ................................................................................................................................................................. 1 91
Variable Names ...................................................................................................................................................... 191
Arithmetic Operators ............................................................................................................................................. 192
Results of Calculations ..................................................................................................................................................... 1 93
Order of Calculations ....................................................................................................................................................... 1 93
VBS Controls . .......................................................................................................................................................... 194
IF . . . Then . . . Else . . . End If ........................................................................................................................................... 1 94
Summary of If . . . . Then . . . . Else . ................................................................................................................................... 1 96
Select Case ....................................................................................................................................................................... 1 96
Summary of Select Case . . . . End Select .......................................................................................................................... 1 97
Do . . . Loop ...................................................................................................................................................................... 1 97
While . . . Wend . ............................................................................................................................................................... 1 98
For . . . Next ...................................................................................................................................................................... 1 98
VBS keywords and functions . ................................................................................................................................. 199
Other VBS Words . ............................................................................................................................................................. 2 00
Functions . ............................................................................................................................................................... 200
Hints and Tips for VBScripting . ............................................................................................................................... 201
Errors . ..................................................................................................................................................................... 202
Error Handling ........................................................................................................................................................ 203
Speed of Execution ................................................................................................................................................ 204
Scripting Ideas . ....................................................................................................................................................... 205
Example Waveform Script . ..................................................................................................................................... 205
Example Parameter Scripts .................................................................................................................................... 205
Debugging Scripts................................................................................................................................................... 205
Horizontal Control Variables . ................................................................................................................................. 206
Vertical Control Variables ...................................................................................................................................... 206
Calling MATLAB from the Instrument .................................................................................................................... 208
x
ERIES
WRXi-OM-E Rev D