12 WM-OM-E Rev I
IF . . . Then . . . Else . . . End If ............................................................................................. 293
Summary of If . . . . Then . . . . Else ...................................................................................... 295
Select Case........................................................................................................................... 295
Summary of Select Case . . . . End Select............................................................................ 296
Do . . . Loop ..........................................................................................................................296
While . . . Wend..................................................................................................................... 297
For . . . Next .......................................................................................................................... 297
VBS Keywords and Functions................................................................................... 299
Other VBS Words ................................................................................................................. 300
Functions............................................................................................................................... 301
Hints and Tips for VBScripting.............................................................................................. 302
Errors ....................................................................................................................................303
Error Handling.......................................................................................................................305
Speed of Execution............................................................................................................... 305
Scripting Ideas ...................................................................................................................... 306
Debugging Scripts ..................................................................................................... 307
Horizontal Control Variables...................................................................................... 307
Vertical Control Variables .....................................................................................................307
List of Variables Available to Scripts..................................................................................... 308
Communicating with Other Programs from a VBScript ........................................................ 309
Communicating with Excel from a VBScript .........................................................................309
Calling MATLAB from the Instrument........................................................................ 311
Calling MATLAB.................................................................................................................... 311
How to Select a Waveform Function Call ............................................................................. 311
The MATLAB Waveform Control Panel ................................................................................ 312
MATLAB Waveform Function Editor -- Example .................................................................. 312
MATLAB Example Waveform Plot........................................................................................ 315
How to Select a MATLAB Parameter Call ............................................................................ 316
The MATLAB Parameter Control Panel................................................................................ 316
The MATLAB Parameter Editor ............................................................................................ 317
MATLAB Example Parameter Panel ....................................................................................318
Further Examples of MATLAB Waveform Functions............................................................ 319
Creating your own MATLAB function.................................................................................... 321
CUSTOMDSO...................................................................................................323
Custom DSO ............................................................................................................. 323
Introduction - What is CustomDSO?..................................................................................... 323
Invoking CustomDSO ........................................................................................................... 323