Teledyne WaveExpert User Manual

Page 1
A
A
UTT
U
O
O
M
M
ATTII
A
F
F
O
O
OOR
N
N
R
M
M
A
A
N
N
U
U
ALL
A
W
W
AAVVEE
E
XXPPEERRTT
E
S
EERRIIEESS
S
March, 2009
O
SSCCIILLLLOOSSCCOOPPE
O
E
Page 2
LeCroy Corporation
700 Chestnut Ridge Road Chestnut Ridge, NY 10977-6499 Tel: (845) 578 6020, Fax: (845) 578 5985
Internet: www.lecroy.com
© 2009 by LeCroy Corporation.
LeCroy,
ActiveDSO, ProBus, SMART Trigger, WavePro, and Waverunner are registered trademarks of LeCroy
All rights reserved.
Corporation. JitterTrack, WaveExpert, WaveMaster, and X-Stream are trademarks of LeCroy Corporation. Information in this publication supersedes all earlier versions. Specifications are subject to change without notice.
916435 Rev A
Page 3
T
ABLE OF CONTENTS
CHAPTER 1: ABOUT AUTOMATION
OVERVIEW OF AUTOMATION ............................................................................................. 1-2
Standards ............................................................................................................................................................... 1-2
Compatibility with Other LeCroy Scopes ............................................................................................................... 1-2
Automation and IEEE 488.2 Remote Control – How Do They Compare? ..................................................... 1-2
* ActiveDSO is a Active-X based driver for LeCroy oscilloscopes ......................................................................... 1-3
General Characteristics .......................................................................................................................................... 1-3
INTRODUCTION TO THE X-STREAM BROWSER .............................................................. 1-4
STEP-BY-STEP INTRODUCTION TO AUTOMATION USING VBScript ............................. 1-5
WHERE IS AUTOMATION USED? ....................................................................................... 1-7
SETUPS (PANEL FILES) ARE PROGRAMS! ...................................................................... 1-7
CUSTOM MATH AND MEASUREMENTS ............................................................................ 1-8
CustomDSO ........................................................................................................................................................... 1-8
Control from External Applications ......................................................................................................................... 1-9
From Visual Basic ......................................................................................................................................... 1-10
From MATLAB .............................................................................................................................................. 1-10
From MS Office (Excel) ................................................................................................................................ 1-11
CONTROL VARIABLES EXPLAINED ................................................................................ 1-12
ACCESSING WAVEFORM/MEASUREMENT RESULTS ................................................... 1-14
Waveforms ........................................................................................................................................................... 1-14
Measurements...................................................................................................................................................... 1-14
Result Status ........................................................................................................................................................ 1-16
SYNCHRONIZATION .......................................................................................................... 1-1 7
GOOD PRACTICES ............................................................................................................. 1-19
EXAMPLES ......................................................................................................................... 1-19
Example 1: Excel Macro to Perform FFT of C1 ................................................................................................... 1-19
Example 2: VBScript Program to Perform FFT of C1 and Store Results in Text File .......................................... 1-20
Example 3: Script to Measure the Rise Time of the Signal on C1 and Display It in a Popup Window ................ 1-21
EARLY AND LATE BINDING .............................................................................................. 1-22
VBS REMOTE COMMAND ................................................................................................. 1-23
X-STREAM DSO OBJECTS ................................................................................................ 1-24
916435 RevA iii
Page 4
A
UTOMATION MANUAL
CHAPTER 2: ABOUT RESULTS
ABO UT R E S UL T S ............................................................................................................... 2-1
INTRODUCTION ................................................................................................................... 2-2
Digital .............................................................................................................................................................. 2-2
Histogram ........................................................................................................................................................ 2-2
Param ............................................................................................................................................................. 2-2
Persist ............................................................................................................................................................. 2-3
Table ............................................................................................................................................................... 2-3
OVERVIEW OF RESULTS .................................................................................................... 2-4
Variable Types ........................................................................................................................................................ 2-4
Use of Variants ....................................................................................................................................................... 2-4
Using Variables to Reference Objects within the XStream Hierarchy .................................................................... 2-4
DESCRIPTION OF RESULT PROPERTIES ......................................................................... 2-6
Base ....................................................................................................................................................................... 2-6
BinPopulations ....................................................................................................................................................... 2-6
Bins ........................................................................................................................................................................ 2-6
BinWidth ................................................................................................................................................................. 2-6
BusName ................................................................................................................................................................ 2-7
CellType ................................................................................................................................................................. 2-7
CellValue ................................................................................................................................................................ 2-7
Columns ................................................................................................................................................................. 2-8
DataArray ............................................................................................................................................................... 2-8
XY Interface: ........................................................................................................................................................... 2-8
Waveform Interface: ............................................................................................................................................... 2-9
Persist Interface: .................................................................................................................................................. 2-10
Digital Interface: ................................................................................................................................................... 2-11
ExtendedStatus .................................................................................................................................................... 2-12
FirstEventTime ..................................................................................................................................................... 2-12
FirstPopulatedBin ................................................................................................................................................. 2-13
HorizontalFrameStart ........................................................................................................................................... 2-13
HorizontalFrameStop ........................................................................................................................................... 2-13
HorizontalOffset .................................................................................................................................................... 2-13
HorizontalPerColumn ........................................................................................................................................... 2-14
HorizontalPerStep ................................................................................................................................................ 2-14
HorizontalResolution ............................................................................................................................................ 2-14
HorizontalUnits ..................................................................................................................................................... 2-15
HorizontalVarianceArray....................................................................................................................................... 2-15
HorizontalVariances ............................................................................................................................................. 2-15
IndexOfFirstSampleInFrame ................................................................................................................................ 2-15
LastEventTime ..................................................................................................................................................... 2-15
LastPopulatedBin ................................................................................................................................................. 2-16
Levels ................................................................................................................................................................... 2-16
LineAliasName ..................................................................................................................................................... 2-16
LineName ............................................................................................................................................................. 2-16
Lines ..................................................................................................................................................................... 2-16
Max ....................................................................................................................................................................... 2-16
MaxPopulation ..................................................................................................................................................... 2-17
MaxPopulationBin ................................................................................................................................................ 2-17
MaxPopulationInRectangle .................................................................................................................................. 2-17
Mean .................................................................................................................................................................... 2-18
Min ........................................................................................................................................................................ 2-18
iv 916435 RevA
Page 5
ABLE OF CONTENTS
T
NumFrameDimensions ........................................................................................................................................ 2-18
NumSamplesInFrame .......................................................................................................................................... 2-18
OffsetAtLeftEdge .................................................................................................................................................. 2-18
Peaks ................................................................................................................................................................... 2-19
PeakInfo ............................................................................................................................................................... 2-19
PopulationInside ................................................................................................................................................... 2-20
PopulationOfRectangle ........................................................................................................................................ 2-20
PopulationOver .................................................................................................................................................... 2-20
PopulationUnder .................................................................................................................................................. 2-21
RMS ..................................................................................................................................................................... 2-21
Rows .................................................................................................................................................................... 2-21
Samples ............................................................................................................................................................... 2-21
Sdev ..................................................................................................................................................................... 2-21
Status ................................................................................................................................................................... 2-22
StatusDescription ................................................................................................................................................. 2-24
Sweeps ................................................................................................................................................................. 2-24
To p ........................................................................................................................................................................ 2-24
UniformInterval ..................................................................................................................................................... 2-24
UpdateTime .......................................................................................................................................................... 2-25
Value .................................................................................................................................................................... 2-25
ValueArray ............................................................................................................................................................ 2-25
VerticalFrameStart ................................................................................................................................................ 2-26
VerticalFrameStop ................................................................................................................................................ 2-27
VerticalMaxPossible ............................................................................................................................................. 2-27
VerticalMinPossible .............................................................................................................................................. 2-27
VerticalOffset ........................................................................................................................................................ 2-27
VerticalPerRow ..................................................................................................................................................... 2-27
VerticalPerStep ..................................................................................................................................................... 2-28
VerticalResolution ................................................................................................................................................ 2-28
VerticalUnits ......................................................................................................................................................... 2-28
XFrameStart ......................................................................................................................................................... 2-28
XFrameStop ......................................................................................................................................................... 2-28
XMaxPossible ...................................................................................................................................................... 2-29
XMinPossible ....................................................................................................................................................... 2-29
XOffset ................................................................................................................................................................. 2-29
XPerStep .............................................................................................................................................................. 2-29
XResolution .......................................................................................................................................................... 2-29
XUnits ................................................................................................................................................................... 2-30
YFrameStart ......................................................................................................................................................... 2-30
YFrameStop ......................................................................................................................................................... 2-30
YMaxPossible ...................................................................................................................................................... 2-30
YMinPossible ....................................................................................................................................................... 2-30
YOffset ................................................................................................................................................................. 2-30
YPerStep .............................................................................................................................................................. 2-31
YResolution .......................................................................................................................................................... 2-31
YUnits ................................................................................................................................................................... 2-31
916435 RevA v
Page 6
Automation Manual
Control Reference Table of Contents
app...........................................................................................................................................................................
3-1
app.Acquisition........................................................................................................................................................
3-8
app.Acquisition.Channels........................................................................................................................................
3-10
app.Acquisition.Cx...................................................................................................................................................
3-11
app.Acquisition.Cx.Out.Result.................................................................................................................................
3-21
app.Acquisition.Horizontal.......................................................................................................................................
3-21
app.Acquisition.PodsCalibrationWizard..................................................................................................................
3-28
app.Acquisition.Trigger............................................................................................................................................
3-29
app.Cursors.............................................................................................................................................................
3-30
app.Display..............................................................................................................................................................
3-32
app.HardCopy.........................................................................................................................................................
3-44
app.LabNotebook....................................................................................................................................................
3-48
app.Math..................................................................................................................................................................
3-55
app.Math.Functions.................................................................................................................................................
3-56
app.Math.Fx............................................................................................................................................................
3-56
app.Math.Fx.Operator1Setup..................................................................................................................................
3-63
app.Math.Fx.Out.Result..........................................................................................................................................
3-63
app.Math.Fx.Zoom..................................................................................................................................................
3-64
app.Math.XY............................................................................................................................................................
3-65
app.Math.XY.Out.Result..........................................................................................................................................
3-69
app.Measure...........................................................................................................................................................
3-69
app.Measure.Measure............................................................................................................................................
3-75
app.Measure.Px......................................................................................................................................................
3-75
app.Measure.Px.histo.Result..................................................................................................................................
3-81
app.Measure.Px.last.Result....................................................................................................................................
3-81
app.Measure.Px.max.Result...................................................................................................................................
3-81
app.Measure.Px.mean.Result.................................................................................................................................
3-81
app.Measure.Px.min.Result....................................................................................................................................
3-81
app.Measure.Px.num.Result...................................................................................................................................
3-82
app.Measure.Px.Operator.......................................................................................................................................
3-82
app.Measure.Px.Out.Result....................................................................................................................................
3-82
app.Measure.Px.sdev.Result..................................................................................................................................
3-82
app.Measure.Px.Statistics.......................................................................................................................................
3-82
app.Memory.............................................................................................................................................................
3-82
app.Memory.Memories............................................................................................................................................
3-83
app.Memory.Mx.......................................................................................................................................................
3-83
app.Memory.Mx.Out.Result.....................................................................................................................................
3-86
app.Memory.Mx.Zoom............................................................................................................................................
3-86
916435 RevA
vi
Page 7
Automation Manual
Control Reference Table of Contents
app.PassFail............................................................................................................................................................
3-88
app.PassFail.LastPass.Result.................................................................................................................................
3-91
app.PassFail.NumPassed.Result............................................................................................................................
3-91
app.PassFail.Qx......................................................................................................................................................
3-91
app.PassFail.Qx.Out.Result....................................................................................................................................
3-93
app.PassFail.Rate.Result........................................................................................................................................
3-94
app.PassFail.Tests.Result.......................................................................................................................................
3-94
app.Preferences......................................................................................................................................................
3-94
app.Preferences.EMail............................................................................................................................................
3-96
app.SaveRecall.......................................................................................................................................................
3-97
app.SaveRecall.Setup.............................................................................................................................................
3-97
app.SaveRecall.Utilities...........................................................................................................................................
3-103
app.SaveRecall.Waveform......................................................................................................................................
3-104
app.SystemControl..................................................................................................................................................
3-109
app.TDR..................................................................................................................................................................
3-109
app.TDR.TDRN.......................................................................................................................................................
3-111
app.TDR.TDRN.Out.Result.....................................................................................................................................
3-112
app.TDR.TDRN.Zoom.............................................................................................................................................
3-112
app.Utility.DateTimeSetup.......................................................................................................................................
3-114
app.Utility.Options...................................................................................................................................................
3-117
app.Utility.Remote...................................................................................................................................................
3-118
app.WaveScan........................................................................................................................................................
3-119
app.WaveScan.ScanDecode..................................................................................................................................
3-121
app.WaveScan.ScanDecode.Out.Result................................................................................................................
3-122
app.WaveScan.ScanHisto......................................................................................................................................
3-122
app.WaveScan.ScanHisto.Histogram.....................................................................................................................
3-125
app.WaveScan.ScanHisto.Out.Result....................................................................................................................
3-126
app.WaveScan.ScanHisto.Zoom............................................................................................................................
3-127
app.WaveScan.ScanOverlay..................................................................................................................................
3-128
app.WaveScan.ScanOverlay.Out.Result................................................................................................................
3-130
app.Zoom................................................................................................................................................................
3-130
app.Zoom.Zx...........................................................................................................................................................
3-132
app.Zoom.Zx.Out.Result.........................................................................................................................................
3-135
app.Zoom.Zx.Zoom.................................................................................................................................................
3-136
vii
916435 RevA
Page 8
Automation Manual
Processor Reference Table of Contents
Average.......................................................................................................................................................................
4-1
Derivative....................................................................................................................................................................
4-2
Deskew.......................................................................................................................................................................
4-3
EnhancedResolution...................................................................................................................................................
4-3
Envelope.....................................................................................................................................................................
4-4
FFT..............................................................................................................................................................................
4-4
Floor............................................................................................................................................................................
4-6
Histogram....................................................................................................................................................................
4-7
Integral........................................................................................................................................................................
4-9
MATLABWaveform.....................................................................................................................................................
4-10
PersistenceHistogram.................................................................................................................................................
4-11
Rescale.......................................................................................................................................................................
4-12
Roof.............................................................................................................................................................................
4-13
SinXOverX..................................................................................................................................................................
4-14
Trend...........................................................................................................................................................................
4-14
ParamDifference.........................................................................................................................................................
4-16
ParamInvert.................................................................................................................................................................
4-16
ParamProduct.............................................................................................................................................................
4-16
ParamRatio.................................................................................................................................................................
4-16
ParamRescale.............................................................................................................................................................
4-16
ParamSum..................................................................................................................................................................
4-16
Amplitude....................................................................................................................................................................
4-17
Area.............................................................................................................................................................................
4-17
Base............................................................................................................................................................................
4-17
DeltaTimeAtLevel........................................................................................................................................................
4-17
ExtinctionRatio............................................................................................................................................................
4-20
EyeAmplitude..............................................................................................................................................................
4-21
EyeBER.......................................................................................................................................................................
4-21
EyeCrossing................................................................................................................................................................
4-22
EyeFallTime................................................................................................................................................................
4-22
EyeHeight....................................................................................................................................................................
4-23
EyeMean.....................................................................................................................................................................
4-24
EyeOneLevel...............................................................................................................................................................
4-24
EyeOpeningFactor......................................................................................................................................................
4-25
EyeOvershootNegative...............................................................................................................................................
4-25
EyeOvershootPositive.................................................................................................................................................
4-26
EyePkPkNoise............................................................................................................................................................
4-26
EyeQFactor.................................................................................................................................................................
4-27
916435 RevA
viii
Page 9
Automation Manual
Processor Reference Table of Contents
EyeRiseTime...............................................................................................................................................................
4-27
EyeSDEVNoise...........................................................................................................................................................
4-28
EyeSignalToNoise.......................................................................................................................................................
4-29
EyeSuppressionRatio..................................................................................................................................................
4-29
EyeZeroLevel..............................................................................................................................................................
4-30
FallAtLevel...................................................................................................................................................................
4-30
FullWidthAtXX.............................................................................................................................................................
4-31
LevelAtX......................................................................................................................................................................
4-32
MATLABParameter.....................................................................................................................................................
4-32
Maximum.....................................................................................................................................................................
4-33
Mean...........................................................................................................................................................................
4-33
Median.........................................................................................................................................................................
4-34
Minimum......................................................................................................................................................................
4-34
npoints.........................................................................................................................................................................
4-34
OvershootNegative......................................................................................................................................................
4-35
OvershootPositive.......................................................................................................................................................
4-35
PeakToPeak................................................................................................................................................................
4-35
Percentile....................................................................................................................................................................
4-35
PersistDCD.................................................................................................................................................................
4-36
Phase..........................................................................................................................................................................
4-37
PopulationAtX..............................................................................................................................................................
4-40
Range..........................................................................................................................................................................
4-41
RiseAtLevel.................................................................................................................................................................
4-43
RootMeanSquare........................................................................................................................................................
4-44
StandardDeviation.......................................................................................................................................................
4-44
TDRCapInd.................................................................................................................................................................
4-45
TIE...............................................................................................................................................................................
4-46
TimeAtLevel................................................................................................................................................................
4-50
Top..............................................................................................................................................................................
4-51
XAtMaximum...............................................................................................................................................................
4-52
XAtMinimum................................................................................................................................................................
4-52
XAtPeak......................................................................................................................................................................
4-53
ix
916435 RevA
Page 10
A
UTOMATION MANUAL
APPENDIX A: DCOM
Prepare the PC to Permit DCOM Connections to the Oscilloscope ...................................................................... A-1
Installation on Windows XP or Vista .............................................................................................................. A-2
Installation on Windows 2000 SP4 ................................................................................................................ A-3
Oscilloscope Preparation on Windows XP or Vista ................................................................................................ A-4
Creating a System Restore Point on Windows XP or Vista ........................................................................... A-4
Opening the Firewall on Windows XP or Vista .............................................................................................. A-4
Creating a User Account on Oscilloscopes Running Windows XP or Vista .................................................. A-5
DCOM System Configuration on Windows XP or Vista ......................................................................................... A-6
Oscilloscope Preparation on Windows 2000 ....................................................................................................... A-11
Creating a User Account on Oscilloscopes Running Windows 2000 .......................................................... A-11
DCOM System Configuration on Windows 2000 ................................................................................................. A-12
Oscilloscope Preparation on Windows Embedded .............................................................................................. A-16
Creating a User Account on Oscilloscopes Running Windows Embedded ................................................. A-16
DCOM System Configuration on Windows Embedded (on the Oscilloscope) .................................................... A-16
Testing the DCOM Connection from the PC ........................................................................................................ A-20
APPENDIX B: GLOSSARY
ActiveX .................................................................................................................................................................. B-1
Automation ............................................................................................................................................................ B-1
Automation client ................................................................................................................................................... B-1
Automation object ................................................................................................................................................. B-1
Automation server ................................................................................................................................................. B-1
COM (COMPONENT OBJECT MODEL) .............................................................................................................. B-1
DCOM (DISTRIBUTED COMPONENT OBJECT MODEL) .................................................................................. B-1
EARLY BINDING ................................................................................................................................................... B-1
LATE BINDING ...................................................................................................................................................... B-1
DISPATCH INTERFACES (dispinterface) ............................................................................................................. B-1
x 916435 RevA
Page 11
I NTRO DUCTION
About this Manual
This manual is a reference guide to the “Automation” capabilities of LeCroy’s X-Stream™ DSOs. The manual includes a complete list of all instrument controls that are available to a controlling application. In
contrast to previously available remote control possibilities for LeCroy instruments, Automation enables the controlling application to run on the instrument itself.
Part One, “Ab o u t Au t oma tio n ,” covers the principles of control via Automation and offers practical examples. It also presents the overall hierarchy of controls accessible via Automation.
Part Two, “Control Reference,” presents each of the controls in detail, including examples of use in many cases.
Part Three, “Math/Measure Control Reference,” presents controls available in each of the multitude of the
Math/Measure ‘processors’ available in X-Stream DSOs.
916435 RevA xi
Page 12
BLANK PAGE
xii 916435 RevA
Page 13
C
HAPTER ONE Overview
A
A
This section presents an overview of the Automation capabilities of X-Stream DSOs along with an overview of the technology itself.
C HAPTER O NE: Overview
In this chapter learn about
¾ Microsoft’s COM-based “OLE Automation” ¾ How to create simple applications in Visual Basic to control the
instrument
¾ How to use X-Stream Browser to interactively control the instrument
A
U
U
T
T
A
O
B
B
O
O
O
M
M
U
U
A
A
T
T
TII
T
O
O
N
N
916435 RevA 1-1
Page 14
ABOUT AUTOMATION

OVERVIEW OF AUTO MATION

In addition to supporting the familiar ASCII-based remote commands that have been used to control all LeCroy DSOs for many years, all of the Windows-based “X-Stream” instruments fully support control by Automation interfaces based on Microsoft’s Component Object Model (COM). Using COM, the controlling application can run directly on the instrument without requiring an external controller; or, alternatively, it can run using Microsoft’s distributed COM standard (DCOM) on a networked computer.

Standards

Automation (formerly referred to as “OLE Automation”) is a Microsoft technology that is primarily used to enable cross-application macro programming. It is based upon the Component Object Model (COM), which is similar in nature to CORBA, which is more commonly found in the UNIX world.
An application that “exposes Automation Objects” is referred to as an “Automation Server.” Automation Objects expose “Automation Interfaces” to the controlling “Automation Client.” The oscilloscope application on LeCroy Windows-based oscilloscopes is an Automation Server, and can be controlled by Automation Clients. This manual describes the Automation objects and interfaces exposed by the oscilloscope application in detail.
It is important to note that Automation itself is not language dependent; it can be used from any programming language that supports COM. This manual, however, concentrates mainly on the use of Automation from the Visual Basic Script (VBScript) language for several reasons, including the fact that it is one of the easiest to use. Also, it is the language that X-Stream instruments use for setup files (more on this later). In addition, the VBScript interpreter is installed by default on all X-Stream instruments and, therefore, is available without your having to purchase any additional software.

Compatibility with Other LeCroy Scopes

Throughout LeCroy's history, we have striven to maximize compatibility, and this policy remains in force. However, due to the fact that the underlying technologies used by Automation require the 32-bit Windows operating system, and that this system is available only on our X-Stream instruments, Automation is not available on the older LeCroy oscilloscope families.

Automation and IEEE 488.2 Remote Control – How Do They Compare ?

Automation does not replace the IEEE 488.2-based remote command set, which is also supported by X-Stream instruments (and will continue to be). Instead, it augments it and allows a new class of application to be created that can run on the DSO itself.
Automation, however, can be considered as the “Native Language,” or “Mother Tongue” of X-Stream instruments. All of the instrument’s controls and features are available to the Automation Client.
Automation controls generally are more granular than 488.2 remote commands. That is, many 488.2 remote commands set more than one control at the same time; whereas, via Automation, this is not the case.
1-2 916435 RevA
Page 15
CHAPTER ONE Overview
The following table summarizes the differences between the two remote control possibilities:
Physical Transport GPIB, TCP/IP over Ethernet Inter-process using COM, inter-PC
Textual parsing of instrument responses required
Compatibility with previous LeCroy DSOs
Ability to control the oscilloscope application from “inside the box”
Ease of Use Not trivial. It’s easier using a tool such
Format of Waveform results Binary or ASCII. Both require parsing
Control from MS Office suite Possible via ActiveDSO* utility Yes, natively (see examples later in

* ActiveDSO is a Active-X based driver for LeCroy oscilloscopes

General Characteristics

IEEE 488.2 Control Automation Control
using DCOM (TCP/IP)
Yes. All instrument responses need ‘parsing’ to extract useful information.
Very good. In most cases remote control applications written for older DSOs will work without modification.
Yes, by using the TCP/IP (VICP) protocol to talk to the “local host”
as ActiveDSO* that hides some of the complexities.
before use.
No. Each element in the Automation hierarchy appears as a “variable” to the Automation client.
None. Automation is a new standard first introduced with LeCroy’s X-Stream DSOs.
Yes, natively
Very easy to use from scripting languages and office productivity tools
Waveforms are presented as arrays of floating point values.
this manual)
When an application is running locally on the instrument and requests a connection to the DSO via
Automation (for example, by using CreateObject(“LeCroy.XStreamDSO”) from Visual Basic), one of two
things will happen. If the X-Stream DSO application is already running, the object returned will be a “pointer” to the running application. If the DSO application is not running, it will be started. It is not possible to run two simultaneous instances of the X-Stream DSO application.
More than one simultaneous connection to the instrument via Automation will be accepted, but simultaneous connections are not recommended.
When the final client has been disconnected from the instrument (server), the X-Stream DSO application will remain running and will accept further client connections.
Operations that cause Modal Dialogs to appear in the instrument’s display will, by default, disrupt access
from Automation. This behavior can be changed using the app.SystemControl.ModalDialogTimeout and app.SystemControl.EnableMessageBox controls. Refer to the description of each of these controls
in the reference section for more information.
The instrument application can be minimized in order to allow the controlling application to take over the
display and touch panel by means of the app.Minimize control. It can also be resized and repositioned on the display by means of the app.Top, app.Left, app.Bottom, app.Right controls.
916435 RevA 1-3
Page 16
ABOUT AUTOMATION

INTRODUCTION TO THE X-STREAM BROWSER

The easiest way to get up and running with Automation, and also to visualize the “X-Stream Object Model” is to use the X-Stream browser tool, which is pre-installed on all instruments.
To launch the tool, first minimize the instrument application (File->Minimize), then double-click on the X-Stream
Browser icon on the desktop:
To connect to the running DSO application, click the Connect toolbar icon:
Upon connection, the root of the object hierarchy is shown in a layout similar to that presented when a file system is browsed using Windows Explorer.
As a quick demonstration of how the X-Stream Browser can be used, open the Acquisition folder and then click on the C1 folder. Find the item VerScale (Volts/Div) in the right-hand window and right-click on it, then select the Set Value menu option. Use the Copy Path… option to easily copy to the control variable’s “path”.
Enter a new value for VerScale and click the Set this value button. Restore the DSO’s X-Stream window and
note that the V/Div value for C1 should have changed to reflect the entered value.
Once you have clicked on a control variable, the status bar will display the Visual Basic code that references it:
Most of the “folders” in the tree hierarchy in X-Stream Browser areyellow; these correspond to Objects. The
object hierarchy is tiered; for example, the Acquisition is comprised of a variety of objects, including C1, C2,
Horizontal, etc. Some Folders are pink; these are Collections. The subfolders of collections are referenced by
indexing the collection name with the subfolder name. Lastly, the “Results” folders, which are dark gray. Results folders are objects, but contain items that are slightly different in nature to items in other folders.
The items in the right-hand window are referred to as Control Variables. These are explained in further detail in
the section “Control Variables Explained” later in this chapter.
1-4 916435 RevA
Page 17
CHAPTER ONE Overview

STEP-BY -STEP AUTOMA TION INTRODUCTIONS USING VBScript

This section of the manual presents a walk-through of how to create a simple remote control application, which will run on the instrument, from scratch. It doesn’t rely upon any 3 Windows’ built-in text editor (Notepad) and the Visual Basic Script interpreter (VBScript), which is also installed on all instruments.
1. Use the FileWindowed menu option to place the DSO application into windowed mode. This allows the
windows start-bar to be accessed.
2. Open Windows Notepad via Start->Programs->Accessories->Notepad
a. Write the following text into the editor:
Set app = CreateObject("LeCroy.XStreamDSO") app.AutoSetup app.Display.GridMode = "Quad" myVerScale = app.Acquisition.C1.VerScale MsgBox myVerScale
3. Save the file to drive D:\ and name it Exercise1.vbs. Leave Notepad open, we’ll need it again.
4. Open Windows Explorer, via StartProgramsAccessoriesWindows Explorer.
5. Navigate to drive D:\ and double-click on Exercise1.vbs.
6. That’s it. If these steps were followed correctly, you should hear relays clicking while the scope performs an auto-setup operation and enters its quad-grid display mode.
So, what did this “program” actually do?
rd
-party development tools, since it uses
The CreateObject statement.
Set app = CreateObject("LeCroy.XStreamDSO")
CreateObject is the Visual Basic function that creates an instance of a COM Server (a.k.a. ActiveX
Control). The argument “LeCroy.XStreamDSO” refers to our DSO application. Once it has instantiated
(connected to) our DSO application we need some kind of ‘handle’ (pointer) to it so that we can use it
later to communicate with the instrument. CreateObject returns a handle to us, which we store in the app
variable.
The app.AutoSetup statement.
app.AutoSetup
Using the app handle, this line of code calls the AutoSetup method, which performs the same task as
the front-panel Auto-Setup button. Documentation for this method can be found later in the reference section.
: Only a single instance of the X-Stream DSO software
NNOOTTEE:
can run on a system at one time. If the DSO software is already running when CreateObject is called, a handle to that running instance is returned. If the DSO software is not running, it will be started.
916435 RevA 1-5
Page 18
ABOUT AUTOMATION
The app.Display.GridMode = "Quad" statement.
app.Display.GridMode = “Quad”
Using the app handle, this line of code sets the GridMode control of the Display system to the value
“Quad”. It’s important to note that the controls are arranged in a hierarchy, with each ‘level’ of the
hierarchy delimited with a decimal point ( . ).
The myVerScale = app.Acquisition.C1.VerScale statement.
myVerScale = app.Acquisition.C1.VerScale
Instead of setting the value of a control, this line of code retrieves the current value of a control, in this case the Vertical Scale (Volts/Div) of Channel 1. The value returned is stored within the variable
myVerScale.
: In Visual Basic Script it is not necessary to
NNOOTTEE:
“Dimension” variables before using them (for example, using statement s like “Dim myVerScale as Double”).
The MsgBox myVerScale statement
MsgBox myVerScale
This line of code does not communicate with the scope at all, but calls the standard Visual Basic Script
function MsgBox. This function displays a dialog containing the value of the variable following “MsgBox”. In our case the value of Channel 1’s vertical scale, and waits for the OK button to be clicked.
Documentation about the MsgBox function can be found in Microsoft’s Visual Basic Scripting documentation at www.microsoft.com\scripting.
Another point that should be mentioned here is something that is used extensively in Setup files created by the instrument: the ability to use “abbreviations” to simplify programs. Following is an example in which a shorthand method is used to replace some rather long-winded code. It is also important to note that this also enhances performance. For example, the “lookup” of the object app.Acquisition.C1 occurs only once in the modified code, but three times in the original code.
Instead of:
app.Acquisition.C1.VerScale = 0.5 app.Acquisition.C1.VerOffset = 0.1 app.Acquisition.C1.Coupling = "DC50"
The following may be used:
set myChannel1 = app.Acquisition.C1 myChannel1.VerScale = 0.5 myChannel1.VerOffset = 0.1 myChannel1.Coupling =
"DC50"
1-6 916435 RevA
Page 19
CHAPTER ONE Overview

WHERE IS AUT OMATION USED?

Automation is used in several places in the X-Stream based instrument.
Instrument Setups (Panel Files)
Custom Math/Measurements
CustomDSO, User Interface customization
Control from external applications (COM/DCOM)
Each of these uses is described in more detail in the following sections.

SETUPS (PANEL FILES) ARE PROGRAMS!

Setup files, which are used to save and recall the state of the instrument between runs, are traditionally binary files with an internal structure that is neither documented nor obvious to the user.
In X-Stream DSOs, however, this is no longer the case. Setups are ASCII text files that contain a complete Visual
Basic Script “program” that, when “executed,” will restore the instrument to a previously recorded state. In effect,
each time a panel is saved, the instrument effectiv ely writes you a program that, when executed, returns the instrument to the saved state.
Due to the fact that these setups are already programs, they are a great way to get started quickly with Automation. As an example, try saving a setup into a file and examine it using a text-editor, as follows:
1. Touch File in the menu bar, then Save Setup from the drop-down menu.
2. Touch the Browse button and specify drive D:\Setups as the location to save the .lss (LeCroy setup
script) file. (This is the factory default directory for setup files)
3. Touch Save Now!
4. Minimize the application using the Minimize option from the File menu
5. Open Microsoft’s Notepad application from the Accessories program folder (StartProgramsAccessories).
6. Open the file saved above. You will see a Visual Basic Script program that begins like this:
' XStreamDSO ConfigurationVBScript ... ' LECROY,WM8300,WM000001,0.0.0 ' Thursday, February 20, 2003 11:26:55 AM
On Error Resume Next set XStreamDSO = CreateObject("LeCroy.XStreamDSO")
XStreamDSO.RecallingSetup = True
' AladdinPersona ...
XStreamDSO.HideClock = False XStreamDSO.TouchScreenEnable = True
Since the entire state of the instrument, including all controls for all installed software options, is saved, this panel may look fairly complex. But don’t let this fool you; the basic concept is, in fact, fairly simple.
916435 RevA 1-7
Page 20
ABOUT AUTOMATION
As a quick example of how setups can be used as the starting point for controlling applications, scroll down to the end of the file and add the following code (shown in bold-type) to the file.
' Place any custom VBScript code after this point '
' Perform an Auto Setup XStreamDSO.AutoSetup
When this setup is recalled, the complete state of the instrument will be restored, followed by an Auto-Setup operation.
Obviously this is a fairly trivial “application,” but it is easy to imagine how automated testing could be performed with the introduction of loops and conditional execution.
E
: Setup files stored by the instrument have file extension “.lss” (LeCroy Setup Script). These
NNOOTTE
:
files are syntactically identical to Microsoft Visual Basic Script (VBScript) files, which have a “.vbs”
extension.
P
: A simple alternative to recalling the panel into the instrument is to execute it, either by double-
TTIIP
:
clicking on the .lss file in Windows Explorer, or by executing it from the command line.
Add this code

CUSTOM MATH AND MEASUREMENTS

Custom Math and Measurements can be coded using VBScript in instruments equipped with the XDEV and/or XMAP software options. Using Automation control of the instrument, decisions can be made during custom processing that reconfigure the DSO.
When you are developing custom processing routines using the reference section of this manual,
app.Acquisition.Cx.Out.Result may be used as a comprehensive reference to the Result Object, which is used
to describe waveform data (InResult, InResult1, InResult2, OutResult).
For more detail about this capability, see the “Customization” section of the on-line Help Manual.

CustomDSO

CustomDSO enables customization of the instrument’s UI in instruments equipped with the XDEV and/or XMAP options. Two modes of operation are supported: Basic mode and Plug-in mode.
In Basic mode a Visual Basic Script (VBScript) program can be assigned to each of 8 buttons that can, optionally, appear at the bottom of the instrument’s display. By means of Automation, each of these may further reconfigure all 8 buttons, which would allow simple menu hierarchies to be generated.
In Plug-in mode an ActiveX control, created in any of a number of programming languages, can be inserted into the instrument’s menu system. Once “embedded,” this Plug-in can take full control of the DSO using Automation.
Full documentation on CustomDSO is available in the CustomDSO section of the on-line Help Manual.
1-8 916435 RevA
Page 21
CHAPTER ONE Overview

Control from External Applications

Control of an X-Stream based instrument by Automation is possible from most modern programming languages (interpreted and/or compiled), and also from the “macro” capability of office productivity suites such as Microsoft Office.
916435 RevA 1-9
Page 22
ABOUT AUTOMATION
From Visual Basic
From Visual Basic the CreateObject method is used to create the connection to an instrument by Automation.
The following code example creates this connection and sets up some of the instrument’s controls:
' Connect to the X-Stream DSO
Dim app as Object Set app = CreateObject(“LeCroy.XStreamDSO”)
' Setup Vertical and Horizontal settings
app.Acquisition.C1.VerScale = 0.5 app.Acquisition.C1.VerOffset = 0.25
app.Acquisition.Horizontal.HorScale = 0.000001
' Disconnect from the DSO
Set app = Nothing
From MATLAB
The syntax for controlling the scope MATLAB uses the actxserver keyword to connect to the instrument.
The following code example creates this connection, enables variable vertical scale, reads the vertical scale value for C1, and increases it by a factor of 1.5, arms the scope, waits for the acquisition to be complete, and then reads out the value and mean of parameter P1.
% Connect to oscilloscope via DCOM at IP address 172.28.9.31 DSO = actxserver('LeCroy.XStreamDSO', '127.0.0.1')
% Readback instrument ID get(DSO.Item('InstrumentID'),'Value')
% Create references to the Acquisition, C1, Measure and P1 objects for convenience acq = DSO.Object.Item('Acquisition') c1 = acq.Object.Item('C1') meas = DSO.Object.Item('Measure') p1 = meas.Object.Item('P1')
% Enable variable vertical scale for channel 1 set(c1,'VerScaleVariable',-1)
% Read the vertical scale for C1 and increase it by a factor of 1.5, re-read and display new scale verscale = get(c1.Item('VerScale'), 'Value') set(c1, 'VerScale', 1.5 * verscale) verscale = get(c1.Item('VerScale'), 'Value')
% Invoke the Acquire method, and force a trigger if the acquisition isn’t complete within 3 seconds. invoke(acq, 'Acquire', 3, 1)
% Readout the value and mean of measurement P1 (requires P1 to be setup and displayed) p1_val= get(p1.Out.Result,'Value') p1_mean = get(p1.Object.Item('Mean').Result,'Value')
Creating references to objects at each level in the oscilloscope application’s object hierarchy is highly recommended in order to keep the code cleaner and easier to debug.
: Don’t confuse the control of the instrument from MATLAB
NNOOTTEE:
(MATLAB “drives”) with the use of MATLAB from within a custom processing function (the instrument “drives”).
1-10 916435 RevA
Page 23
CHAPTER ONE Overview
From MS Office (Excel)
Using Automation, control of the instrument from Microsoft Excel is very similar to control from Visual Basic. This is because the “macro language” used in the office suite is Visual Basic for Applications, a lightweight version of Visual Basic.
The following example shows how to add a button to an Excel spreadsheet that connects to, and controls, the instrument on which Excel is running. Note that this example was generated using Excel 2000, other versions of Excel support similar functionality, but the specific sequence of commands may be slightly different:
1. Enable the Forms toolbar using the ViewToolbarsForms menu option.
2. Click the button icon
on the toolbar and draw a button on the spreadsheet. The button will be labeled
“Button 1” by default.
3. Right-click on the edge of the button and select Assign Macro from the drop-down menu.
4. Select the New button from the Assign Macro dialog; the macro editor will appear:
5. Type the following code into the subroutine:
Set app = CreateObject("LeCroy.XStreamDSO") app.AutoSetup Set app = Nothing
Clicking on the newly created button will now execute this code segment, which connects to the DSO and performs an Auto Setup.
916435 RevA 1-11
Page 24
ABOUT AUTOMATION

CONTROL VARIABLES EXPLAINED

Traditionally, properties presented to an Automation Client are simple “variables” with types such as Integer (int), String (BSTR), Floating Point (single, double), etc.
Control variables in X-Stream are an extension of the traditional Automation pattern, without affecting how they appear to most Automation clients (see section below on early/late bound clients).
As an example of what this enables, consider the following:
Take a control such as VerScale (Volts/Div), this may be set and queried in Visual Basic as follows:
app.Acquisition.C1.VerScale = 0.5 CurrentValue = app.Acquisition.C1.VerScale
In addition, the following is supported:
minValue = app.Acquisition.C1.VerScale.GetMinValue maxValue = app.Acquisition.C1.VerScale.GetMaxValue
This enables an Automation Client to not only set and query the current value of a control, but also to query its limits. This is useful in the generation of instrument-independent applications, or applications that present scope controls in a graphical user interface in which limits are required.
Various types of control variables are supported. The Type column in the X-Stream browser shows the control
type:
The type designations are also given in the reference section of this manual, and are defined as follows:
Integer Double DoubleLockstep
Enum
32-bit Integer Value
Double-precision floating point value
Double-precision floating point value locked to a non­linear (e.g., 1, 2, 5) sequence.
List Value (e.g., “Orange,” “Apple,” “Pear”)
String Bool Action
1-12 916435 RevA
String value
Boolean Value { True, False }, { 0, -1 }
Action (no arguments or value)
Page 25
CHAPTER ONE Overview
The properties and methods available for each control are type-specific. Listed below are the most commonly used:
TYPE PROPERTIES
Integer
Double
DoubleLockstep Enum
VARIANT Va lue Value(VAR IANT) int GetAdaptedValue SetRequestedValue(int) int GetRequestedValue int GetDefaultValue int GetGrain int GetMax int GetMin Increment(int)
VARIANT Va lue Value(VAR IANT) double GetAdaptedValue SetRequestedValue(double) double GetRequestedValue double GetDefaultValue double GetGrainValue double GetMaxValue double GetMinValue Increment(int)
See Double
VARIANT Va lue Value(VAR IANT) int GetAdaptedValue SetRequestedValue(int) int GetRequestedValue int GetDefaultValue int GetMax int GetMin int GetNumberOfValueStates Increment(int) BSTR GetRangeStringScreen BSTR GetRangeStringRemote
String
Bool
Action
916435 RevA 1-13
VARIANT Va lue Value(VAR IANT) int GetMaxLength BSTR GetRequestedValue BSTR GetAdaptedValue SetRequestedValue(BSTR)
VARIANT Va lue Value(VAR IANT) BOOL GetAdaptedValue BOOL GetRequestedValue BOOL GetDefaultValue Set Clear
ActNow
Page 26
ABOUT AUTOMATION

ACCESSING W AVEFORM/MEASUREMENT RESULTS

Waveforms

Waveform data is exposed by a ‘Result’ object, which appears at various places in the object hierarchy depending upon which waveform is to be accessed. Some examples follow:
app.Acquisition.C1.Out.Result app.Math.F1.Out.Result app.Memory.M1.Out.Result
Waveform data is exposed as a simple array, no deciphering of proprietary binary formats is performed, as was necessary in the past. An example of how it is used follows.
The example is coded as an Excel macro, and should be assigned to a button as described earlier. The macro reads the number of samples in the waveform and places it in cell B1 of the Excel spreadsheet. It then reads all available sample data values and copies them into cells in the first column of the spreadsheet (A1...Axx).
Sub Button1_Click()
' Connect to the DSO Set app = CreateObject("LeCroy.XStreamDSO")
' Query the number of samples in C1 and store in cell "B1" numSamples = app.Acquisition.C1.Out.Result.Samples Cells(1, 2).Value = numSamples
' Access the waveform data array, and fill the first column ' of the spreadsheet with it wave = app.Acquisition.C1.Out.Result.DataArray For i = 0 To numSamples - 1 Cells(i + 1, 1).Value = wave(i) Next i
End Sub
: Ensure that the record length is < 64kSamples, since
NNOOTTEE:
Excel has a limit on the number of rows in a spreadsheet. Ideally, you should start experimenting with short (500 point) records.

Measurements

Measurement results are read in the same way as Waveforms. The following example, when copied into an Excel macro, will enable Standard Vertical parameters. It will then transfer the eight parameter values into the spreadsheet (cells C1…C8):
Sub Button1_Click()
' Connect to the DSO Set app = CreateObject("LeCroy.XStreamDSO")
' Enable Standard Vertical Parameters app.Measure.MeasureMode = "StdVertical"
1-14 916435 RevA
Page 27
CHAPTER ONE Overview
' Transfer the 8 parameter values into the spreadsheet 'Note: the number of configurable measurements your scope may be different Cells(1, 3).Value = app.Measure.P1.Out.Result.Value Cells(2, 3).Value = app.Measure.P2.Out.Result.Value Cells(3, 3).Value = app.Measure.P3.Out.Result.Value Cells(4, 3).Value = app.Measure.P4.Out.Result.Value Cells(5, 3).Value = app.Measure.P5.Out.Result.Value Cells(6, 3).Value = app.Measure.P6.Out.Result.Value Cells(7, 3).Value = app.Measure.P7.Out.Result.Value Cells(8, 3).Value = app.Measure.P8.Out.Result.Value
Set app = Nothing
End Sub
Statistics are also available for each parameter using two different kinds of calls:
result = app.Measure.P1.mean.Result.Value result = app.Measure.P1.max.Result.Value result = app.Measure.P1.min.Result.Value result = app.Measure.P1.num.Result.Value result = app.Measure.P1.sdev.Result.Value
result = app.Measure.P1.Statistics("mean").Result.Value result = app.Measure.P1.Statistics("max").Result.Value result = app.Measure.P1.Statistics("min").Result.Value result = app.Measure.P1.Statistics("num").Result.Value result = app.Measure.P1.Statistics("sdev").Result.Value
In addition, the data used to display the Histicon is available using the “histo” statistic:
Sub Button1_Click() Set app = CreateObject("LeCroy.XStreamDSO")
bins = app.Measure.P5.Statistics("histo").Result.BinPopulations numBins = app.Measure.P5.Statistics("histo").Result.bins
For i = 0 To numBins - 1
Cells(i + 1, 4).Value = bins(i)
Next I
Set App = Nothing End Sub
916435 RevA 1-15
Page 28
ABOUT AUTOMATION

Result Status

The waveform result object described above includes a status property (bit-field) that reflects the current status of the trace. This includes both ‘warning’ and ‘error’ conditions, as described below.
Description Value Bit #
LEC_Valid 0x0 N/A
LEC_Invalid
LEC_Overflow
LEC_Underflow
LEC_ContainsUndefinedValues
LEC_LessThan
LEC_GreaterThan
LEC_NotAPulse
LEC_NotCyclic
LEC_Averaged
LEC_UnlockedPLL
LEC_OtherError
LEC_OtherWarning
LEC_OtherInfo
LEC_InputsIncompatible
LEC_AlgorithmLimitsReached
LEC_BadDefinition
LEC_TooFewData
LEC_TooManyData
LEC_UniformHorizIntervalRequired
LEC_BadUnits
LEC_DataRangeTooLow
LEC_DataUndersampled
LEC_PoorStatistics
LEC_SlowTransitionTime
LEC_DataResampled
LEC_DataInterpolated
LEC_MeasurementScaleImprecise
LEC_NoDataAvailable
LEC_SomeCummulatedResultsInvalid
LEC_InsufficientMemory
LEC_ChannelNotActive
LEC_UseStatusDescription
0x0000000000001 0x0000000000002 0x0000000000004 0x0000000000008 0x0000000000010 0x0000000000020 0x0000000000040 0x0000000000080 0x0000000000100 0x0000000000200 0x0000000000400 0x0000000000800 0x0000000001000 0x0000100000000 0x0000200000000 0x0000400000000 0x0000800000000 0x0001000000000 0x0002000000000 0x0004000000000 0x0008000000000 0x0010000000000 0x0020000000000 0x0040000000000 0x0080000000000 0x0100000000000 0x0200000000000 0x0400000000000 0x0800000000000 0x1000000000000 0x2000000000000 0x4000000000000
0
1
2
3
4
5
6
7
8
9
10
11
12
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
1-16 916435 RevA
Page 29
CHAPTER ONE Overview

SYNCHRONIZATION

Synchronization or, more specifically, knowing when to read results, is critical when working with a digital oscilloscope by remote control (it is just as important by IEEE488.2 control as by Automation). This is especially true when working with an oscilloscope that uses a multithreaded architecture.
A classic problem seen in the majority of custom applications that control LeCroy (or other) DSOs is that the scope is left to free-run in Auto-trigger mode while simultaneously (and asynchronously) results are queried.
While working with the instrument via the Automation interface, there are a few techniques that can be used to guarantee the synchronization and consistency of results, whether they be waveform or parameter measurements.
The following example demonstrates a useful technique for ensuring synchronization. This example runs as an Excel macro:
Sub Button1_Click()
' Connect to the DSO Set app = CreateObject("LeCroy.XStreamDSO")
' Enable Standard Vertical parameters app.Measure.MeasureMode = "StdVertical"
' Stop the free-running trigger and take a single acquisition ' Use a 10 second timeout in the case that the acquisition is not complete. app.Acquisition.TriggerMode = "Stopped" app.Acquisition.Acquire (10, True)
' Read the first parameter value and transfer into the spreadsheet Cells(1, 3).Value = app.Measure.P1.Out.Result.Value
End Sub
The Acquire method arms the acquisition system and waits for a user-specified time for a trigger. The second
argument, a Boolean, specifies whether or not to force a trigger before returning if a trigger doesn’t arrive within the allotted time period. The method also returns a Boolean value signifying whether or not a trigger arrived. See the reference section for more information on this useful method.
Another scenario where synchronization is necessary is between changing settings and reading results, even
when no acquisition took place. For this the WaitUntilIdle method is used. This method is “blocking” and will not
return control until the setup request has completed.
Note that the Acquire method is equivalent to setting the Trigger Mode to “Single”, then executing WaitUntilIdle.
916435 RevA 1-17
Page 30
ABOUT AUTOMATION
An example of WaitUntilIdle usage follows. Note that WaitUnilIdle is not for use when in NORMAL or AUTO
trigger mode.
Sub Button1_Click()
' Connect to the DSO Set app = CreateObject("LeCroy.XStreamDSO")
' Enable Standard Vertical parameters app.Measure.MeasureMode = "StdVertical"
' Wait for the change to take place for a max. of 5 seconds app.WaitUntilIdle(5)
' Read the value of measurement P1 (pkpk) and transfer into the spreadsheet Cells(1, 2).Value = app.Measure.P1.Out.Result.Value
' Enable Standard Horizontal parameters app.Measure.MeasureMode = "StdHorizontal"
' Wait for the change to take place for a max. of 5 seconds app.WaitUntilIdle(5)
' Read the value of measurement P1 (rise time) and transfer into the
spreadsheet
Cells(1, 3).Value = app.Measure.P1.Out.Result.Value
End Sub
: In almost all remote control applications, it is HIGHLY
NNOOTTEE:
RECOMMENDED that you STOP acquisitions before accessing result data. Most remote control problems are caused by failure to follow this practice.
1-18 916435 RevA
Page 31
CHAPTER ONE Overview

GOOD PRACTICES

Using the app.SetToDefaultSetup action, restore the instrument to its default state before setting the
controls required by an application. This eliminates any dependency on the previous configuration of the instrument. LeCroy strives to ensure that the default state of the instrument is constant from one software release to the next.
Synchronization is an important concept that needs to be understood before you work with an X-Stream DSO via Automation. Attempting to read results while acquisitions are in progress could cause inconsistent results.
Use the X-Stream Browser while developing Automation applications. This tool is guaranteed to show the up-to-date status of the Automation hierarchy since it retrieves it from a running instrument. It is also a very quick and easy way to exercise controls in real-time without your having to write a single line of code.
When using a result object, verify that the status is valid to ensure that the acquisition and/or processing was valid.

EXAMPLES

Following are fairly complete examples of automating an X-Stream DSO, including configuration, acquisition, and reading results. Examples are given both as Excel macros, and as Visual Basic Scripts, which can run without Excel being loaded on the instrument.

Example 1: Excel Macro to Perform FFT of C1

Sub Button1_Click()
' Connect to the DSO Set app = CreateObject("LeCroy.XStreamDSO")
' Restore the instrument to its default state app.SetToDefaultSetup
' Stop acquisitions during setup app.Acquisition.TriggerMode = "Stopped"
' Turn C2 off (default state leaves C1 and C2 On) app.Acquisition.C2.View = False
' Configure F1=FFT(C1), using a Blackman-Harris filter app.Math.F1.View = True app.Math.F1.Source1 = "C1" app.Math.F1.Operator1 = "FFT" app.Math.F1.Operator1Setup.Window = "BlackmanHarris"
' Take a single acquisition, force after 2 seconds if it doesn't trigger app.Acquisition.Acquire 2, True
' Read out the FFT ' Query the number of samples in F1 and store in cell "B1" numSamples = app.Math.F1.Out.Result.Samples Cells(1, 2).Value = numSamples
' Access the waveform data array, and fill the first column
916435 RevA 1-19
Page 32
ABOUT AUTOMATION
' of the spreadsheet with it wave = app.Math.F1.Out.Result.DataArray For i = 0 To numSamples - 1 Cells(i + 1, 1).Value = wave(i) Next
End Sub

Example 2: VBScript Program to Perform FFT of C1 and Store Results in Text File

This example requires no additional software to be installed on the instrument, since it relies upon the built-in Visual Basic Script interpreter. The example is very similar to the previous Excel example, the most notable
difference being the use of a standard system ActiveX control, “Scripting.FileSystemObject”, to enable the
creation of files containing waveform data in ASCII format.
' VBScript example ' Configure the DSO to perform an FFT on Channel 1 and store ' the resulting data in a text file in ASCII format
' Connect to the DSO
Set app = CreateObject("LeCroy.XStreamDSO")
' Restore the instrument to its default state
app.SetToDefaultSetup
' Stop acquisitions during setup
app.Acquisition.TriggerMode = "Stopped"
' Turn C2 off (default state leaves C1 and C2 On)
app.Acquisition.C2.View = False
' Configure F1=FFT(C1), using a Blackman-Harris filter
app.Math.F1.View = True app.Math.F1.Source1 = "C1" app.Math.F1.Operator1 = "FFT" app.Math.F1.Operator1Setup.Window = "BlackmanHarris"
' Take a single acquisition, force after 2 seconds if it doesn't trigger
app.Acquisition.Acquire 2, True
' Readout the FFT
numSamples = app.Math.F1.Out.Result.Samples
Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile= fso.CreateTextFile("c:\XStreamFFT.txt", True)
' Write the FFT power spectrum into the file, sample by sample
wave = app.Math.F1.Out.Result.DataArray
For i = 0 To numSamples - 1
MyFile.WriteLine(wave(i))
Next
' Clean up
MyFile.Close Set fso = Nothing Set app = Nothing
1-20 916435 RevA
Page 33
CHAPTER ONE Overview

Example 3: Script to Measure the Rise Time of the Signal on C1 and Display It in a Popup Window

This example configures the DSO to measure the rise time of the signal on C2, take a single acquisition, and present the results in a popup dialog. The example requires no additional software to be installed on the instrument, since it relies on the built-in Visual Basic Script interpreter.
' VBScript example ' Configure the DSO to measure the rise time of the signal ' on Channel 1 and display it in a popup message box.
' Connect to the DSO
Set app = CreateObject("LeCroy.XStreamDSO")
' Restore the instrument to its default state
app.SetToDefaultSetup
' Stop acquisitions during setup
app.Acquisition.TriggerMode = "Stopped"
' Turn C2 off (default state leaves C1 and C2 On)
app.Acquisition.C2.View = False
' Configure P1=rise(C1)
app.Measure.MeasureMode = "MyMeasure" app.Measure.P1.View = True app.Measure.P1.ParamEngine = "rise"
' Take a single acquisition, force after 2 seconds if it doesn't trigger
app.Acquisition.Acquire 2, True
' Present the rise time in a popup message box
MsgBox app.Measure.P1.Out.Result.Value & "s", vbOKOnly, "Rise time of C1"
' Clean up
Set app = Nothing
916435 RevA 1-21
Page 34
ABOUT AUTOMATION

EARL Y AND LA TE BINDING

The COM standard on which Automation is built supports two kinds of “binding” between client and server: early (static), and late (dynamic, dispatch). Static binding usually involves a type library and is used primarily by compiled languages such as C++. In this case, function entry points are resolved at compile time. Dynamic binding (also known as late binding) involves resolving method and property calls at run time, as opposed to compile time.
The Automation interfaces in X-Stream based DSOs use primarily the latter: Dynamic binding. From many programming languages (VB, VBScript, etc.) this is transparent. But when you are developing applications in C++, which does not provide late-binding natively, the use of a “helper” class is required. This is demonstrated below:
#include "stdafx.h"
#include "AtlBase.h"
CComModule _Module;
#include "AtlCom.h"
CComPtr<IDispatch> spDso; CComDispatchDriver ddDso; // dispatch ptr. to root of object model (app)
int main(int argc, char* argv[])
{ printf("Hello X-Stream World!\n");
::CoInitialize(NULL);
HRESULT hr = spDso.CoCreateInstance(L"LeCroy.XStreamDSO"); if(SUCCEEDED(hr)) { ddDso = spDso;
// perform an Auto-Setup (app.Autosetup) hr = ddDso.Invoke0(L"AutoSetup");
// retrieve a Dispatch ptr. to the app.Display object CComVariant displayPtr; hr = ddDso.GetPropertyByName(L"Display", &displayPtr); CComDispatchDriver ddDisplay(displayPtr.pdispVal);
// enter Dual-grid mode (app.Display.GridMode = "Dual") hr = ddDisplay.PutPropertyByName(L"GridMode", &CComVariant("Dual")); }
return 0; }
1-22 916435 RevA
Page 35
CHAPTER ONE Overview

VBS REMOTE COMMAND

For users who wish to harness the power of Automation control of an instrument, but are currently using “traditional” remote commands via GPIB or the network (using the VICP protocol), there is a solution. This is primarily of interest in controlling the advanced features of X-Stream DSOs, which are not supported by a traditional remote command.
X-Stream instruments, in addition to supporting LeCroy’s standard remote command set, also support a new
command/query called VBS[?]. This command may be used in traditional remote control applications to access
Automation controls.
This example shows two methods for setting the V/Div of Channel 1, the former using a traditional remote
command, VDIV, and the latter using an Automation control via the new remote command, VBS. These two
commands are equivalent:
C1:VDIV 0.5
VBS 'app.Acquisition.C1.VerScale = 0.5'
In its query form the following are equivalent:
C1:VDIV?
VBS? 'return = app.Acquisition.C1.VerScale'
A couple of points to note here are that the app variable is pre-defined and refers to the root of the Automation hierarchy. Also note that for the query form the return = is important, it indicates which value you wish to return to
the caller.
The VBS[?] Command/Query is documented in more detail in the Remote Control Manual for X-Stream DSOs.
916435 RevA 1-23
Page 36
ABOUT AUTOMATION

X-STREAM DSO OBJECTS

The object hierarchy exposed by X-Stream based instruments is rooted at the Application object. This is the object
returned when the CreateObject(“LeCroy.XStreamDSO”) method is executed in Visual Basic. All major
instrument subsystems are available from this object, and many of these subsystems themselves are broken down further. Note that to simplify this figure only the first and last of the collections of Channels, Memories, Math, and Measurements are shown.
The reference section of this manual describes the controls presented by each of these objects.
Application
Acquisition
AuxOutput
C1
C4
Horizontal
Trigger
Cursors
CustomDSO (XMAP/XDEV Only)
Display
Hardcopy
Help
Math
F1
F8
XY
Measure
C2 and C3 not shown
F2 thru F7 not shown
Memory
M1
M2 and M3 not shown
M4
PassFail
Q1
Q2 thru Q7 not shown
Q8
Preferences
Display
Email
SaveRecall
Setup
Utilities
Waveform
System Control
Utility
DateTimeSetup
P1
P2 thru P7 not shown
P8
Options
Remote
WebEditor (XMAP/XMATH Only)
:
NNOOTTEE:
The root of the object hierarchies of some software
options are not shown in this diagram.
1-24 916435 RevA
Page 37
C
HAPTER TWO Overview
ABOUT RESULTS
PART TWO: About Results
In this chapter learn about
¾ X-Stream DSO’s rich set of Result Interfaces ¾ How to read waveforms (and other results) from the X-Stream DSO, and
write them back into the instrument
916435 RevA 2-1
Page 38
ABOUT RESULTS

INTRODUCTION

This section presents details on the rich ‘Result’ interfaces of the X-Stream DSO. These interfaces contain more than just the basic results, such as waveform data and measurement values; it includes information about horizontal and vertical resolution, event times, number of sweeps, histogram peaks, etc.
The properties that are available for readout depend on the type of result. The 7 different Results Interfaces are:
Digital
Histogram
Param
Persist
Table
Waveform
XY
The following section describes each interface, followed be a detailed explanation of each property.
Interface Descriptions

Digital

The Digital interface is found when using one of the mixed-signal oscilloscope options to generate digital
(bi-state) waveforms. These waveforms are contained in the Digitalx trace name, where x = 1, 2, 3 etc.
Each Digitalx trace is a bus that may contain multiple digital lines, with a maximum number dependent on the capabilities of the mixed-signal oscilloscope option. The key property in the Digital interface is the
DataArray, which is a 2D array containing the value of each sample of each digital line in the bus.
Example paths to Digital Result interfaces:

Histogram

The Histogram interface is used for all histogram traces. Histograms can be configured on most oscilloscopes as a math function (Fx). Histograms are also used in various analysis modes, especially on Serial Data Analyzers, where the HTIE trace is the source data for the algorithm to calculate Total jitter
(Tj). The key property is BinPopulations, which is a 1D array of the bin populations. Example paths to
HTIE Result interfaces:

Param

The Parameter interface is used in the Measurement and Pass/Fail systems to hold both individual
results and result arrays. The key properties for the Parameter interface are Value and ValueArray.
Value holds the last measurement or P/F result, while ValueArray holds all measurements taken for the last acquisition. Example paths to Param Result interfaces:
app.LogicAnalyzer.Digital1.Out.Result app.LogicAnalyzer.Digital2.Out.Result
app.Math.F1.Out.Result (assuming that F1 is setup as a Histogram) app.SDA.Htie.Out.Result
app.Measure.P1.Out.Result app.Measure.P1.Sdev.Result app.Measure.Measure("P1").Out.Result
2-2 916435 RevA
Page 39
CHAPTER TWO Overview

Persist

The Persist interface is most often found when using software options that create eye diagrams or other
waveshapes that are the result of overlaying multiple waveforms. (Note that this does not apply to the
Persistence display mode.) The key property in the Persist interface is the DataArray, which is a 2D
array containing the population of each pixel of the persistance map. Example paths to Persist Result interfaces:
app.SDA.Eye.Out.Result app.SDA.Eye2.Out.Result

Table

Table Results interfaces are used primarily used in conjunction with the various low-speed serial decoding options, such as CAN, I2C, SPI, UART, etc. When the table is displayed, the user has access to information about the messages decoded for the last acquisition. Retrieving data from the Table interface involves some knowledge of the table’s structure, in terms of the columns that are displayed and the cell
types. The CellType and CallValue are the key properties to use to retrieve the table’s data. See the information in the CellValue property for more information. Example paths to Table Result interfaces:
app.SerialDecode.Decode1.Out.Result. app.SerialDecode.Objects("Decode2").Out.Result
Waveform
Waveform Results interfaces can be found wherever there is basic Voltage vs. Time waveforms. Examples include channel (Cx), memory (Mx), math function (Fx) and zoom (Zx) traces, as well as others that are associated with specific analysis packages, such as the Power waveform used in the PMA2 package. In general, these waveforms are usual voltage vs time, unless a current probe or other method of changing the vertical units (e.g. the Rescale Math function) is employed. The key property in the
Waveform interface is the DataArray, which is a 1D array containing the value of each sample in the
waveform. Example paths to Waveform Result interfaces:
XY
The XY interface is used on XY waveforms. Users can create an XY waveform by selecting this option in the Display Setup… screen. XY waveforms allow you to see how the signal on one channel moves in relation to another. The key property is the DataArray, which is a 2D array that returns the voltages on the X and Y sources for each XY pair. Example path to the XY Result interface:
app.Acquisition.C1.Out.Result app.Acquisition.Channels("C1").Out.Result app.Math.F2.Out.Result app.Zoom.Z3.Out.Result app.SDA.Btub.out.Result app.SDA.TIETrend.Out.Result app.PMA.Pwr.Out.Result
(Note that traces like F2 and Z3 can hold waveforms like histograms, which do not use the Waveform interface.)
app.Math.XY.Out.Result
916435 RevA 2-3
Page 40
ABOUT RESULTS

OVERVIEW OF RESULTS

Variable Types

The examples in this section use the following standards:
Integer is 16 bit signed integer
Long is 32 bit signed integer
Double is 8byte floating point type
String is an array of characters
Object is a object with its own interface.
Where a variable is dimensioned without indicating a variable type, the variable is a variant.

Use of Variants

Several properties, most significantly the DataArray object, is a variant containing either a one or two dimensional
array. Dimension the target variable as a variant type, and assign the DataArray property to it. See the DataArray property for examples of its use within each of the Result interfaces.

Using Variables to Reference Objects within the XStream Hierarchy

One way to increase the readability and simplicity of your source code is to use variables to reference objects that are at each level of the XStream Hierarchy. For example, here is the code to readout the Sweeps property for channel 1:
Dim numSweeps as Long numSweeps = app.Acquisition.C1.Out.Result.Sweeps
If you are reading out more than just the Sweeps property, you might find it easier to read the following :
Dim C1Res as Object Dim C1 as Object Dim numSweeps as Long Dim HorizontalOffset As Double Dim HorizontalPerStep As Double Dim VerticalOffset As Double Dim VerticalPerStep As Double Dim wform
C1 = app.Acquisition.C1 C1.AverageSweeps = 200 numSweeps = C1Res.Sweeps HorizontalOffset = C1Res.HorizontalOffset HorizontalPerStep = C1Res.HorizontalPerStep VerticalOffset = C1Res.VerticalOffset VerticalPerStep = C1Res. VerticalPerStep
2-4 916435 RevA
Page 41
CHAPTER TWO Overview
The examples in this chapter do not make use of this approach in order to show the "full story", but it is recommended. The panel setup files make heavy use of using variables to objects, making them far more readable and editable:
Set Acquisition = XStreamDSO.Acquisition Set C1 = Acquisition.C1 ' C1 ... C1.View = True C1.UseGrid = "YT1" C1.Persisted = False C1.PersistenceSaturation = 50 C1.PersistenceMonoChrome = True C1.Persistence3d = False C1.ShowLastTrace = False C1.PersistenceTime = "Infinite" C1.Persist3DQuality = "Solid" C1.AxisXRotation = 45 C1.AxisYRotation = 20 C1.LabelsText = "" C1.LabelsPosition = "" C1.ViewLabels = False C1.SegmentMode = "Adjacent" C1.ProbeAttenuation = 1 C1.VerScale = 0.05 C1.VerScaleVariable = False C1.VerOffset = 0 C1.Coupling = "DC50" C1.BandwidthLimit = "Full" C1.AverageSweeps = 1 C1.InterpolateType = "Linear" C1.Invert = False C1.Deskew = 0 C1.NumSegmentsDisplayed = 1 C1.StartSegment = 1
916435 RevA 2-5
Page 42
ABOUT RESULTS

DESCRIPTION OF RESULT PROPERTIES

Base

Applies to: Histogram
Description: Horizontal coordinate of the leftmost of the two most populated histogram peaks. It is equivalent to
the paramater hbase.
Example:
Dim hbase as Double hbase = app.Math.F1.Out.Result.Base

BinPopulations

Applies to: Histogram
Description: VARIANT array containing the populations of each bin. Bin 0 is the first bin. Index the array to retrieve the number of counts in a given bin.
Example:
'Read out BinPopulations by indexing the array using the 'FirstPopulatedBin and LastPopulatedBin properties as boundaries 'Also shows code for determining coordinate of bin centers
Const STARTROW = 5 Dim i As Integer Dim BinPops Dim FirstPopulatedBin, LastPopulatedBin As Integer Dim OffsetAtLeftEdge As Double Dim BinWidth As Double
BinPops = app.Math.F1.Out.Result.BinPopulations FirstPopulatedBin = app.Math.F1.Out.Result.FirstPopulatedBin LastPopulatedBin = app.Math.F1.Out.Result.LastPopulatedBin
OffsetAtLeftEdge = app.Math.F1.Out.Result.OffsetAtLeftEdge BinWidth = app.Math.F1.Out.Result.BinWidth
For i = FirstPopulatedBin To LastPopulatedBin Cells(i - FirstPopulatedBin + STARTROW + 1, 7) = i 'Calculate Bin Center Cells(i - FirstPopulatedBin + STARTROW + 1, 8) = OffsetAtLeftEdge + (BinWidth / 2) + BinWidth * i Cells(i - FirstPopulatedBin + STARTROW + 1, 9) = BinPops(i) Next

Bins

Applies to: Histogram
Description: Number of bins in the histogram.
Example:
Dim Bins as Integer Bins = app.Math.F1.Out.Result.Bins

BinWidth

Applies to: Histogram
Description: Width of each bin in the histogram.
Example:
Dim BinWidth as double BinWidth = app.Math.F1.Out.Result.BinWidth
2-6 916435 RevA
Page 43
CHAPTER TWO Overview

BusName

Applies to: Digital
Description: Name of the bus, which can be configured via the user interface or by the automation property
app.LogicAnalyzer.Digital1.BusName Example:
Dim BusName As String BusName = app.LogicAnalyzer.Digital1.Out.Result.BusName

CellType

Applies to: Table
Description: Datatype for the selected cell in a table.This is used in order to properly readout the CellValue. .
Arguments:
Row: 0-based index of the row containing the cell. Use the Rows property to determine the maximum
number of rows.
Column: 0-based index of the column containing the cell. Use the Columns property to determine the
maximum number of columns.
Result type: Enumerated, with the following definitions:
0: Variant 2: Param result interface (other values exist, but do not apply to the Table interface)
Example:
‘Returns CellType for row 1, column 1 Dim CellType As Integer CellType = app.SerialDecode.Decode1.Out.Result.CellType(1, 1)

CellValue

Applies to: Table
Description: The value for the selected cell in a table. The method for reading back CellValue depends on the cell’s CellType property. For cells where CellType = 0 (variant), then CellValue contains the cell’s value. For CellType = 2, CellValue becomes a Param result interface with its own value property. See the example for more information.
Arguments:
Row: 0-based index of the row containing the cell
Column: 0-based index of the column containing the cell
Example:
Dim CellValue ‘ When the CellType for the cell = 0, read out the value directly, as shown
below. ' This call often returns "Idx", which is the header for column 0 CellValue = app.SerialDecode.Decode1.Out.Result.CellValue(0, 0)
' The code below demonstrates how to readback the ‘ cell value when the CellType for the cell = 2:
Dim DecoderTableResult As Object Set DecoderTableResult = app.SerialDecode.Decode1.Out.Result Dim CellValueOb As Object
916435 RevA 2-7
Page 44
ABOUT RESULTS
Set CellValueOb = DecoderTableResult.CellValue(1, 2) CellValue = CellValueOb.Value
Scopes that have a serial decoder option include a script for outputting the table of decoded values. These can be found on the scope within the D:\Applications folder.

Columns

Applies to: Persist, Table
Description: Number of columns in the DataArray. Typically equal to 1000 for Persist waveforms. For Tables, the result can vary depending on the application.
Example:
Dim Columns As Integer ‘Persist example
Columns = app.SDA.Eye.Out.Result.Columns ‘Table example
Columns = app.SerialDecode.Decode1.Out.Result.Columns

DataArray

Applies to: Digital, Persist, Waveform, XY
General Description: Variant array containing data for a trace. The implementation depends on the type of waveform; see below for further details.

XY Interface:

Arguments (optional):
arrayValuesScaled as Boolean
numSamples as Long
startIndex as Long
sparsingFactor as Long
Default value:TRUE, data is scaled
Determines whether returned values are scaled or raw. Passing TRUE indicates scaled data; FALSE indicates raw data. Scaled values are double precision; raw values are 16-bit signed integers. See the properties XVerticalPerStep, XVerticalResolution and XVerticalOffset properties (and the corresponding Y coordinate) for more information
Default value: -1, retrieve all data
Number of samples to retreived
Default value: 0, first sample
Index of the first sample to be retreived.
Default value: 1, no sparsing
Determines the sparsing factor to use. For example, a sparsing factor of 5 means to retreive every 5
th
point. (Note: Use the math function called Sparse in order to configure sparsing offset)
Example:
‘Reads values to use for DataArray arguments from a spreadsheet, and then loops through ‘the retrieved array, saving the data to the spreadsheet along with sample index and sample time. Const ROWOFFSET = 10 Const COLOFFSET = 7
2-8 916435 RevA
Page 45
CHAPTER TWO Overview
Dim HorizontalPerStep As Double Dim HorizontalOffset As Double Dim ScaleArray As Boolean Dim nSamples As Long Dim startIndex As Long Dim sparseFactor As Long Dim XYwform
ScaleArray = Cells(9, 5) nSamples = Cells(10, 5) startIndex = Cells(11, 5) sparseFactor = Cells(12, 5) XYwform = app.Math.XY.Out.Result.DataArray '(ScaleArray, nSamples, startIndex, sparseFactor) HorizontalPerStep = app.Math.XY.Out.Result.HorizontalPerStep HorizontalOffset = app.Math.XY.Out.Result.HorizontalOffset
For i = 0 To UBound(XYwform) For j = 0 To 1 Cells(i + ROWOFFSET, COLOFFSET) = i ‘Calculate sample time Cells(i + ROWOFFSET, COLOFFSET + 1) = HorizontalPerStep * i + HorizontalOffset ‘Sample Cells(i + ROWOFFSET, COLOFFSET + 2) = XYwform(i, 0) ‘X coordinate Cells(i + ROWOFFSET, COLOFFSET + 3) = XYwform(i, 1) ‘Y coordinate Next j Next i

Waveform Interface:

Arguments (optional):
arrayValuesScaled as Boolean
Default value:TRUE, data is scaled
Determines whether returned values are scaled or raw. Passing TRUE indicates scaled data; FALSE indicates raw data. Scaled values are double precision; raw values are 16-bit signed integers. (See the properties VerticalPerStep, VerticalResolution and VerticalOffset properties for more information)
numSamples as Long
Default value: -1, retrieve all data
Number of samples to retreived
startIndex as Long
Default value: 0, first sample
Index of the first sample to be retreived.
sparsingFactor as Long
Default value: 1, no sparsing
Determines the sparsing factor to use. For example, a sparsing factor of 5 means to retreive every 5
th
point. (Note: Use the math function called Sparse in order to configure sparsing offset)
Example:
‘Reads values to use for DataArray arguments from a spreadsheet, and then loops through ‘the retrieved array, saving the data to the spreadsheet along with sample index and sample time.
916435 RevA 2-9
Page 46
ABOUT RESULTS
Const ROWOFFSET = 10 Const COLOFFSET = 7 Dim HorizontalPerStep As Double Dim HorizontalOffset As Double Dim ScaleArray As Boolean Dim nSamples As Long Dim startIndex As Long Dim sparseFactor As Long Dim wform
ScaleArray = Cells(9, 5) nSamples = Cells(10, 5) startIndex = Cells(11, 5) sparseFactor = Cells(12, 5)
wform = app.Acquisition.C1.Out.Result.DataArray(ScaleArray, nSamples, startIndex, sparseFactor) HorizontalPerStep = app.Acquisition.C1.Out.Result.HorizontalPerStep HorizontalOffset = app.Acquisition.C1.Out.Result.HorizontalOffset
For i = 0 To UBound(wform) Cells(i + ROWOFFSET, COLOFFSET) = i Cells(i + ROWOFFSET, COLOFFSET +1) = HorizontalPerStep * i + HorizontalOffset Cells(i + ROWOFFSET, COLOFFSET+2) = wform(i) Next i

Persist Interface:

Description:
Retrieves a 2D array containing hits in each cell of of the rectangle selected via the input arguments.
Arguments (optional):
numColumns as Long
Default value: -1, retrieve all columns
Number of columns to retrieve.
numRows as Long
Default value: -1, retrieve all rows
Number of rows to retrieve.
startColumn as Long
Default value: 0, first column
Index of the first column to retrieve. (0-based)
startRow as Long
Default value: 0, first row
Index of the first row to retrieve. (0-based)
Example:
‘Reads values to use for DataArray arguments from a spreadsheet, and then loops through ‘the retrieved array, saving the data to the spreadsheet.
Const ROWOFFSET = 10
2-10 916435 RevA
Page 47
CHAPTER TWO Overview
Const COLOFFSET = 7 Dim numColumns As Long Dim numRows As Long Dim startColumn As Long Dim startRow As Long Dim wform
numColumns = Cells(9, 5) numRows = Cells(10, 5) startColumn = Cells(11, 5) startRow = Cells(12, 5) wform = app.SDA.Eye.Out.Result.DataArray(numColumns, numRows, startColumn, startRow) For i = 0 To numRows - 1 For j = 0 To numColumns - 1 Cells(i + ROWOFFSET, j + COLOFFSET) = wform(i, j) Next j Next i

Digital Interface:

Description:
Retrieves a 2D array containing the state of each sample on each line. The value 1 is returned if he sample was above the threshhold, 0 if below.
Arguments (optional):
numSamples as Long
Default value: -1, retrieve all data
Number of samples to retreived
numLines as Long
Default value: -1, retrieve all lines.
Number of digital lines to retrieve.
startIndex as Long
Default value: 0, first index
Index of the first sample to retrieve. (0-based)
startLine as Long
Default value: 0, first digital line
Index of the first digital line to retrieve (0-based). The user selects which lines to enable; only data from enabled lines are included in the DataArray
Example:
‘Reads values to use for DataArray arguments from a spreadsheet, and then loops through ‘the retrieved array, saving the data to the spreadsheet.
Const ROWOFFSET = 10 Const COLOFFSET = 7 Dim nSamples As Long Dim nLines As Long Dim startIndex As Long Dim startLine As Long Dim wform
916435 RevA 2-11
Page 48
ABOUT RESULTS
nSamples = Cells(9, 5) nLines = Cells(10, 5) startIndex = Cells(11, 5) startLine = Cells(12, 5)
wform = app.LogicAnalyzer.Digital1.Out.Result.DataArray(nSamples, nLines, startIndex, startLine)
'Saves the retrieved samples to a spreadsheet, with each digital line in a column. For j = 0 To UBound(wform, 2) ' index out lines For i = 0 To UBound(wform, 1) ' index out samples in line Cells(i + ROWOFFSET, j + COLOFFSET) = wform(i, j) Next Next

ExtendedStatus

Applies to: All Result interfaces.
Description: Reserved for future use.
Example: N/A

FirstEventTime

Applies to: All Result interfaces.
Description: Absolute trigger time of the acquisition, or the time of the first trigger in an acquisition that utilizes multiple sweeps. Examples of multi-sweep acquisitions are Sequence Mode and when a source channel is configured for pre-processor averaging.
Times are returned encoded as a currency value (VT_CY) within a variant, this allows the use of the full 64-bit resolution of the timestamp value. Values are referenced to 1st Jan 2000, with 1ns resolution. Note that VT_CY values are stored as 64-bit (8 byte) two's complement integers, scaled by 10,000 to give a fixed-point number with 15 digits to the left of the decimal point, and 4 digits after. See the example for details on decoding
FirstEventTime as well as other properties that return times such as LastEventTime and UpdateTime. Example:
Dim FirstEventTime Dim TimeString as String FirstEventTime = app.Acquisition.C1.Out.Result.FirstEventTime timeString = DecodeTimeProperty(FirstEventTime)
What follows is a function for decoding the FirstEventTime, LastEventTime and UpdateTime properties.
Function DecodeTimeProperty(ByVal EventTime) As String ' Decodes result returned by FirstEventTime, LastEventTime and UpdateTime properties
Dim days, thedate, hours, thehour, minutes, theminute, seconds Dim outstring As String days = EventTime / (86400 * 100000#) ' use 1e5 since the data returned is scaled by 10,000 thedate = DateAdd("d", days, "1-Jan-00") hours = (days - Int(days)) * 24 'calculate remaining hours thehour = Int(hours) 'truncate to get hour in the day minutes = (hours - thehour) * 60 'calculate minutes since hour began theminute = Int(minutes) 'truncate to get minute value seconds = (minutes - theminute) * 60 'calculate number of seconds 'Format output string DecodeTimeProperty = thedate & " " & thehour & ":" & theminute & ":" & seconds
2-12 916435 RevA
Page 49
CHAPTER TWO Overview
End Function

FirstPopulatedBin

Applies to: Histogram
Description: Index of the first populated bin. (The first bin of the histogram is bin 0).
Example:
Dim FirstPopulatedBin as Integer FirstPopulatedBin = app.Math.F1.Out.Result.FirstPopulatedBin

HorizontalFrameStart

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Coordinate of the left edge of the graticule containing the trace relative to the trigger time, which is at time = 0.
Example:
Dim XFrameStart As Double X FrameStart = app.Acquisition.C1.Out.Result.HorizontalFrameStart

HorizontalFrameStop

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Coordinate of the right edge of the graticule containing the trace relative to the trigger time, which is at time = 0.
Example:
Dim XFrameStop As Double XFrameStop = app.Acquisition.C1.Out.Result.HorizontalFrameStop

HorizontalOffset

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Time of the first sample. Note that the first sample is typically just off screen, to the left of the grid. Use this value when calculating the time for each sample.
Example:
‘Waveform Interface example: Dim HorizontalOffset As Double HorizontalOffset = app.Acquisition.C1.Out.Result.HorizontalOffset
Dim HorizontalPerStep As Double HorizontalPerStep = app.Acquisition.C1.Out.Result.HorizontalPerStep
‘Example of calculating sample times: Dim SampleTime as Double Dim i as Long For i = 0 to numPoints-1 SampleTime = HorizontalPerStep * i + HorizontalOffset Next
For a more complete example, see the example under Waveform in DataArray as well as the function GetDataArray_Click
916435 RevA 2-13
Page 50
ABOUT RESULTS

HorizontalPerColumn

Applies to: Persist
Description: Difference in the horizontal coordinate of adjacent columns (typically in seconds). Use
HorizontalPerColumn to determine the timing information for each column of the DataArray. Example:
Dim HorizontalPerColumn As Double HorizontalPerColumn = app.SDA.Eye.Out.Result.HorizontalPerColumn

HorizontalPerStep

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Time between samples, otherwise known as the sample interval. This is the inverse of the SampleRate.
Example:
Dim HorizontalPerStep As Double HorizontalPerStep = app.Acquisition.C1.Out.Result.HorizontalPerStep

HorizontalResolution

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Resolution of the readout of horizontal values. Not directly related to the sample period.
Example:
Dim HorizontalResolution As Double HorizontalResolution = app.Acquisition.C1.Out.Result.HorizontalResolution
2-14 916435 RevA
Page 51
CHAPTER TWO Overview

HorizontalUnits

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Resolution of the readout of horizontal values. Not directly related to the sample period.
Example:
Dim HorizontalUnits As String HorizontalUnits = app.Acquisition.C1.Out.Result.HorizontalUnits

HorizontalVarianceArray

Applies to: Waveform, XY
Description: Variant array with the variances from the nominal sample times. Used on WaveExpert oscilloscopes
Example:
Dim HorizontalUnits As Double HorizontalUnits = app.Acquisition.C1.Out.Result.HorizontalUnits

HorizontalVariances

Applies to: Waveform, XY
Description: Number of elements in HorizontalVarianceArray
Example:
Dim HorizontalVarianceArray HorizontalVarianceArray = app.Acquisition.C1.Out.Result.HorizontalVarianceArray

IndexOfFirstSampleInFrame

Applies to: Waveform
Description: Index of the first sample that appears in the graticule. This is typically index 1, since index 0 is off-
grid to the left. When traces are zoomed
Example:
Dim IndexOfFirstSampleInFrame as Long IndexOfFirstSampleInFrame = app.Acquisition.C1.Out.Result.IndexOfFirstSampleInFrame

LastEventTime

Applies to: All Result interfaces.
Description:
Time of the last contributing event in a set. Useful only when the result includes data produced by a sequence acquisition, or a cumulative operation such as averaging. Times are returned encoded as a currency value
(VT_CY) within a variant; see description for FirstEventTime for decoding details.
Example:
Dim LastEventTime Dim TimeString as String LastEventTime = app.Acquisition.C1.Out.Result.FirstEventTime TimeString = DecodeTimeProperty(LastEventTime)
See FirstEventTime for the code for the function DecodeTimeProperty, which is the example of decoding LastEventTime.
916435 RevA 2-15
Page 52
ABOUT RESULTS

LastPopulatedBin

Applies to: Histogram
Description: Index of the last populated bin. (The first bin of the histogram is bin 0).
Example:
Dim LastPopulatedBin as Long LastPopulatedBin = app.Math.F1.Out.Result.LastPopulatedBin

Levels

Applies to: Digital
Description: Returns the value 2, corresponding to the number of levels possible.
Example:
Dim Levels As Integer Levels = app.LogicAnalyzer.Digital1.Out.Result.Levels

LineAliasName

Applies to: Digital
Description: Alias of the line name based on the input index. The alias for the line is displayed on the right side of
the grid, and have values of the form "D0", "D1", etc.
Example:
Dim LineAliasName0 'As String LineAliasName0 = app.LogicAnalyzer.Digital1.Out.Result.LineAliasName(0)

LineName

Applies to: Digital
Description: Name of the line. This can be modified via the user interface or via the property
app.LogicAnalyzer.Digital1.LineNames Example:
Dim LineName0 as String LineName0 = app.LogicAnalyzer.Digital1.Out.Result.LineName(0)

Lines

Applies to: Digital
Description: Number of lines in the digital bus.
Example:
Dim Lines As Integer Lines = app.LogicAnalyzer.Digital1.Out.Result.Lines
Max
Applies to: Histogram
Description: Horizontal coordinate of the left edge of the last populated bin. It is equivalent to the hmax
parameter.
Example:
Dim Max as double Max = app.Math.F1.Out.Result.Max
2-16 916435 RevA
Page 53
CHAPTER TWO Overview

MaxPopulation

Applies to: Histogram
Description: Mode of the histogram (population of the bin with the most hits).
Example:
Dim MaxPopulation as Long MaxPopulation = app.Math.F1.Out.Result.MaxPopulation

MaxPopulationBin

Applies to: Histogram
Description: Index of the bin with the highest population. (The first bin of the histogram is bin 0).
Example:
Dim MaxPopulationBin as Integer MaxPopulationBin = app.Math.F1.Out.Result.MaxPopulationBin

MaxPopulationInRectangle

Applies to: Persist
Description: Population of the largest element in the selected rectangle.
Arguments:
Example:
‘Example for determining the maximum population in the rectangle Dim numColumns As Long Dim numRows As Long Dim startColumn As Long Dim startRow As Long Dim MaxPopulationInRectangle As Long numColumns = Cells(9, 5) numRows = Cells(10, 5) startColumn = Cells(11, 5) startRow = Cells(12, 5) MaxPopulationInRectangle = app.SDA.Eye.Out.Result.MaxPopulationInRectangle(numColumns, _ numRows, st artColumn, startRow) ‘Use no arguments to select the full rectangle: 'MaxPopulationInRectangle = app.SDA.Eye.Out.Result.MaxPopulationInRectangle
numColumns as Long
Default value: -1, use all columns
Number of columns to use in maximum population search.
numRows as Long
Default value: -1, use all rows
Number of rows to retrieve.
startColumn as Long
Default value: 0, first column
Index of the first column to use. (0-based)
startRow as Long
Default value: 0, first row
Index of the first row to use. (0-based)
916435 RevA 2-17
Page 54
ABOUT RESULTS

Mean

Applies to: Histogram
Description: Returns the mean value of the histogam. It is equivalent to the hmean parameter.
Example:
Dim hmean as double hmean = app.Math.F1.Out.Result.Mean
Min
Applies to: Histogram
Description: Horizontal coordinate of the left edge of the first populated bin. It is equivalent to the hmin parameter.
Example:
Dim hmin as double hmin = app.Math.F1.Out.Result.Min

NumFrameDimensions

Applies to: All Result interfaces.
Description: Number of dimensions in the current result. For waveforms, this is typically = 2, (Voltage and time) dimensions). For X-Y mode the result is 3.
Example:
Dim NumFrameDimensions as Integer NumFrameDimensions = app.Acquisition.C1.Out.Result.NumFrameDimensions

NumSamplesInFrame

Applies to: Waveform
Description: Number of samples within the graticule.
Example:
Dim NumSamplesInFrame as Long NumSamplesInFrame = app.Acquisition.C1.Out.Result.NumSamplesInFrame

OffsetAtLeftEdge

Applies to: Histogram
Description: Horizontal coordinate of left edge of the first bin (either populated or unpopulated) displayed on the
grid. Use OffsetAtLeftEdge as an offset for calculating the position of each bin.
Example:
'Read out BinPopulations by indexing the array using the 'FirstPopulatedBin and LastPopulatedBin properties as boundaries 'Also shows code for determining coordinate of bin centers
Const STARTROW = 5 Dim i As Integer Dim BinPops Dim FirstPopulatedBin, LastPopulatedBin As Integer Dim OffsetAtLeftEdge As Double Dim BinWidth As Double
BinPops = app.Math.F1.Out.Result.BinPopulations FirstPopulatedBin = app.Math.F1.Out.Result.FirstPopulatedBin LastPopulatedBin = app.Math.F1.Out.Result.LastPopulatedBin
OffsetAtLeftEdge = app.Math.F1.Out.Result.OffsetAtLeftEdge
2-18 916435 RevA
Page 55
CHAPTER TWO Overview
BinWidth = app.Math.F1.Out.Result.BinWidth For i = FirstPopulatedBin To LastPopulatedBin
Cells(i - FirstPopulatedBin + STARTROW + 1, 7) = i 'Calculate Bin Center Cells(i - FirstPopulatedBin + STARTROW + 1, 8) = OffsetAtLeftEdge + (BinWidth / 2) + BinWidth * i Cells(i - FirstPopulatedBin + STARTROW + 1, 9) = BinPops(i) Next

Peaks

Applies to: Histogram
Description: Number of peaks in the histogram.
Example:
Dim NumPeaks as Integer NumPeaks = app.Math.F1.Out.Result.Peaks

PeakInfo

Applies to: Histogram
Description: VARIANT array returning information about the peak selected in the input argument. Sending 0
returns information for the entire histogram; input values from 1 to Peaks+1 returns information about the
requested peak.
Argument (Optional):
peakIndex
Selects the peak of interest. 0 requests information about the entire histogram; >0 requests information about a single peak.
Default value: 0
Definition of output elements:
Index Description
0 Mean 1 Sigma 2 Unused 3 Unused 4 FirstPopulatedBin 5 LastPopulatedBin 6 MaxPopulationBin 7 MaxPopulation 8 PopulationInside
Example:
‘Reads out complete PeakInfo arrays for each peak. Const STARTROW = 10 Const STARTCOL = 13 Dim PeakInfo Dim i, j As Integer Dim NumPeaks as Integer NumPeaks = app.Math.F1.Out.Result.Peaks For i = 0 To NumPeaks ‘Index out a peak (index 0 is the entire histogram) PeakInfo = app.Math.F1.Out.Result.PeakInfo(i) Cells(STARTROW, STARTCOL + i) = i
916435 RevA 2-19
Page 56
ABOUT RESULTS
‘loop through each element of the selected PeakInfo array. There are 9 elements. For j = 0 To 8 Cells(STARTROW + j + 1, STARTCOL + i) = PeakInfo(j) Next Next

PopulationInside

Applies to: Histogram
Description: Population of the histogram for events contained within the number of bins configured.
Example:
Dim PopInside as Long PopInside = app.Math.F1.Out.Result.PopulationInside

PopulationOfRectangle

Applies to: Persist
Description: Population of the selected rectangle.
Arguments:
numColumns as Long
Default value: -1, use all columns
Example:
Dim numColumns As Long Dim numRows As Long Dim startColumn As Long Dim startRow As Long Dim PopulationOfRectangle As Long numColumns = Cells(9, 5) numRows = Cells(10, 5) startColumn = Cells(11, 5) startRow = Cells(12, 5) numRows, startColumn, startRow) PopulationOfRectangle = app.SDA.Eye.Out.Result.PopulationOfRectangle(numColumns, _ numRows, startColumn, startRow) PopulationOfRectangle = app.SDA.Eye.Out.Result.PopulationOfRectangle
Number of columns to use in maximum population search.
numRows as Long
Default value: -1, use all rows
Number of rows to retrieve.
startColumn as Long
Default value: 0, first column
Index of the first column to use. (0-based)
startRow as Long
Default value: 0, first row
Index of the first row to use. (0-based)

PopulationOver

Applies to: Histogram
Description: Population of the events greater than the last bin.
2-20 916435 RevA
Page 57
CHAPTER TWO Overview
Example:
Dim PopOver as Long PopOver = app.Math.F1.Out.Result.PopulationOver

PopulationUnder

Applies to: Histogram
Description: Population of the events less than the first bin.
Example:
Dim PopUnder as Long PopUnder = app.Math.F1.Out.Result.PopulationUnder
RMS
Applies to: Histogram
Description: RMS value of the histogram. Equivalent to the parameter hrms.
Example:
Dim hRMS as Double hRMS = app.Math.F1.Out.Result.RMS

Rows

Applies to: Persist, Table
Description: Number of rows in the DataArray (Persist) or in the table. Typically equal to 256 for Persist waveforms. For Tables, the result can vary depending on the application.
Example:
‘Persist example Dim Rows As Integer Rows = app.SDA.Eye.Out.Result.Rows

Samples

Applies to: Digital, Waveform, XY
Description: Number of samples in the waveform. For the Waveform and XY interface, this is typically the number of samples configured for the acquisition (e.g. 500) plus 2. The additional two points are off-grid, one on each side. For the Digital interface, this is the number of samples in each digital line + 1.
Example:
Dim Samples as Long Samples = app.Acquisition.C1.Out.Result.Samples

Sdev

Applies to: Histogram
Description: Standard deviation of the histogram. Equivalent to the parameter hsdev.
Example:
Dim hsdev as Double hsdev = app.Math.F1.Out.Result.Sdev
916435 RevA 2-21
Page 58
ABOUT RESULTS

Status

Description: Result status. Status is returned as a decimal value, but should be treated like a register with the following bit values. See the example for decoding the Status result.
VT_DECIMAL
64-bit hexadecimal
int value shown in
XStreamBrowser
0x1 0.0001 Invalid result
0x2 0.0002 Data overflow
0x4 0.0004 Data underflow
0x8 0.0008
0x10 0.0016 Less than
0x20 0.0032 Greater than
0x40 0.0064 Not a pulse
0x80 0.0128 Not cyclic
0x100 0.0256 Data averaged
0x200 0.0512 Unlocked PLL Unlocked PLL
0x400 0.1024 Other error
0x800 0.2048 Other warning
value
returned
from Status
property
StatusDescription Description
Indicate that this Result cannot be used for any calculation
Result contains Overflow data or is calculated from a Result containing Overflows.
Result contains Underflow data or is calculated from a Result containing Underflows
Some values are
undefined
Result contains some values or data that are undefined.
Actual value is likely to be less than the calculated value. Mostly used for parameter measurements. Actual value is likely to be greater than the calculated value. Mostly used for parameter measurements.
Analyzed signal is not recognized as a pulse; mostly used for pulse parameter measurements.
Contains some values measured on non-cyclic signal.
Calculated value is the result of an average of multiple measurements.
Indicates some other error condition, usually accompanied by a processor-specific status description
Indicates some other warning condition, usually accompanied by a processor-specific status description
Indicates some other informative
0x1000 0.4096 Other info
0x2000 0.8192 Cumulative result
2-22 916435 RevA
condition, usually accompanied by a processor-specific status description
Cumulative processing somewhere in the chain
Page 59
CHAPTER TWO Overview
VT_DECIMAL
64-bit hexadecimal
int value shown in
XStreamBrowser
0x4000 - 0x200000
0x400000 419.4304 Not an NRZ Eye Not an NRZ Eye 0x800000 838.8608 Not an RZ Eye Not an RZ Eye
0x1000000 ­0x80000000
value
returned
from Status
property
1.6384 -
209.7152
1677.7216 -
214748.3648
StatusDescription Description
reserved
reserved
0x100000000 429496.7296 Inputs incompatible
0x200000000 858993.4592 Algorithm limits reached
Some incompatibility exists between inputs (e.g. units, frame, sample rate)
Algorithm couldn't converge or some other algorithmic limitation reached.
0x400000000 1717986.918 Bad settings Combination of settings isn't correct.
0x800000000 3435973.837 Too little data
Not enough data to accurately perform calculation.
0x1000000000 6871947.674 Too much data Too muchdata to perform calculation.
0x2000000000 13743895.35
Requires uniform horz
interval
Uniform horizontal interval required.
0x4000000000 27487790.69 Bad units Incorrect or invalid units
Range of data values is too close to the
0x8000000000 54975581.39 Data range too low
resolution (e.g. bad signal to noise ratio).
0x10000000000 109951162.8 Data undersampled Sample rate too low
0x20000000000 219902325.6 Poor statistics
Too few samples, e.g. to populate a data histogram to have enough statistics
Transition time to slow, e.g. JTA time
0x40000000000 439804651.1 Slow transition time
measurement accuracy for clock that requires fast edges.
0x80000000000 879609302.2 Data resampled Data is resampled
0x100000000000 1759218604 Data interpolated
0x200000000000 3518437209
Measurement scale
imprecise
Data is interpolated; e.g. interpolating missing points in RIS
If all the data falls in the same histogram bin, one line for trend, one pixel for XY, etc...
Data not available (e.g. processing
0x400000000000 7036874418 No data available
inputs disconnected or clear sweeps on cumulative processing).
0x800000000000 14073748836
Some accumulated
results invalid
0x1000000000000 28147497671 Insufficient Memory
One or more results or values within the accumulated result were invalid and were skipped.
Memory limitations reached, attempted allocations failed.
916435 RevA 2-23
Page 60
ABOUT RESULTS
VT_DECIMAL
64-bit hexadecimal
int value shown in
XStreamBrowser
0x2000000000000 56294995342 Channel not active Source channel inactive.
0x4000000000000 1.1259E+11 use status description (custom string)
value
returned
from Status
property
StatusDescription Description
0x8000000000000 -
0x8000000000000000
reserved

StatusDescription

Description:
Example: Description for each status code. See the above table.

Sweeps

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Number of sweeps used for results that are based on multiple sweeps, such as averages, histograms, eye diagrams, etc.
Example:
Dim Sweeps as Long Sweeps = app.Acquisition.C1.Out.Result.Sweeps
Top
Applies to: Histogram
Description: Horizontal coordinate of the rightmost of the two most populated histogram peaks. It is equivalent to
the paramater htop.
Example:
Dim htop as Double htop = app.Math.F1.Out.Result.Top
See the HistogramProperties_Click subroutine for a more complete example.

UniformInterval

Applies to: Digital
Description: Returns if the samples are evenly spaced in time. Currently always true.
Example:
Dim htop as Double htop = app.Math.F1.Out.Result.Top
2-24 916435 RevA
Page 61
CHAPTER TWO Overview

UpdateTime

Applies to: All Result interfaces.
Description: Indicates the time that particular result was most recently updated. Often, this property will show the same value as LastEventTime, but for traces such as memories (M1, M2, etc) this will be the time that the waveform was stored to the memory trace. Times are returned encoded as a currency value (VT_CY) within a
variant; see description for FirstEventTime for decoding details.
Example:
Dim UpdateTime Dim TimeString as String UpdateTime = app.Memory.M1.Out.Result.UpdateTime TimeString = DecodeTimeProperty(UpdateTime)
See FirstEventTime for the code for the function DecodeTimeProperty, which is the example of decoding UpdateTime.

Value

Applies to: Param
Description: Value of a parameter or of a statistic in the measurement system. When the scope has no result, it will show "---" in the measure table. When this is displayed, the Value property is not accessible. Error handling should be employed to catch errors that may occur. See the example below for more information.
Example:
‘ Readout all elements of the measurement parameter for P1. ‘ Use the On Error Resume Next statement to handle situations ‘ where a measurement is not available, such as attempting to ‘ readback the frequency of a DC level, or trying to read the Sdev ‘ statistic when there is only 1 measurement. The scope will show ‘ "---" when there is no result to readback.
On Error Resume Next Dim Value, Mean, Min, Max, Sdev, Num As Double Value = app.measure.p1.out.Result.Value Mean = app.measure.p1.Mean.Result.Value Min = app.measure.p1.Min.Result.Value Max = app.measure.p1.Max.Result.Value Sdev = app.measure.p1.Sdev.Result.Value Num = app.measure.p1.Num.Result.Value

ValueArray

Applies to: Param
Description: Retrieves a 1D array of values, typically used to return measurement results for mult-values parameters such as Period, Frequency, TIE@level, etc. ValueArray can also return the start time, stop time and status of each measurement taken in the sweep.
Arguments:
numSamples as Long
Default value: -1, retrieve all data
Number of samples to retreived
startIndex as Long
Default value: 0, first sample
Index of the first sample to be retreived.
valueType as integer (enumerated)
916435 RevA 2-25
Page 62
ABOUT RESULTS
Default value: 1
Accepted values:
1 Readback parameter values 2 Readback start time of measurement 4 Readback stop time of measurement
8
Example:
‘ Readout all elements of the measurement parameter for P1. ‘ Use the On Error Resume Next statement to handle situations ‘ where no measurements were not taken. On Error Resume Next ‘ The scope will show‘ "---" when there is no result to readback
Const ROWOFFSET = 16 Const COLOFFSET = 2 Dim numValues As Long Dim startIndex As Long Dim valueType As Integer Dim valArray
numValues = Cells(9, 5) startIndex = Cells(10, 5)
'Get measurement values valArray = app.measure.p1.out.Result.ValueArray(numValues, startIndex, 1) 'Get measurement start times startTimes = app.measure.p1.out.Result.ValueArray(numValues, startIndex, 2) 'Get measurement stop times stopTimes = app.measure.p1.out.Result.ValueArray(numValues, startIndex, 4) 'Get measurement status values (typically edge polarity) statusVals = app.measure.p1.out.Result.ValueArray(numValues, startIndex, 8)
Dim Value, Mean, Min, Max, Sdev, Num As Double For i = 0 To UBound(valArray) Cells(i + ROWOFFSET, COLOFFSET) = i Cells(i + ROWOFFSET, COLOFFSET + 1) = valArray(i) Cells(i + ROWOFFSET, COLOFFSET + 2) = startTimes(i) Cells(i + ROWOFFSET, COLOFFSET + 3) = stopTimes(i) Cells(i + ROWOFFSET, COLOFFSET + 4) = statusVals(i) Next
Readback status value. Use this to determine if edge measurements are of positive or negative polarity

VerticalFrameStart

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Vertical coordinate of the bottom edge of the graticule containing the trace.
Example:
Dim YFrameStart As Double YFrameStart = app.Acquisition.C1.Out.Result.VerticalFrameStart
2-26 916435 RevA
Page 63
CHAPTER TWO Overview

VerticalFrameStop

Applies to: Digital, Histogram, Persist, Waveform, XY
Description: Vertical coordinate of the top edge of the graticule containing the trace.
Example:
Dim YFrameStop As Double YFrameStop = app.Acquisition.C1.Out.Result.VerticalFrameStop

VerticalMaxPossible

Applies to: Waveform
Description: Returns the maximum voltage that can be returned.
Example:
Dim VerticalMaxPossible As Double VerticalMaxPossible = app.Acquisition.C1.Out.Result.VerticalMaxPossible

VerticalMinPossible

Applies to: Waveform
Description: Returns the minimum voltage that can be returned.
Example:
Dim VerticalMinPossible As Double VerticalMinPossible = app.Acquisition.C1.Out.Result.VerticalMinPossible

VerticalOffset

Applies to: Persist, Waveform
Description:
Potential difference between ground and the center of the screen. With VerticalOffset = +50 mV, the center of
the screen represents -50 mV: with an offset of -21mV, the center represents +21 mV. (I.e. centerline voltage +
VerticalOffset = 0) Example:
Dim VerticalOffset As Double VerticalOffset = app.Acquisition.C1.Out.Result.VerticalOffset

VerticalPerRow

Applies to: Persist
Description: Returns the increment of the vertical coordinate between rows (typically in volts). Use
VerticalPerRow to determine the voltage information for each row of the DataArray. Example:
Dim VerticalPerRow As Double VerticalPerRow = app.SDA.Eye.Out.Result.VerticalPerRow
916435 RevA 2-27
Page 64
ABOUT RESULTS

VerticalPerStep

Applies to: Waveform
Description: Smallest step size in the numerical values that can be read out from the DataArray, which utilzed 16 bit signed integer values. Note that the vertical range is almost exactly 65536 * VerticalPerStep. (See
VerticalMaxPossible and VerticalMinPossible.) Example:
Dim VerticalPerStep as Double VerticalPerStep = app.Acquisition.C1.Out.Result.VerticalPerStep

VerticalResolution

Applies to: Param, Waveform
Description: Vertical resolution of the Y coordinate, which is the actual smallest difference that can be practically resolved. Using averaging can improve the resolution by the square root of the number of sweeps in the average.
For example, if 16 averages are set via pre-processor averaging or by using the Average math function, the
resolution is improved by a factor of 4. For 100 sweeps it improves by a factor of 10.
Example:
Dim VerticalResolution as Double VerticalResolution = app.Acquisition.C1.Out.Result.VerticalResolution

VerticalUnits

Applies to: Histogram, Param, Persist, Waveform
Description: Units used for the vertical axis. Typically V for volts, but other units are possible, such as "A" for amps when using a current probe. When selecting to change units when using the Rescale math function, a variety of other chooses for units are available.
Example:
Dim VerticalUnits as String VerticalUnits = app.Acquisition.C1.Out.Result.VerticalUnits

XFrameStart

Applies to: XY
Description: Coordinate of the left edge of the XY graticule.
Example:
Dim XFrameStart As Double XFrameStart = app.Math.XY.Out.Result.XFrameStart

XFrameStop

Applies to: XY
Description: Coordinate of the right edge of the XY graticule.
Example:
Dim XFrameStop As Double XFrameStop = app.Math.XY.Out.Result.XFrameStop
2-28 916435 RevA
Page 65
CHAPTER TWO Overview

XMaxPossible

Applies to: XY
Description: Maximum possible value of the X coordinate
Example:
Dim XMaxPossible As Double XMaxPossible = app.Math.XY.Out.Result.XMaxPossible

XMinPossible

Applies to: XY
Description: Minimum possible value of the X coordinate
Example:
Dim XMinPossible As Double XMinPossible = app.Math.XY.Out.Result.XMinPossible

XOffset

Applies to: XY
Description: Potential difference between ground and the horizontal center of the XY grid. For example, with
VerticalOffset of the X coordinate’s source trace = +50 mV, the center of the screen represents -50 mV: with an offset of -21mV, the center represents +21 mV. (I.e. centerline voltage + VerticalOffset = 0)
Example:
Dim XOffset As Double XOffset = app.Math.XY.Out.Result.XOffset

XPerStep

Applies to: XY
Description: Smallest step size in the numerical values that can be read out from the DataArray utilzing 16 bit signed integer values. Note that the X range is just about 65536 * XPerStep. (See XMaxPossible and
XMinPossible.) Example:
Dim XPerStep As Double XPerStep = app.Math.XY.Out.Result.XPerStep

XResolution

Applies to: XY
Description: Vertical resolution of the X coordinate, which is the actual smallest difference that can be practically resolved. Using averaging can improve the resolution by the square root of the number of sweeps in the average.
For example, if 16 averages are set via pre-processor averaging or by using the Average math function, the
resolution is improved by a factor of 4. For 100 sweeps it improves by a factor of 10.
Example:
Dim XResolution As Double XResolution = app.Math.XY.Out.Result.XResolution
916435 RevA 2-29
Page 66
ABOUT RESULTS

XUnits

Applies to: XY
Description: Units of the X coordinate. Typically V for Volts, unless a current probe is in use or if the Rescale function is being used to change the trace’s units.
Example:
Dim XUnits As String XUnits = app.Math.XY.Out.Result.XUnits

YFrameStart

Applies to: XY
Description: Coordinate of the bottom edge of the XY graticule.
Example:
Dim YFrameStart As Double YFrameStart = app.Math.XY.Out.Result.YFrameStart

YFrameStop

Applies to: XY
Description: Coordinate of the top edge of the XY graticule.
Example:
Dim YFrameStart As Double YFrameStart = app.Math.XY.Out.Result.YFrameStart

YMaxPossible

Applies to: XY
Description: Minimum possible value of the Y coordinate.
Example:
Dim YMaxPossible As Double YMaxPossible = app.Math.XY.Out.Result.YMaxPossible

YMinPossible

Applies to: XY
Description: Minimum possible value of the Y coordinate.
Example:
Dim YMinPossible As Double YMinPossible = app.Math.XY.Out.Result.YMinPossible

YOffset

Applies to: XY
Description: Potential difference between ground and the vertical center of the XY grid. For example, with
VerticalOffset of the Y coordinate’s source trace = +50 mV, the center of the screen represents -50 mV: with an offset of -21mV, the center represents +21 mV. (I.e. centerline voltage + VerticalOffset = 0)
Example:
Dim YOffset As Double YOffset = app.Math.XY.Out.Result.YOffset
2-30 916435 RevA
Page 67
CHAPTER TWO Overview

YPerStep

Applies to: XY
Description: Smallest step size in the numerical values that can be read out from the DataArray utilzing 16 bit signed integer values. Note that the Y range is just about 65536 * YPerStep. (See YMaxPossible and
YMinPossible.) Example:
Dim YPerStep As Double YPerStep = app.Math.XY.Out.Result.YPerStep

YResolution

Applies to: XY
Description: Vertical resolution of the Y coordinate, which is the actual smallest difference that can be practically resolved. Using averaging can improve the resolution by the square root of the number of sweeps in the average.
For example, if 16 averages are set via pre-processor averaging or by using the Average math function, the
resolution is improved by a factor of 4. For 100 sweeps it improves by a factor of 10.
Example:
Dim YResolution As Double YResolution = app.Math.XY.Out.Result.YResolution

YUnits

Applies to: XY
Description: Units of the Y coordinate. Typically V for Volts, unless a current probe is in use or if the Rescale function is being used to change the trace’s units.
Example:
Dim YUnits As String YUnits = app.Math.XY.Out.Result.YUnits
916435 RevA 2-31
Page 68
Chapter Three
Control Reference
LECROY.XSTREAMDSO.1
app
This is the root of the automation hierarchy, all other nodes are accessed from this point.
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Popup a dialog containing the instrument model MsgBox "Model is: " & app.InstrumentModel
Example
Queries the model number of the instrument.
InstrumentModel
Any number of characters
String
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Present the model number of the instrument. MsgBox app.InstrumentModel
Range
Example
Description
AutoSetup
Action
ClearSweeps
Action
Exit
Action
FirmwareVersion
String
Height
Property
HideClock
Bool
InstrumentID
String
InstrumentModel
String
Left
Property
Maximize
Action
Minimize
Action
OperationMode
Enum
Quit()
Method
ResetPreferences
Action
Restore
Action
SetToDefaultSetup
Action
Shutdown
Action
Sleep([in] double timeoutMilliseconds)
Method
Top
Property
TouchScreenEnable
Bool
WaitUntilIdle([in] double timeoutSeconds)
Method
Width
Property
Windowed
Action
WindowState
Property
916435 RevA
3-1
Page 69
Chapter Three
Control Reference
Reads the complete ID of the instrument in the format: "LECROY,WM8500,WM000001,0.0.0", which includes the maker, the instrument model number, the serial number, and the version number.
InstrumentID
Any number of characters
String
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Present the ID of the instrument. MsgBox app.InstrumentID
Range
Example
Description
Queries the firmware version of the instrument in the form - "1.0.0 (build 12345)"
FirmwareVersion
Any number of characters
String
' Microsoft Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Query the firmware version number of the instrument. MsgBox "Firmware Version is: " + app.FirmwareVersion
Range
Example
Description
Shuts down the instrument. It will prompt the user with an 'Are you sure?' dialog before shutting down. Note that until the user responds to the dialog, control via Automation will be blocked.
Shutdown
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Shut down the instrument with a confirmation prompt. app.Shutdown
Example
Description
Equivalent to app.Quit() method.
Exit
Action
Description
3-2
916435 RevA
Page 70
Chapter Three
Control Reference
Maximize the instrument window to fill the underlying desktop. Equivalent to app.WindowState = 1
Maximize
Action
Description
Minimizes the instrument window to reveal the underlying desktop. It will display a small window in the bottom right corner of the display, which when clicked will restore the window to full-screen mode. To programmatically restore the window refer to the app.WindowState control.
Minimize
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Minimize the instrument display. app.Minimize
Example
Description
Places the instrument application in windowed mode (as opposed to full-screen mode). Places the application in the upper-part of the display screen with a sizable border.
Windowed
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the instrument display into the windowed mode. app.Windowed
Example
Description
Restore the instrument display to its position and size before the last minimize request.
Restore
Action
Description
916435 RevA
3-3
Page 71
Chapter Three
Control Reference
Restores the instrument setup to its default state. Note that certain settings will not be restored to the default state. These are the user preferences, such as the current remote communications port, and the color settings, which may be reset, if required, using the ResetPreferences action.
SetToDefaultSetup
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Restore the instrument to its default state. app.SetToDefaultSetup
Example
Description
Starts an AutoSetup operation. When input channels are visible, AutoSetup operates only on those visible channels. If no channels are visible, all channels are affected by AutoSetup. With more than one channel visible, the first visible channel in numerical order, that has a detectable signal applied to it, is automatically set up for edge triggering.
AutoSetup
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Start an Auto-Setup process. app.AutoSetup
Example
Description
Clears all accumulated sweeps for all subsystems. These include Channel Pre-Processing, Math, Measure, and Display Persistence. Note that subsystem-specific clear sweeps controls are also available. For the details please refer to the ClearSweeps control for each subsystem.
ClearSweeps
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Clear all accumulated sweeps for all subsystems. app.ClearSweeps
Example
Description
3-4
916435 RevA
Page 72
Chapter Three
Control Reference
Hides/Shows the clock that resides in the lower-right corner of the display of the instrument.
HideClock
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Hide the clock for 3 seconds. app.HideClock = True app.Sleep(3000) app.HideClock = False
Example
Description
Sets/Queries the state of the touch-screen enable control. This is equivalent to the front-panel Touch Screen button.
TouchScreenEnable
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Disable touch-screen if it is enabled. if app.TouchScreenEnable = True then app.TouchScreenEnable = False End if
Example
Description
Resets all scope preferences to their default states. The set includes the current remote communications port, the color palette settings, etc. but does not include the main DSO controls such as V/Div, T/Div, etc. These main instrument controls can be reset using the SetToDefaultSetup control.
ResetPreferences
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Reset all instrument preferences. app.ResetPreferences
Example
Description
916435 RevA
3-5
Page 73
Chapter Three
Control Reference
Sets the operating mode of the WaveExpert. Each mode affects the horizontal and vertical menus, as well as the display mode, as appropriate for the selected mode of operation. Not present on other scope families.
OperationMode
Enum
Description
Values
Eye
Eye Diagram mode. Sets sequential timebase, and infinite persistence.
Scope
Traditional 'Scope' mode.
TDR
Time Domain Reflectometry (TDR) mode.
Closes the instrument application. The instrument will prompt the user with an 'Are you sure?' dialog before closing down. Note that until the user responds to the dialog, control via Automation will be blocked.
Quit()
Method
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Quit the instrument application with a confirmation prompt. app.Quit
Example
Description
Sets/Queries the state of the PC window used by the instrument display. 0 windowed 1 full screen 2 minimized Trying to set values greater than 2 or less than 0 will result in the value 0 (windowed) being set.
WindowState
Property
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the instrument window state to windowed. app.WindowState = 0
Example
Description
3-6
916435 RevA
Page 74
Chapter Three
Control Reference
Sets/Queries the width in pixels of the instrument display on the PC screen.
Width
Property
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the width of the instrument window to 800 pixels. app.Width = 800
Example
Description
Sets/Queries the height in pixels of the instrument display on the PC screen.
Height
Property
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the height of the instrument window to 400 pixels. app.Height = 400
Example
Description
Sets/Queries the position in pixels of the top edge of the instrument display on the PC screen. The position is measured downwards from the top of the screen to the top of the instrument window.
Top
Property
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the position of the top edge of the instrument window to 100 pixels. app.Top = 100
Example
Description
Sets/Queries the position in pixels of the left edge of the instrument display on the PC screen. The position is measured from the left edge of the screen to the left edge of the instrument window.
Left
Property
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO") ' Set the position of the left edge of the instrument window to 100 pixels. app.Left = 100
Example
Description
916435 RevA
3-7
Page 75
Chapter Three
Control Reference
Waits until either the application is idle or the specified timeout expires, specified in seconds. This evaluates to True if the application completes before the timeout expires, and to False if a timeout occurs. When Trigger mode is Auto or Run, the application is never Idle. In this case the call to WaitUntilIdle returns after the next acquisition and any configured processing.
WaitUntilIdle([in] double timeoutSeconds)
Method
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Wait with a timeout of five seconds. app.WaitUntilIdle(5)
Example
Description
Causes the main execution thread of the instrument application to sleep for the specified time period, defined in milliseconds.
Sleep([in] double timeoutMilliseconds)
Method
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
MsgBox "Sleeping for 10 seconds..." app.Sleep(10000) MsgBox "Sleep finished"
Example
Description
ACQUISITION
app.Acquisition
This group of variables controls the input channels C1, C2, C3 and C4, the timebase, the trigger, and the Aux Output. Names of the form app.Acquisition.Channels.xxxx are aliases of simpler names which are described in this section of
the manual. Examples of alias pairs are as follows - app.Acquisition.Channels("Cx") is equivalent to app.Acquisition.Cx app.Acquisition.Channels(1) is equivalent to app.Acquisition.C1 app.Acquisition.Channels("Cx").Out.Result is equivalent to app.Acquisition.Cx.Out.Result
Sets/Queries the trigger mode, using values from the following list ­Auto, Norm, Normal, Single, Stopped.
TriggerMode
Enum
Description
Acquire([in] double timeoutSeconds, [in] long bForceTriggerOnTimeout)
Method
Calibrate
Action
CalNeeded
Integer
ClearSweeps
Action
HorOffset
Double
TriggerMode
Enum
3-8
916435 RevA
Page 76
Chapter Three
Control Reference
Auto: After a timeout, if a real hardware trigger is not received, then force a trigger so there are automatically lots of updates.
Normal: Accepts triggers as rapidly as the system permits, but likewise will wait "forever" for a trigger, without updating anything.
Single: Arm the acquisition system to acquire once, and do not rearm automatically after. Once a trigger is received and the data processed, the instrument finishes in the "Stopped" state.
Stop: Finishes the current acquisition and does not re-arm.
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Place the instrument in stopped mode and take one acquisition. app.Acquisition.TriggerMode = "Stopped" app.Acquisition.Acquire(5)
Example
Values
Auto
Auto-trigger
Normal
Normal Trigger
Single
Single Trigger
Stopped
No trigger possible, Stopped
same as "app.Acquisition.Horizontal.HorOffset.cvar"
HorOffset
From -2.72e-008 to -1.72e-008 step 2e-011
Double
Range
Description
Initiates a full calibration of the acquisition system of the instrument.
Calibrate
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Start a calibration. app.Acquisition.Calibrate
Example
Description
916435 RevA
3-9
Page 77
Chapter Three
Control Reference
Query: Indicates whether calibration is required or not. Based on hexadecimal bit value, it provides following information:
0x00000001: Front end calibration is required 0x00000002: Digitizers delay matching is required 0x00000004: Digitizers gain matching is required 0x00000008: Trigger level calibration is required 0xFFFFFFFF(-1): All of above calibrations are required
CalNeeded
From -2147483648 to 2147483647 step 1
Integer
Range
Description
Resets any accumulated average data or persistence data for channel waveforms (C1..C4). Valid only when one or more channels have waveform averaging or persistence enabled in their pre-processing settings. Note that an average may be reset on an individual basis using app.Acquisition.Cx.ClearSweeps control.
ClearSweeps
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Clear accumulated sweeps for channels C1...C4 app.Acquisition.ClearSweeps
' Clear accumulated sweeps for only C1 app.Acquisition.C1.ClearSweeps
Example
Description
Action/Query. Takes a single acquisition. The first of the two arguments specifies a timeout; the second, which is optional, specifies whether or not to force a trigger when the timeout occurs. Evaluates to True if a trigger occurred, or False if a timeout occurred.
Acquire([in] double timeoutSeconds, [in] long bForceTriggerOnTimeout)
Method
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO") ' Start an acquisition, wait for up to 5 seconds for a trigger ' event, force a software trigger if a hardware trigger is not ' detected before the 5 second timeout expires. triggerDetected = app.Acquisition.Acquire(5, true)
Example
Description
CHANNELS
app.Acquisition.Channels
This group of variables controls the acquisition channels C1, C2, C3 and C4. Names of the form app.Acquisition.Channels.xxxx are aliases of simpler names which are described in the section of the
3-10
916435 RevA
Page 78
Chapter Three
Control Reference
manual which is devoted to app.Acquisition. Examples of alias pairs are as follows ­ app.Acquisition.Channels("Cx") is equivalent to app.Acquisition.Cx app.Acquisition.Channels(1) is equivalent to app.Acquisition.C1 app.Acquisition.Channels("Cx").Out.Result is equivalent to app.Acquisition.Cx.Out.Result
Set app = CreateObject("LeCroy.XStreamDSO")
For X = 1 To 4 app.Acquisition.Channels(X).VerScale = 0.2 Next
Example
CX
app.Acquisition.Cx
This group of variables controls the input channels C1, C2, C3 and C4. Names of the form app.Acquisition.Channels.xxxx are aliases of simpler names which are described in the section of the
manual which is devoted to app.Acquisition. Examples of alias pairs are as follows ­ app.Acquisition.Channels("Cx") is equivalent to app.Acquisition.Cx app.Acquisition.Channels("Cx").Out.Result is equivalent to app.Acquisition.Cx.Out.Result
AverageSweeps
Integer
CalibrateScope
Action
ClearSweeps
Action
DarkCalLevel
Double
Deskew
Double
FindScale
Action
InterpolateType
Enum
Invert
Bool
LabelsPosition
String
LabelsText
String
MaskOn
Bool
Persisted
Bool
PersistenceSaturation
Integer
PersistenceTime
Enum
PodModel
String
PodType
Enum
ProbeAttenuation
Double
ProbeName
String
ShowLastTrace
Bool
TDREdgeTime
Double
TDRMeasurementType
Enum
TDROn
Bool
TDRPolarity
Enum
TDRZ0
Double
UseGrid
String
VerOffset
Double
VerScale
DoubleLockstep
VerScaleVariable
Bool
916435 RevA
3-11
Page 79
Chapter Three
Control Reference
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Setup Channel C1 app.Acquisition.C1.VerScale = 0.5 app.Acquisition.C1.VerOffset = 0.0 app.Acquisition.C1.Coupling = "DC50"
' Setup Channel C2 app.Acquisition.C2.VerScale = 0.1
Example
Sets/Queries the channel's 'Viewed' state. When True the channel waveform is displayed on one of the display graticules. Note that even when a channel is not visible it may be used as a source for Math, Measure, etc.
View
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Make channel C3 visible. app.Acquisition.C3.View = True
Example
Description
Clears all accumulated average data and persistence data for this channel. See app.Acquisition.ClearSweeps for a control that clears accumulated data for channels 1..4, or app.ClearSweeps for a control that clears accumulated data for all subsystems (including Math/Measure/Display, etc.)
ClearSweeps
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Reset channel C1 app.Acquisition.C1.ClearSweeps
' Reset channels C1..C4 app.Acquisition.ClearSweeps
Example
Description
View
Bool
ViewLabels
Bool
XTolerance
Integer
YTolerance
Integer
3-12
916435 RevA
Page 80
Chapter Three
Control Reference
Sets/Queries the graticule on which the trace is displayed. Typical values include: YT1..YT8: one of the YT graticules used in Single, Dual, Quad, and Octal display modes. NotOnGrid: not displayed on any graticule.
UseGrid
Any number of characters
String
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Switch to dual grid mode, place C1 on the lower graticule ' and C2 on the upper graticule. app.Display.GridMode = "Dual" app.Acquisition.C1.UseGrid = "YT2" app.Acquisition.C2.UseGrid = "YT1"
Range
Example
Description
Sets/Queries the persisted state of the waveform. If the Display.LockPersistence control is set to 'AllLocked' then the persisted state of all displayed waveforms will be the same. If the Display.LockPersistence control is set to 'PerTrace' then the persisted state of each waveform may be independently controlled.
Persisted
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set persistence on for trace C1 app.Display.LockPersistence = "PerTrace" app.Acquisition.C1.Persisted = True
Example
Description
Sets/Queries the saturation threshold for persisted waveforms. All information at this level or above will be recorded with the same color or intensity. See the general description above for a discussion of the locked and unlocked persistence modes.
PersistenceSaturation
From 0 to 100 step 1
Integer
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the persistence saturation level for trace C1. app.Acquisition.C1.PersistenceSaturation = 60
Range
Example
Description
916435 RevA
3-13
Page 81
Chapter Three
Control Reference
Sets/Queries the state of the Show Last Trace control. If True then when this trace is displayed in persistence mode the last acquired waveform will be superimposed on the accumulating persistence map. See the general description above for a discussion of the locked and unlocked persistence modes.
ShowLastTrace
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Makes the last acquired trace invisible for the ' persistence trace of channel C1. app.Acquisition.C1.ShowLastTrace = False
Example
Description
Sets/Queries the state of the Persistence Time control. Controls the persistence decay time for this trace. See the general description above for a discussion of the locked and unlocked persistence modes.
PersistenceTime
Enum
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the persistence time for the persistence trace of channel C1 to 10 seconds. app.Acquisition.C1.PersistenceTime = "10s"
Example
Description
Values
0.5s
10s
1s
20s
2s
5s
Infinite
LabelsText
Any number of characters
String
Range
3-14
916435 RevA
Page 82
Chapter Three
Control Reference
Sets / Queries the horizontal position of the label attached to the acquisition trace Cx. The unit of measurement is the unit of the horizontal scale. The measurement is made from the trigger point. Note that this control is a string, not a numeric value. This allows multiple labels to be positioned, as shown in the example below.
LabelsPosition
Any number of characters
String
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Add a couple of labels to trace C1, one at 0ns, and one at 55ns app.SetToDefaultSetup app.Acquisition.C1.ViewLabels = True app.Acquisition.C1.LabelsPosition = "0.0,55e-9" app.Acquisition.C1.LabelsText = "Hello,World"
Range
Example
Description
Sets/Queries whether the user-defined labels for the trace are visible. See Also: LabelsPosition and LabelsText controls.
ViewLabels
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Show the user-defined label for trace C2. app.Acquisition.C2.ViewLabels = True
Example
Description
Starts FindScale operation for this chanel. This operation will adjust channel's v/div and offset control such that the signal is visible on the screen with in +/- 3 div.
FindScale
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
'Find vertical scale of channel 1 app.Acquisition.C1.FindScale
Example
Description
916435 RevA
3-15
Page 83
Chapter Three
Control Reference
Sets/Queries the probe attenuation. The probe attenuation is the factor by which the signal is made
smaller, for example, 10 means that the probe divides by 10, and is referred to as a ÷10 probe. Note
that certain passive probes may be marked as 'x10', even though they actually divide the input signal by a factor of 10.
ProbeAttenuation
From 1e-006 to 10000 step 1e-006
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the probe attenuation for channel C1 to 100 app.Acquisition.C1.ProbeAttenuation = 100
Range
Example
Description
Queries the name of connected probe.
ProbeName
Any number of characters
String
Range
Description
Sets/Queries the vertical scale (in Volts/Division) of an input channel. When variable gain (VerScaleVariable control) is disabled, the control will clip values to a 1..2..5 sequence. When variable gain is enabled, the setting resolution lies in the range 1% to 2%, depending upon the numerical value.
VerScale
From 0.001 to 1 step 0.0005, locked to 1 2 5, fine grain allowed=true, on=false
DoubleLockstep
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set C1 to a scale of 250mV/Div in Variable Scale mode app.Acquisition.C1.VerScaleVariable = True app.Acquisition.C1.VerScale = 0.25
Range
Example
Description
3-16
916435 RevA
Page 84
Chapter Three
Control Reference
Sets/Queries the state of the variable vertical scale control for channel Cx. When the variable scale is enabled, the setting resolution lies in the range 1% to 2%, depending on the numerical value. If a knowledge of the exact value is important, the value should be read back after a setting has been made.
VerScaleVariable
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the variable vertical scale for C1 to On. app.Acquisition.C1.VerScaleVariable = True
Example
Description
Sets/Queries the vertical offset of input channel Cx. The setting resolution in volts lies in the range
0.25% to 0.5%, depending on the numerical value. Note that the available offset range is dependent upon the current V/Div setting, and also the instrument model.
VerOffset
From -1 to 1 step 0.001
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the vertical offset for C1 to 10 mV. app.Acquisition.C1.VerOffset = 0.01
Range
Example
Description
Sets/Queries the number of averaging sweeps for input channel Cx. This is distinct from the math function app.Math.Fx. If the number of sweeps is 1 (the default value), the data will not be averaged.
AverageSweeps
From 1 to 1000000 step 1
Integer
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the number of sweeps for channel C1 to 25. app.Acquisition.C1.AverageSweeps = 25
Range
Example
Description
916435 RevA
3-17
Page 85
Chapter Three
Control Reference
Sets/Queries the type of interpolation used for input channel Cx. Note that Sinx/x interpolation increases the size of the trace by a factor of 10, beware when using this option with long records.
InterpolateType
Enum
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the interpolation for channel C3 to (sin x)/x app.Acquisition.C3.InterpolateType = "Sinxx"
Example
Description
Values
Linear
Linear interpolation
Sinxx
Sinx/x interpolation
Sets/Queries whether input channel Cx is inverted.
Invert
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set channel C2 to be inverted. app.Acquisition.C2.Invert = True
Example
Description
Sets/Queries the deskew of input channel Cx to produce a required alignment with another trace.
Deskew
From -9e-009 to 9e-009 step 1e-012
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
Range
Example
Description
Set/Query the Dark Cal Level, the residual power measured by the optical head with no input applied (dark input). Used only by the extinction ratio measurement. Units are Micro-Watts (uW)
DarkCalLevel
From -1 to 1 step 1e-007
Double
Range
Description
3-18
916435 RevA
Page 86
Chapter Three
Control Reference
This control will initiate DC Calibration of modules. Disconnect the inputs from all plugged in Modules before starting calibration process.
CalibrateScope
Action
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Start calibration of modules app.Acquisition.C1.CalibrateScope
Example
Description
This control is applicable in TDR operating mode only. This control turns ON or OFF TDR pulse for given channel.
TDROn
Bool
Description
This control is applicable in TDR operating mode only. This variable controls polarity of TDR pulse.
TDRPolarity
Enum
Description
Values
Neg
Negative Pulse
Pos
Positive Pulse
This control is used for reducing edge time of TDR pulse. The reduced edge time is achieved by using software low pass Filter. Note: The default TDR edge time is 20 pS.
TDREdgeTime
From 2e-011 to 2e-010 step 1e-012
Double
Range
Description
916435 RevA
3-19
Page 87
Chapter Three
Control Reference
This control is applicable in TDR operating mode only. It defines unit of TDR signal.
TDRMeasurementType
Enum
Description
Values
Ohm
Percent
Reactance
Volt
Characteristic Impedance for TDR medium
TDRZ0
From 0 to 1000 step 0.1
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the characteristic impedance C1 to 50 ohms. app.Acquisition.C1.TDRZ0 = "50"
Range
Example
Description
In Eye mode operation, this control turns on and off mask for given channel.
MaskOn
Bool
Description
In Eye mode operation, this variable controls X-axis(horizontal) tolerance during Mask testing
XTolerance
From 0 to 100 step 1
Integer
Range
Description
In Eye mode operation, this variable controls Y-axis(vertical) tolerance during Mask testing
YTolerance
From 0 to 100 step 1
Integer
Range
Description
3-20
916435 RevA
Page 88
Chapter Three
Control Reference
This control reflects the model number of the Module.
PodModel
Any number of characters
String
Range
Description
This control reflects the type of the Module.
PodType
Enum
Description
Values
Electrical
The module has an electrical signal input
ElectricalTDR
The module has TDR capabilities
None
Optical
The module has an optical signal input
RESULT
app.Acquisition.Cx.Out.Result
Properties of the type xxxx.Out.Result.yyyy are those of the last completed acquisition. They are not affected if other controls are changed after that acquisition was completed. This distinction between "Out.Result" properties and other controls is most important when the trigger mode is Single or Stopped. You should treat "Out.Result" properties as read­only.
Several of these properties mention the 'frame', this is the term used to describe the visible portion of the trace, which is generally smaller than the acquired waveform. The frame could be used for example to display a 500pt. window onto a 1Mpt. Trace, or vertically it could be used to show the 'center' 10mV of a 100mV pk trace.
For a full overview of the properties of waveform (or other ) results, please see Chapter 1.
HORIZONTAL
app.Acquisition.Horizontal
This group of variables controls the timebase, the sampling, and the trigger delay.
AcquisitionDuration
Double
CISStrobeFreq
Double
FindBitRate
Action
FPGAStatus
Register
HorOffset
Double
HorScale
DoubleLockstep
HorScaleVariable
Bool
HorUnits
String
MaxSamples
DoubleLockstep
NumPoints
Integer
916435 RevA
3-21
Page 89
Chapter Three
Control Reference
Sets/Queries the horizontal scale in time per division.
HorScale
From 1e-012 to 0.001 step 1e-011, locked to 1 2 5, fine grain allowed=true, on=false
DoubleLockstep
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal acquisition scale to 200 ns/div. app.Acquisition.Horizontal.HorScale = 2.0e-7
Range
Example
Description
Sets/Queries the horizontal position of the trigger time, relative to the origin set by HorOffsetOrigin, in seconds. Positive to the right, negative to the left. The setting resolution is about 1% to 2&.
HorOffset
From -1.00122e-005 to -1.22e-008 step 2e-011
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal trigger offset to 200 ns. app.Acquisition.Horizontal.HorOffset = 2.0e-7
Range
Example
Description
Queries the units in which the horizontal scale is measured.
HorUnits
Any number of characters
String
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the units of the horizontal scale. HorizUnit = app.Acquisition.Horizontal.HorUnits
Range
Example
Description
OperationMode
Enum
SampleMode
Enum
SamplingRate
Double
SignalBitRate
Double
SignalStandardUI
Enum
TimePerPoint
Double
Units
Enum
3-22
916435 RevA
Page 90
Chapter Three
Control Reference
Queries the number of samples in the current setting of the acquisition memory. For sequence mode, this refers to the number if samples per segment, not to the number in the complete set. Use MaxSamples to limit the number of samples acquired.
NumPoints
From 2 to 512000000 step 1
Integer
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the number of points being used in the acquisition memory. NumberOfPoints = app.Acquisition.Horizontal.NumPoints MsgBox NumberOfPoints
Range
Example
Description
Queries the time interval between successive samples in the acquisition.
TimePerPoint
From 5e-015 to 1e+012 step 1e-013
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the time per point of the acquisition. timePerPt = app.Acquisition.Horizontal.TimePerPoint MsgBox timePerPt
Range
Example
Description
Sets/Queries the mode of acquisition as real-time or sequence or random interleaved sampling. Note that RIS mode and sequence mode are not available over the entire range of time-bases, and are not available simultaneously. WaveExpert differences: CIS and SEQ are the only timebase modes.
SampleMode
Enum
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the mode of acquisition to random interleaved sampling. app.Acquisition.Horizontal.SampleMode = "RIS" ' WaveExpert example app.Acquisition.Horizontal.SampleMode = "CIS"
Example
Description
Values
SEQ
916435 RevA
3-23
Page 91
Chapter Three
Control Reference
Queries the duration of the last completed acquisition. The result may depend on the spacing of the triggers in sequence mode, and it may depend on the number of averages when a channel is in averaging mode.
AcquisitionDuration
From 1e-012 to 1e+012 step 1e-015
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the duration of the last completed acquistion. AcqDuration = app.Acquisition.Horizontal.AcquisitionDuration MsgBox AcqDuration
Range
Example
Description
Sets/Queries the maximum permissible number of samples to be used in the acquisition memories. At the faster sample rates, the actual number used may be less than this maximum.
MaxSamples
From 500 to 16000 step 10, locked to 1 2.5 5, fine grain allowed=true, on=false
DoubleLockstep
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the available memory length per channel to 500 app.Acquisition.Horizontal.MaxSamples = 500
Range
Example
Description
Queries the sampling rate. This is the effective sampling rate of the traces, rather than the sample rate of the ADCs.
SamplingRate
From 500 to 1e+013 step (2 digits)
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Inspect the effective sampling rate of the signal. SamplingRate = app.Acquisition.Horizontal.SamplingRate
Range
Example
Description
Sets/Queries time base variable step On/Off
HorScaleVariable
Bool
Description
3-24
916435 RevA
Page 92
Chapter Three
Control Reference
Sets/Queries the operation mode. In Sampling scopes, the scope can be configured for Scope, Eye or TDR modes of operation.
OperationMode
Enum
Description
Values
Eye
Eye mode will continuously accumulate data for persistence type of display
Scope
Scope mode will run like a real time scope.
TDR
TDR mode should be used for TDR based measurements
This control is applicable in Eye mode of operation only. It controls the timebase units of the output waveform.
1) When selected as Time, the horizontal unit will be in seconds
2) When selected as Bits, the horizontal unit will be in Uis. In this configuration, the unit interval of the output will be calculated using value of SignalBitrate control.
Units
Enum
Description
Values
Time
Horizontal unit in seconds
916435 RevA
3-25
Page 93
Chapter Three
Control Reference
This control selects signal standard. The value of signal bit rate will be updated on selection of new standard.
SignalStandardUI
Enum
Description
Values
1000BaseCX
1000BaseLX
1000BaseSX
10G10.4
10G9.9
10GBASELX4
10GbEFEC
10GFCX4
10XFC
10XFCFEC
DVI
FBDIMM3.2Gbs
FBDIMM4.0Gbs
FBDIMM4.8Gbs
FC1063
FC133
FC2125
FC266
FC4250
FC531
FEC10.664
FEC10.709
FEC12.5
FSB533Mhz
FSB667Mhz
FSB800Mhz
IEEE1394b
Infini2.5Gbs
InfiniBand
OC1
OC12
OC192
OC3
OC48
OC768
PCIe1.0a
PCIe1.0aMobile
PCIe1.1
PCIeCompliance
3-26
916435 RevA
Page 94
Chapter Three
Control Reference
PCIeCompliance1.1
PCIeCompliance2.0
RapidIOLPSerial
RapidIOParallel
SerialATA1.0a
SerialAttachedSCSI
STM16
STM1Optical
STM4Optical
STS1Eye
STS3
USB2.0
VSR5
XAUI
Sets/Queries value of signal bit rate. When the Signal Standard is set to Custom, this controls sets the bit-rate value.
SignalBitRate
From 1000 to 5e+011 step 1000
Double
Range
Description
Starts an Find Bit-rate operation. This operation operates only on the first visible channel. If no channels are visible, it operates on the first channel with sampling module.
FindBitRate
Action
Description
Queries actual sampling rate of the CIS time base. The value reflects hardeware sampling rate.
CISStrobeFreq
From 1 to 100 step 1e-012
Double
Range
Description
This control is intended for internal use only. Do not use this control.
FPGAStatus
Register 16 bit
Register
Range
Description
916435 RevA
3-27
Page 95
Chapter Three
Control Reference
PODSCALIBRATIONWIZARD
app.Acquisition.PodsCalibrationWizard
This control initiates calibration wizards. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
PodsCalStartWizard
Action
Description
This control starts Calibration of selected modules. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
Calibrate
Action
Description
This control cancels active calibration process. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
CancelCalibration
Action
Description
This control enables/disables calibration for channel 1 Module. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
CalibratePod1
Bool
Description
Calibrate
Action
CalibratePod1
Bool
CalibratePod2
Bool
CalibratePod3
Bool
CalibratePod4
Bool
CancelCalibration
Action
PodsCalStartWizard
Action
3-28
916435 RevA
Page 96
Chapter Three
Control Reference
This control enables/disables calibration for channel 2 Module. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
CalibratePod2
Bool
Description
This control enables/disables calibration for channel 3 Module. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
CalibratePod3
Bool
Description
This control enables/disables calibration for channel 4 Module. Note: This controls is intended for On screen Wizard only. It involves operator's selections. Do not use for fully Automated system.
CalibratePod4
Bool
Description
TRIGGER
app.Acquisition.Trigger
This group of cvars controls all aspects of the trigger, except for trigger delay, which is in Acquisition.Horizontal. Names of the form app.Acquisition.Trigger.Sources.xxxx are aliases of simpler names which are described in this
section of the manual. Examples of alias pairs are as follows ­ app.Acquisition.Trigger.Sources("Cx") is equivalent to app.Acquisition.Trigger.Cx app.Acquisition.Trigger.Sources("Ext") is equivalent to app.Acquisition.Trigger.Ext app.Acquisition.Trigger.Sources("Line") is equivalent to app.Acquisition.Trigger.Line Please see under Acquisition.Channels("Cx") for a programming example.
Sets/Queries the trigger source.
Source
Enum
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the trigger source to external.
Example
Description
Source
Enum
Type
Enum
916435 RevA
3-29
Page 97
Chapter Three
Control Reference
app.Acquisition.Trigger.Source = "Ext"
Values
Prescaler
Trigger
Sets/Queries the trigger type (mode).
Type
Enum
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the trigger type to glitch. app.Acquisition.Trigger.Type = "Glitch"
Example
Description
Values
EDGE
CURSORS
app.Cursors
This set of variables controls the cursor system.
Sets/Queries visibility of the cursors.
View
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Make the cursors visible. app.Cursors.View = "On"
Example
Description
Track
Bool
Type
Enum
View
Bool
XPos1
Double
XPos2
Double
YPos1
Double
YPos2
Double
3-30
916435 RevA
Page 98
Chapter Three
Control Reference
Sets/Queries the currently selected type of cursor.
Type
Enum
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the cursor type to vertical relative. app.Cursors.View = "On" app.Cursors.Type = "VertRel"
Example
Description
Values
HorizAbs
Single cursor, position specified in time
HorizRel
Dual cursors, positions specified in time
VertAbs
Single cursor, position specified in divisions vertically
VertRel
Dual cursors, positions specified in divisions vertically
Sets/Queries the state of tracking of a pair of cursors. If tracking is enabled then when the first cursor is moved, the second will track at a constant distance from it.
Track
Bool
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set cursors tracking on. app.Cursors.Track = True
Example
Description
Sets/Queries the horizontal position of the first cursor, in the units of the horizontal variable.
XPos1
From -1.79769e+308 to 1.79769e+308 step 0
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal position of the first cursor to 50 ns. app.Cursors.XPos1 = 50e-9
Range
Example
Description
916435 RevA
3-31
Page 99
Chapter Three
Control Reference
Sets/Queries the horizontal position of the second cursor, in the units of the horizontal variable.
XPos2
From -1.79769e+308 to 1.79769e+308 step 0
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal position of the second cursor to 4.5 ms. app.Cursors.XPos2 = 4.5e-3
Range
Example
Description
Sets/Queries the vertical position of the first cursor, in graticule divisions.
YPos1
From -3.99 to 3.99 step 0.01
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the vertical position of the first cursor. app.Cursors.YPos1 = 3.4
Range
Example
Description
Sets/Queries the vertical position of the second cursor, in graticule divisions.
YPos2
From -3.99 to 3.99 step 0.01
Double
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Set the vertical position of the second cursor. app.Cursors.YPos2 = 2.1
Range
Example
Description
DISPLAY
app.Display
This set of variables controls the properties of the screen display of the instrument.
AxisLabels
Bool
Brightness
Integer
C1Color
Color
C1PrintColor
Color
C2Color
Color
C2PrintColor
Color
C3Color
Color
C3PrintColor
Color
3-32
916435 RevA
Page 100
Chapter Three
Control Reference
Sets/Queries the grid mode. The commands "Single" and "Dual", for example, set the grid mode until
GridMode
Enum
Description
C4Color
Color
C4PrintColor
Color
ClearSweeps
Action
DisplayMode
Enum
F1Color
Color
F1PrintColor
Color
F2Color
Color
F2PrintColor
Color
F3Color
Color
F3PrintColor
Color
F4Color
Color
F4PrintColor
Color
F5Color
Color
F5PrintColor
Color
F6Color
Color
F6PrintColor
Color
F7Color
Color
F7PrintColor
Color
F8Color
Color
F8PrintColor
Color
FactoryDefault
Action
GridIntensity
Integer
GridMode
Enum
GridOnTop
Bool
M1Color
Color
M1PrintColor
Color
M2Color
Color
M2PrintColor
Color
M3Color
Color
M3PrintColor
Color
M4Color
Color
M4PrintColor
Color
Persisted
Bool
Persistence3d
Bool
PersistenceLastTrace
Bool
PersistenceSaturation
Integer
PersistenceStyle
Enum
PersistenceTime
Enum
PreviewPrintColors
Action
ResetAll
Action
TraceStyle
Enum
916435 RevA
3-33
Loading...