beautypg.com

Teledyne LeCroy WaveRunner XI SERIES Operator’s Manual User Manual

Page 10

background image

W

AVE

R

UNNER

X

I

S

ERIES

x

WRXi-OM-E Rev D

Selecting a Math Function Call ............................................................................................................................... 174 
Selecting a Parameter 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 .................................................................................................................................................... 177

 

Simple Excel Example 2 .................................................................................................................................................... 179

 

Exponential Decay Time Constant Excel Parameter (Excel Example 1) ............................................................................ 181

 

Gated Parameter Using Excel (Excel Example 2) .............................................................................................................. 182

 

How Does this Work? ....................................................................................................................................................... 183

 

Correlation Excel Waveform Function (Excel Example 3) ................................................................................................. 183

 

Multiple Traces on One Grid (Excel Example 4)................................................................................................................ 184

 

Using a Surface Plot (Excel Example 5) ............................................................................................................................ 186

 

Writing VB Scripts .................................................................................................................................................. 186 

Types of Scripts in VBS ..................................................................................................................................................... 186

 

Loading and Saving VBScripts .......................................................................................................................................... 187

 

The default parameter function script: explanatory notes .............................................................................................. 190

 

Scripting with VBScript ..................................................................................................................................................... 191

 

Variable Types .................................................................................................................................................................. 191

 

Variable Names ...................................................................................................................................................... 191 
Arithmetic Operators ............................................................................................................................................. 192 

Results of Calculations ..................................................................................................................................................... 193

 

Order of Calculations ....................................................................................................................................................... 193

 

VBS Controls ........................................................................................................................................................... 194 

IF . . . Then . . . Else . . . End If ........................................................................................................................................... 194

 

Summary of If . . . . Then . . . . Else .................................................................................................................................... 196

 

Select Case ....................................................................................................................................................................... 196

 

Summary of Select Case . . . . End Select .......................................................................................................................... 197

 

Do . . . Loop ...................................................................................................................................................................... 197

 

While . . . Wend ................................................................................................................................................................ 198

 

For . . . Next ...................................................................................................................................................................... 198

 

VBS keywords and functions .................................................................................................................................. 199 

Other VBS Words .............................................................................................................................................................. 200

 

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 
List of Variables Available to Scripts ...................................................................................................................... 206 
Communicating with Excel from a VBScript........................................................................................................... 207 
Calling MATLAB from the Instrument .................................................................................................................... 208