beautypg.com

Teledyne LeCroy WaveExpert 100H Operators Manual User Manual

Page 297

background image

Wave Expert

WE-OM-E Rev A

295

VerticalFrameStop([out, retval] double *pVal); VerticalFrameStop([in] double newVal);

VerticalResolution([out, retval] double *pVal); VerticalResolution([in] double newVal);

VerticalPerStep([out, retval] double *pVal); VerticalPerStep([in] double newVal);

VerticalOffset([out, retval] double *pVal); VerticalOffset([in] double newVal);

VerticalMinPossible([out, retval] double *pVal); VerticalMinPossible([in] double newVal);

VerticalMaxPossible([out, retval] double *pVal); VerticalMaxPossible([in] double newVal);

VerticalUnits([out, retval] BSTR *pVal); VerticalUnits([in] BSTR newVal);

Communicating with Other Programs from a VBScript

The ability of The instrument to communicate with other programs opens up immense possibilities,
both for calculation and for graphics, making the assembly of reports relatively simple.

Communicating with Excel from a VBScript

Although there are direct instrument calls to Excel and other programs, you may wish to do this
from a VBScript. Here is an example:

OutResult.Samples = InResult.Samples

startData = 0

endData = OutResult.Samples

ReDim newData(OutResult.Samples)

USD = InResult.DataArray(False)

LastPoint = endData - 1

Set ExcelApp = GetObject(,"Excel.Application")

ExcelApp.Visible = True

ExcelColumnA = 2 'Column where the data will appear in Excel

ExcelRow = 10 'Row where the data will start

ExcelColumnB = 3 ' Column where the output data will appear in Excel

For K = 0 To LastPoint

ExcelApp.ActiveSheet.Cells("ExcelRow + K, ExcelColumnA ") = -USD(K)

Next

Once the data are in Excel, any Excel functions can be applied to the data.
The results can be returned to the VB script.

For K = 0 To LastPoint

NDA(K) = ExcelApp.ActiveSheet.Cells("ExcelRow + K, ExcelColumnB")

Next