LeCroy, ActiveDSO, ProBus, SMART Trigger, WavePro, Waverunner, and Wave Surfer are registered trademarks
of LeCroy Corporation. JitterTrack, WaveMaster, and X-Stream are trademarks of LeCroy Corporation.
Information in this publication supersedes all earlier versions. Specifications subject to change without notice.
901783
T ABLE OF C ONTENTS
CHAPT ER 1: ABOUT AUTOMATION
OVERVIEW OF AUTOMATION............................................................................................1-3
Control from External Applications ............................................................................................... 1-12
From Visual Basic.............................................................................................................................................................1-13
From MATLAB.................................................................................................................................................................1-13
From MS Office (Excel)..................................................................................................................................................1-14
CONTROL BY DISTRIBUTED COM (DCOM)..................................................................1-15
Security Settings on the Instrument (Server): User Level .............................................................. 1-15
Security Settings on the Instrument (Server): Share Level ............................................................. 1-15
Initialize the Controlling PC (Client) ............................................................................................. 1-15
Connecting to a Remote Instrument ............................................................................................ 1-15
CONTROL VARIABLES EXPLAINED.................................................................................1-17
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, “About Automation, ” 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.
901783 ISSUED: July 2003 ix
BLANK PAGE
xISSUED: July 2003901783
C HAPTER O NEOverview
A
B
A
A
U
A
This section presents an overview of the Automation capabilities of X-Stream DSOs along with an overview
of the technology itself.
U
T
T
O
O
B
O
O
M
M
U
U
A
A
T
T
TII
T
O
O
N
N
901783 ISSUED: July 2003 1-1
P ART O NE: ABOUTAUTOMATION
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 the X-Stream Browser to interactively control the instrument
1-2ISSUED: July 2003901783
C HAPTER O NEOverview
OVERVIEW OF AUTOMATION
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 is a Microsoft technology, formerly referred to as “OLE Automation,” that has primarily been used to
enable cross-application macro programming. It is based upon the Component Object Model (COM), which is
similar in nature to CORBA, 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.” This manual describes these Automation
objects and interfaces 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 scope 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.
901783 ISSUED: July 2003 1-3
P ART O NE: ABOUTAUTOMATION
The following table summarizes the differences between the two remote control possibilities:
Physical Transport GPIB, TCP/IP over EthernetInter-process using COM, inter-PC
Textual parsing of instrument
responses required
Compatibility with previous LeCroy
DSOs
Ability to run controlling application
“in 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 utilityYes, natively (see examples later in
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)
General Characteristics
•When an application is running locally on the instrument and reques ts 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.
1-4ISSUED: July 2003901783
C HAPTER O NE: Overview
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, then click on
the C1 folder. Find the VerScale (Volts/Div) control in the right-hand window and right -click on it, then select the
Set Value menu option.
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.
901783 ISSUED: July 2003 1-5
P ART O NE: ABOUTAUTOMATION
STEP-BY-STEP INTRODUCTION TO AUTOMATION 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 3rd-party development tools, since it uses
Windows’ built-in text editor (Notepad) and the Visual Basic Script interpreter (VBScript), which is also installed on
all instruments.
1. Use the File? Windowed 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
4. Save the file to drive D:\ and name it Exercise1.vbs. Leave Notepad open, we’ll need it again.
5. Open Windows Explorer, via Start? Programs? Accessories? Windows Explorer.
6. Navigate to drive D:\ and double-click on Exercise1.vbs.
7. 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?
•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.
: 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.
•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.
•The app.Display.GridMode = “Quad” statement.
app.Display.GridMode = “Quad”
1-6ISSUED: July 2003901783
C HAPTER O NE: Overview
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 ( . ).
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 statements 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.
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.
1-8ISSUED: July 2003901783
C HAPTER O NE: Overview
Add this
SETUPS (PANEL FILES) ARE PROGRAMS!
Setup files, used to save and recall the state of the instrument between runs, are traditionally binary files whose
internal structure 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 effectively writes you a program that, when executed, returns
the instrument to the save d 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: as the location to save the .lss (LeCroy setup script) file.
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
(Start? Programs? Accessories).
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
OnErrorResumeNext
set XStreamDSO = CreateObject("LeCroy.XStreamDSO")
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.
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
code
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 exec ution.
901783 ISSUED: July 2003 1-9
P ART O NE: ABOUTAUTOMATION
: Setup files stored by the instrument have file
NNOOTTEE:
extension “.lss” (LeCroy Setup Script). These files are
syntactically identical to Microsoft Visual Basic Script
(VBScript) files, which have a “.vbs” extension.
: A simple alternative to recalling the
TTIIPP:
panel into the instrument is to execute it,
either by double-clicking on the .lss file in
Windows Explorer, or by executing it from
the command line.
1-10ISSUED: July 2003901783
C HAPTER O NE: Overview
CUSTOM MATH AND MEASUREMENTS
Custom Math and Measurements can be coded using VBScript or JavaScript 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.
901783 ISSUED: July 2003 1-11
P ART O NE: ABOUTAUTOMATION
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.
1-12ISSUED: July 2003901783
C HAPTER O NE: Overview
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”)
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
: 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”).
901783 ISSUED: July 2003 1-13
P ART O NE: ABOUTAUTOMATION
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, ot her versions of
Excel support similar functionality, but the specific sequence of commands may be slightly different:
1. Enable the Forms toolbar using the View? Toolbars? Forms 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.
1-14ISSUED: July 2003901783
C HAPTER O NE: Overview
CONTROL BY DISTRIBUTED COM (DCOM)
Distributed COM (DCOM) can be used to control an X-Stream based instrument remotely over any network
supporting TCP/IP (including the Internet).
For obvious security reasons all LeCroy instruments are shipped with this feature disabled, but the fairly simple
procedure detailed below can be followed to enable DCOM and define network user accounts that have the
access permissions to use it.
There are two basic ways to configure DCOM (User-Level or Share-Level), the choice of which really depends
upon whether the client and server (controlling PC and instrument) are both members of the same NT Domain or
not.
Security Settings on the Instrument (Server): User Level
This mode requires that the client and server be logged into the same NT Domain. Use the share -level
configuration (below) if this is not the case.
1. Run DCOMCnfg.exe from either Start?Programs?Accessories? Command Prompt or from
Start? Run…
2. Select LeCroyXStreamDSO from the list of applications.
3. Click the Properties button.
4. Click the General tab and set the Authentication Level control to Connect.
5. Click the Security tab. Select Use custom access permissions and add the list of users that are
allowed to control this scope via DCOM. Select Everyone (All Users) if you wish everyone to have
access.
6. Click the Identity tab and select The Interactive User.
Security Settings on the Instrument (Server): Share Level
1. Run DCOMCnfg.exe from either Start?Programs?Accessories? Command Prompt or from
Start? Run…
2. Select LeCroyXStreamDSO from the list of applications.
3. Click the Properties button.
4. Click the General tab and set the Authentication Level control to (None).
5. Click the Security tab. Select Use custom access permissions and add Everyone to the list.
6. Click the Identity tab and select The interactive user.
Initialize the Controlling PC (Client)
1. Copy LeCroyXStreamDSO.exe from the C:\Program Files\LeCroy\XStream directory onto the
controlling PC (location not important).
2. Execute LeCroyXStreamDSO.exe. Note that it will not run, but it will install enough information into the
registry to allow remote control of other instruments.
Connecting to a Remote Instrument
1.Visual Basic: Add a second argument to the CreateObject method, which specifies the network location
of the remote instrument:
Set o = CreateObject("LeCroy.XStreamDSO.1", "wavemaster00121")
901783 ISSUED: July 2003 1-15
P ART O NE: ABOUTAUTOMATION
o.AutoSetup
2. MATLAB: Add a second argument to the actxserver call: h = actxserver (progid [, MachineName])
Once connection is made using one of the above techniques , the remainder of the communication with the
instrument is the same as it would be in the case where the application runs directly on the instrument.
Remember, however, that because the connection is via a network, the performance of DCOM control of an
instrument will not equal that of a direct connection created by running the client application directly on the
instrument.
: Use version 2.6.0.0 or later for DCOM remote operation.
NNOOTTEE:
1-16ISSUED: July 2003901783
C HAPTER O NE: Overview
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:
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 32-bit Integer Value
Double Double-precision floating point value
DoubleLockstep Double-precision floating point value locked to a non-
linear (e.g. , 1, 2, 5) sequence.
Enum List Value (e.g., “Orange,” “Apple,” “Pear”)
String String value
Bool Boolean Value { True, False }, { 0, -1 }
Action Action (no arguments or value)
901783 ISSUED: July 2003 1-17
P ART O NE: ABOUTAUTOMATION
The properties and methods available for each control are type-specific. Listed below are the most commonly
used:
TYPE PROPERTIES
Integer VARIANT Value
Value(VARIANT)
int GetAdaptedValue
SetRequestedValue(int)
int GetRequestedValue
int GetDefaultValue
int GetGrain
int GetMax
int GetMin
Increment(int)
Value(VARIANT)
int GetAdaptedValue
SetRequestedValue(int)
int GetRequestedValue
int GetDefaultValue
int GetMax
int GetMin
int GetNumberOfValueStates
Increment(int)
BSTR GetRangeStringScreen
BSTR GetRangeStringRemote
String VARIANT Value
Value(VARIANT)
int GetMaxLength
BSTR GetRequestedValue
BSTR GetAdaptedValue
SetRequestedValue(BSTR)
Bool VARIANT Value
Value(VARIANT)
BOOL GetAdaptedValue
BOOL GetRequestedValue
BOOL GetDefaultValue
Set
Clear
Action ActNow
1-18ISSUED: July 2003901783
C HAPTER O NE: Overview
ACCESSING WAVEFORM/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:
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 DSOSet 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
EndSub
: Ensure that the record length is < 32kSamples, since
NNOOTTEE:
Excel has a limit on the number of rows in a spreadsheet.
Ideally, you should start experimenting with short (500 point)
records.
901783 ISSUED: July 2003 1-19
P ART O NE: ABOUTAUTOMATION
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 DSOSet app = CreateObject("LeCroy.XStreamDSO")
' Enable Standard Vertical Parameters
app.Measure.MeasureMode = "StdVertical"
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.
Synchronization or, more specifically, knowing when to read res ults, 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 DSOSet 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 a trigger is not detected
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
EndSub
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.
1-22ISSUED: July 2003901783
C HAPTER O NE: Overview
An example of WaitUntilIdle usage follows:
Sub Button1_Click()
' Connect to the DSOSet 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
: 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.
901783 ISSUED: July 2003 1-23
P ART O NE: ABOUTAUTOMATION
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 A utomation 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 DSOSet 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' of the spreadsheet with it
wave = app.Math.F1.Out.Result.DataArray
For i = 0 To numSamples - 1
1-24ISSUED: July 2003901783
C HAPTER O NE: Overview
Cells(i + 1, 1).Value = wave(i)
Next
EndSub
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
' 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
901783 ISSUED: July 2003 1-25
P ART O NE: ABOUTAUTOMATION
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.
' 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
1-26ISSUED: July 2003901783
C HAPTER O NE: Overview
EARLY AND LATE 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 bindin g. From most
programming languages (VB, VBScript, etc.) this is transparent . But when you are developing applications in C++,
which doesn’t 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)
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.
1-28ISSUED: July 2003901783
C HAPTER O NE: Overview
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 objec t, 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)
: The root of the object hierarchies of some software
NNOOTTEE:
options are not shown in this diagram.
901783 ISSUED: July 2003 1-29
C HAPTER T WOControl Reference
C
R
R
This section presents a reference guide for each object and control in the X-Stream object hierarchy.
C
E
E
O
O
F
F
N
N
E
E
T
T
R
R
R
R
E
E
O
O
N
N
L
L
C
C
E
E
901783ISSUED: July 2003 2-1
P ART T WO: REFERENCE
LeCroy.XStreamDSO.1 app
This is the root of the automation hierarchy, all other nodes are accessed from thispoint.
Example' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Pop up a dialog containing the instrument modelMsgBox "Model is: " & app.InstrumentModel
AddZoomTrace Action
DescriptionCreates function traces, defined as zoom, for each visible channel trace.
Equivalent to the front -panel zoom button.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Create zooms of all visible channel tracesapp.AddZoomTrace
2-2ISSUED: June 2003901783
C HAPTER T WOControl Reference
AutoSetup Action
DescriptionStarts 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. When more than
one channel is visible, the first visible channel in numerical order (that has a detectable signal applied to
it) is automatically set up for edge triggering.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Start an Auto-Setup process.app.AutoSetup
ClearSweeps Action
DescriptionClears all accumulated sweeps for all subsystems. These include Channel Pre-Processing, Math,
Measure, and Display Persistence. Subsystem-specific clear sweeps controls are also available. For
details, please refer to the ClearSweeps control for each subsystem.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Clear all accumulated sweeps for all subsystems.app.ClearSweeps
DoPrint Action
DescriptionExecutes a print out of the currently displayed screen image. The destination printer or file, and various
other options, are defined in the Hardcopy subsystem (app.Hardcopy).
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Start a print of the screen to the pre-determined destination.app.DoPrint
901783 ISSUED: July 2003 2-3
P ART T WO: REFERENCE
ExitWithoutConfirm Action
DescriptionCauses the instrument application to exit without prompting for a confirmation. Any acquisition in
progress will be canceled.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Shut down the instrument application.app.ExitWithoutConfirm
FirmwareVersion String
Range: Any number of charactersDescription
Queries the firmware version of the instrument . The response takes the form: "1.0.0 (build 12345)"Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Query the firmware version number of the instrument.MsgBox "Firmware Version is: " + app.FirmwareVersion
Height Property
DescriptionSets/Queries the height in pixels of the instrument display on the PC screen. Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the height of the instrument window to 400 pixels.app.Height = 400
HideClock Bool
DescriptionHides/Shows the clock that resides in the lower-right corner of the display of the instrument.
Reads the complete ID of the instrument in the format: "LECROY,WM8500,WM000001,0.0.0", which
includes the maker, instrument model number, serial number, and version number.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Present the ID of the instrument.MsgBox app.InstrumentID
InstrumentModel String
Range: Any number of charactersDescription
Queries the model number of the instrument.Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Present the model number of the instrument.MsgBox app.InstrumentModel
Left Property
DescriptionSets/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.
Example
' 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
901783 ISSUED: July 2003 2-5
P ART T WO: REFERENCE
Minimize Action
DescriptionMinimizes the ins trument 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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Minimize the instrument display.app.Minimize
Quit() Method
DescriptionCloses the instrument application. The instrument will prompt you with an “Are you sure?” dialog
before closing down. Until you respond to the dialog, control via Automation will be blocked.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Quit the instrument application with a confirmation prompt.app.Quit
ResetPreferences Action
DescriptionResets all scope preferences to their default states. The set includes the current remote
communications port, the color palette settings, etc., but does not include main DSO controls such as
V/Div, T/Div, etc. These main instrument controls can be reset using the SetToDefaultSetup control.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Reset all instrument preferences.app.ResetPreferences
2-6ISSUED: June 2003901783
C HAPTER T WOControl Reference
SetToDefaultSetup Action
DescriptionRestores the instrument setup to its default state. However, certain settings will not be restored to the
default state. These are the user preferences such as current remote communications port and color
settings, which can be reset, if required, using the ResetPreferences action.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Restore the instrument to its default state.app.SetToDefaultSetup
Shutdown Action
DescriptionShuts down the instrument. It will prompt you with an “Are you sure? ” dialog before shutting down. Until
you respond to the dialog, control via Automation will be blocked.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Shut down the instrument with a confirmation prompt.app.Shutdown
Sleep([in] double timeoutMilliseconds) Method
DescriptionCauses the main execution thread of the instrument application to sleep for the specified time period,
defined in milliseconds.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
MsgBox "Sleeping for 10 seconds..."app.Sleep(10000)MsgBox "Sleep finished"
901783 ISSUED: July 2003 2-7
P ART T WO: REFERENCE
Top Property
DescriptionSets/Queries the position in pixels of the top edge of the instrument display on the PC screen. The
position is measured fr om the top of the screen to the top of the instrument window.
Example
' 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
TouchScreenEnable Bool
DescriptionSets/Queries the state of the touch-screen enable control. This = the front -panel Touch Screen button.Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Disable touch-screen if it is enabled.if app.TouchScreenEnable = True then app.TouchScreenEnable = FalseEnd if
WaitUntilIdle([in] double timeoutSeconds) Method
DescriptionWaits until either the application is idle or the specified timeout (in seconds) expires. This evaluates to
True if the applicat ion completes before the timeout expires, and to False if a timeout occurs. When the
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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Wait with a timeout of five seconds.app.WaitUntilIdle(5)
2-8ISSUED: June 2003901783
C HAPTER T WOControl Reference
Width Property
DescriptionSets/Queries the width in pixels of the instrument display on the PC screen. Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the width of the instrument window to 800 pixels.app.Width = 800
Windowed Action
DescriptionPlaces 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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the instrument display into the windowed mode.app.Windowed
WindowState Property
DescriptionSets/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
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the instrument window state to windowed.app.WindowState = 0
901783 ISSUED: July 2003 2-9
P ART T WO: REFERENCE
ACQUISITION app.Acquisition
This group of variables controls the input channels (C1, C2, C3, C), the timebase, the trigger, and the Aux Output.
Names of the form app.Acquisition.Channels.xxxx are aliases for simpler names, which are described in this
section of the manual. Examples of alias pairs are as follows:
app.Acquisition.Channels("Cx") = app.Acquisition.Cx
app.Acquisition.Channels(1) = app.Acquisition.C1
app.Acquisition.Channels("Cx").Out.Result = app.Acquisition.Cx.Out.Result
These longer names may be more suitable than the shorter ones for certain programming structures.
Acquire([in] double timeoutSeconds, [in] long Method
DescriptionAction/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.
Example
' 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)
Calibrate Action
DescriptionInitiates a full calibration of the acquisition system of the instrument.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Start a calibration.app.Acquisition.Calibrate
2-10ISSUED: June 2003901783
C HAPTER T WOControl Reference
ClearSweeps Action
DescriptionResets any accumulat ed 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 preprocessing
settings. An average can be reset on an individual basis using app.Acquisition.Cx.ClearSweeps
control.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Clear accumulated sweeps for channels C1...C4app.Acquisition.ClearSweeps
' Clear accumulated sweeps for only C1app.Acquisition.C1.ClearSweeps
TriggerMode Enum
DescriptionSets/Queries the trigger mode, using values from the following list:
Auto
Normal
Single
Stop Finishes the current acquisition and does not re-arm.
After a timeout, if a real hardware trigger is not received, the
instrument will force a trigger so that there are frequent
automatic updates.
Accepts triggers as rapidly as the system permits, but will wait
indefinitely for a trigger, without updating data.
Arms the acquisition system to acquire once, and does not
rearm automatically afterward. Once a trigger is received and
the data is processed, the instrument enters the "Stopped"
state.
Example
' 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)
901783 ISSUED: July 2003 2-11
P ART T WO: REFERENCE
Values
Auto Auto-trigger
Normal Normal Trigger
Single Single Trigger
Stopped No trigger possible, Stopped
2-12ISSUED: June 2003901783
C HAPTER T WOControl Reference
AUXOUTPUT app.Acquisition.AuxOutput
Controls for the Auxiliary output BNC can be programmed as a simple square-wave signal source, or as a pulse
that is asserted when various events occur, including Trigger Enabled, Trigger Out, and Pass/Fail.
' Setup the Auxiliary output to be a square wave with an amplitude
' of 500mV a frequency of 5kHzapp.Acquisition.AuxOutput.Mode = "Square"app.Acquisition.AuxOutput.Amplitude = 0.5
Amplitude Double
Range: From 0.005 to 1, step 0.001Description
Sets/Queries the amplitude of the signal on the AUX OUT connector. This is the amplitude of the signal
into a 1 Mohm load. Into 50 ohms the output voltage will be halved (since the source impedance is
nominally 50 ohms). Units are Volts.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the amplitude of the signal from the AUX OUT connector' to 0.6 V into 1 Mohm, or 0.3 V into 50 ohms.app.Acquisition.AuxOutput.Amplitude = 0.6
901783 ISSUED: July 2003 2-13
P ART T WO: REFERENCE
AuxInCoupling Enum
DescriptionSets the input coupling for the Auxiliary input path.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the coupling of the Auxiliary socket, when used as an input, to ground.' In this condition, no input signal reaches the instrument.app.Acquisition.AuxOutput.AuxInCoupling = "GND"
Values
DC50 DC, 50 ohms coupling
GND Grounded
Frequency DoubleLockstep
Range: From 5 to 5e+006 step 10, locked to 1 2.5 5Description
Sets/Queries the auxiliary output frequency of the square wave. Units are Hertz. WaveMaster models
(and derivatives) have a limit of 5 MHz. WavePro 7000 models (and derivatives) have a limit of 1 MHz.
This control only has effect when the AuxOutput mode is "Square".
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the frequency of the signal from the AUX OUT ' connector to 1 MHz.app.Acquisition.AuxOutput.Frequency = 1e6
Mode Enum
DescriptionSets/Queries the output mode of the AUX OUT connector.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the output of the AUX OUT connector to output' a pulse on a pre-determined Pass-Fail decision.app.Acquisition.AuxOutput.Mode = "PassFail"
2-14ISSUED: June 2003901783
C HAPTER T WOControl Reference
Values
DCLevel Emit a DC level
Off Output Disabled
PassFail Pulse-out controlled by Pass/Fail system
Square Square-wave signal generator
TriggerEnabled Pulse-out when trigger is enabled
TriggerOut Pulse-out when trigger occurs
PulseWidth Double
Range: From 0.001 to 0.5, step 0.001
Description
This control has effect only if the Aux Output is in pulse mode (e.g. , pass/fail, trigger out). It has no
effect for modes that do not produce a pulse.
Sets the duration of the output pulse from the AUX OUT connector. Units are seconds.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the duration of the pulse from AUX OUT' to 15 ms.app.Acquisition.AuxOutput.PulseWidth = 15e-3
SetToTTL Bool
DescriptionOverrides the Amplitude setting when true. This control Sets the Auxiliary output to produce TTL levels.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the levels of the signal from the AUX OUT ' connector to produce TTL levels.app.Acquisition.AuxOutput.SetToTTL = True
901783 ISSUED: July 2003 2-15
P ART T WO: REFERENCE
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 for simpler names, which are described in the
section of the manual devoted to app.Acquisition. Examples of alias pairs are as follows:
ExampleSet app = CreateObject("LeCroy.XStreamDSO") For X = 1 To 4 app.Acquisition.Channels(X).VerScale = 0.2Next
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 for simpler names, which are described in the
section of the manual devoted to app.Acquisition. Examples of alias pairs are as follows:
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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the number of sweeps for channel C1 to 25.app.Acquisition.C1.AverageSweeps = 25
AxisXRotation Integer
Range: From –90 to 90, step 1Description
Sets/Queries the stat e of the X-axis rotation control, used only in 3-D persistence modes to control the
viewing position.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the rotation about the X-axis to 35 degrees for trace C3.app.Acquisition.C3.AxisXRotation = 35
901783 ISSUED: July 2003 2-17
P ART T WO: REFERENCE
AxisYRotation Integer
Range: From –90 to 90, step 1
Description
Sets/Queries the state of the Y-axis rotation control, used only in 3-D persistence modes to control the
viewing position.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the rotation about the Y-axis to 25 degrees for trace C3.app.Acquisition.C3.AxisYRotation = 25
BandwidthLimit Enum
DescriptionSets/Queries the bandwidth limit for input channel Cx, in Hz. This control is an enum, and therefore
requires a string value, and not a scalar value. Bandwidth limit choices vary between DSO models.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the bandwidth limit for C2 to 20 MHz.app.Acquisition.C2.BandwidthLimit = "20MHz"Values
1GHz200MHz20MHz3GHz4GHzFull
ClearSweeps Action
DescriptionClears all accumulated average data and persistence data for this channel. See
app.Acquisition.ClearSweeps for a control that clears accumul ated data for channels 1 to 4, or
app.ClearSweeps for a control that clears accumulated data for all subsystems (including
DescriptionSets/Queries the input coupling of input channel Cx. Coupling choices vary between instrument models.
WavePro 7000 instruments, for example, suppo rt AC1M and DC1M modes in addition to DC50 and
GND.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Inspect the input coupling for channel C2CoupleC2 = app.Acquisition.C2.Coupling
' Set the coupling to DC, 50 ohmsapp.Acquisition.C2.Coupling = "DC50"
ValuesDC50
Gnd
Deskew Double
Range: From –0.1 to 0.1, step 1e-012
Description
Sets/Queries the deskew of input channel Cx to produce a required alignment with another trace.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the deskew of channel C2 to 3.0 nsapp.Acquisition.C2.Deskew = 3.0e-9
InterpolateType Enum
Description
Sets/Queries the type of interpolation used for input channel Cx. Because Sinx/x interpolation increases
the size of the trace by a factor of 10, beware when using this option with long records.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the interpolation for channel C3 to (sin x)/xapp.Acquisition.C3.InterpolateType = "Sinxx"
901783 ISSUED: July 2003 2-19
P ART T WO: REFERENCE
Values
Linear Linear interpolation
Sinxx Sinx/x interpolation
Invert Bool
DescriptionSets/Queries whether input channel Cx is inverted.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set channel C2 to be inverted.app.Acquisition.C2.Invert = True
LabelsPosition String
Range: Any number of charactersDescription
Sets/Queries the horizontal position of the label attached to acquisition trace Cx. The unit of
measurement is the unit of the horizontal scale. The measurement is made from the trigger point. This
control is a string, not a numeric value. This allows multiple labels to be positioned, as shown in the
example below.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Add a couple of labels to trace C1, one at 0ns, and one at 55ns
DescriptionSets/Queries the persisted state of the channel 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 can be
independently controlled.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set persistence on for trace C1app.Display.LockPersistence = "PerTrace"app.Acquisition.C1.Persisted = True
Persistence3d Bool
DescriptionSets/Queries the 3-D persistence state. When True, the persistence display for this channel will be
displayed as a three-dimensional surface map.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set persistence plot as 3-D for trace C1app.Acquisition.C1.Persistence3D = True
901783 ISSUED: July 2003 2-21
P ART T WO: REFERENCE
PersistenceMonoChrome Bool
DescriptionSets/Queries the monochrome persistence state. When True, the persistence display for this channel
will be monochromatic, whether 2-D or 3-D.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set persistence monochrome on for trace C4.app.Acquisition.C4.PersistenceMonoChrome = True
PersistenceSaturation Integer
Range: From 1 to 100, step 1Description
Sets/Queries the saturation threshold for persisted waveforms.All information at this level or above will
be recorded with the same color or intensity.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the persistence saturation level for trace C1.app.Acquisition.C1.PersistenceSaturation = 60
PersistenceTime Enum
DescriptionSets/Queries the state of the Persistence Time control. Controls the persistence decay time for this
trace.
Example
' 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"Values
0.5s 5s
10s Infinite
1s 2s
20s
2-22ISSUED: June 2003901783
C HAPTER T WOControl Reference
ProbeAttenuation Double
Range: From 1e-006 to 10000, step 1e -006Description
Sets/Queries the probe attenuation. The probe attenuation is the factorby which the signal is made
smaller, for example, 10 means that the probe divides by 10, and is referred to as a ÷10 probe. Certain
passive probes can be marked as “x10”, even though they actually divide the input signal by a factor of
10.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the probe attenuation for channel C1 to 100app.Acquisition.C1.ProbeAttenuation = 100
ShowLastTrace Bool
DescriptionSets/Queries the state of the Show Last Trace control. If True, when this trace is displayed in
persistence mode, the last acquired waveform will be superimposed on the accumulating persistence
map.
Example
' 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
UseDotJoin Bool
DescriptionSets/Queries the DotJoin state of the channel. If True then straight line segments will be drawn between
sample points. If false then only the sample points will be shown. See Display.TraceStyle for a control
that can change the setting for all displayed traces simultaneously.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Turn dot joining off for trace C1.app.Acquisition.C1.UseDotJoin = False
901783 ISSUED: July 2003 2-23
P ART T WO: REFERENCE
UseGrid String
Range: Any number of charactersDescription
Sets/Queries the graticule on which the trace is displayed. Typical values include:
YT1 to YT8 One of the YT graticules used in Single, Dual, Quad, and Octal display modes
NotOnGrid Not displayed on any graticule
Example
' 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"
VerOffset Double
Range: From –0.75 to 0.75, step 0.001Description
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. The available offset range depends on the current
V/Div setting, and also the instrument model.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the vertical offset for C1 to 10 mV.app.Acquisition.C1.VerOffset = 0.01
VerScale DoubleLockstep
Range: From 0.002 to 1, step 0.0005, locked to 1 2 5Description
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 it is
enabled, the setting resolution lies in the range 1% to 2%, depending upon the numerical value.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
2-24ISSUED: June 2003901783
C HAPTER T WOControl Reference
' Set C1 to a scale of 250mV/Div in Variable Scale modeapp.Acquisition.C1.VerScaleVariable = Trueapp.Acquisition.C1.VerScale = 0.25
VerScaleVariable Bool
Description
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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the variable vertical scale for C1 to On.app.Acquisition.C1.VerScaleVariable = True
View Bool
Description
Sets/Queries the channel's “Viewed” state. When True, the channel waveform is displayed on one of
the display graticules. E ven when a channel is not visible, it can be used as a source for Math,
Measure, etc.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Make channel C3 visible.app.Acquisition.C3.View = True
ViewLabels Bool
Description
Sets/Queries whether the user-defined labels for trace Cx is visible. See Also: LabelsPosition and
LabelsText controls.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Show the user-defined label for trace C2.app.Acquisition.C2.ViewLabels = True
901783 ISSUED: July 2003 2-25
P ART T WO: REFERENCE
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” ? the term used to describe the visible portion of the trace, which
is generally smaller than the acquired waveform. For example, the frame could be used to display a 500 pt.
window onto a 1 Mpt. trace; or, vertically it could be used to show the “center” 10 mV of a result.
This is the array of data that can be read out to represent the input waveform. The data will have 16-bit
resolution ? VerticalPerStep, though the physical resolution will usually be less. See
VerticalResolution. The optional boolean argument can be used to determine whether 16-bit integer
data, or floating-point data is returned. True indicates that floating-point values are required; False
indicates that integer values are required.
Example
' Visual Basic Script Set app = CreateObject("LeCroy.XStreamDSO")
' Copy the output data array (floats) for trace C3 into an array.
2-26ISSUED: June 2003901783
C HAPTER T WOControl Reference
Dim C3DataArrayC3DataArray = app.Acquisition.C3.Out.Result.DataArray(True)
' Emit the first two data values into a popup message box
FirstEventTime Property
Description
Queries the absolute trigger time of the acquisition, or that of the first sequence in a segmented
acquisition.Times are returned encoded as a currency value (VT_CY) within a variant, which allows the
use of the full 64-bit resolution of the timestamp value. Values are referenced to 1 Jan 2000, with 1 ns
resolution. 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 to the right .
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the time of the first event.EventFirst = app.Acquisition.C1.Out.Result.FirstEventTimeMsgBox EventFirst
HorizontalFrameStart Property
Description
Reads the time, in seconds, that corresponds to the left edge of the graticule, relative to the trigger
instant.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the horizontal frame start for trace C1HorStart = app.Acquisition.C1.Out.Result.HorizontalFrameStartMsgBox HorStart
HorizontalFrameStop Property
Description
Reads the time, in seconds, that corr esponds to the right-hand edge of the graticule, relative to the
trigger instant.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the horizontal frame stop for trace C1HorStop = app.Acquisition.C1.Out.Result.HorizontalFrameStop
901783 ISSUED: July 2003 2-27
P ART T WO: REFERENCE
MsgBox HorStop
HorizontalOffset Property
Description
Reads/Queries the time between the trigger point and the left edge of the screen. If the trigger point is
off the left edge of the screen, the result is positive. If the trigger point is on the screen, the result is
negative. The value is very close to: app.Acquisition.Horizontal.HorOffsetOrigin +
app.Acquisition.Horizontal.HorOffset, when both are expressed in seconds. A small discrepancy occurs
because the trigger point is not synchronous with the sampling clock, so variations occur with a range
of one sample period.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the value of the horizontal offset for trace C2HorOffsetC2 = app.Acquisition.C2.Out.Result.HorizontalOffsetMsgBox HorOffsetC2
HorizontalPerStep Property
DescriptionReads the time, in units of seconds, between successive sampling instants.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the value of the horizontal step size for trace C3HorStepC3 = app.Acquisition.C3.Out.Result.HorizontalPerStepMsgBox HorStepC3
HorizontalResolution Property
DescriptionReads the resolution of the readout of horizontal values. It is not directly related to the sample period.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the readout resolution of the horizontal axis of trace C4C4HRes = app.Acquisition.C4.Out.Result.HorizontalResolutionMsgBox C4HRes
2-28ISSUED: June 2003901783
C HAPTER T WOControl Reference
HorizontalUnits Property
DescriptionReads the unit in which the horizontal displacements are specified for trace Cx .Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the units of the horizontal axis for trace C2.C2HorUnits = app.Acquisition.C2.Out.Result.HorizontalUnitsMsgBox C2HorUnits
IndexOfFirstSampleInFrame Property
DescriptionReads the index number of the first sample that appears in the frame.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the index of the first sample in the frame for trace C2.FrameSampleC2 = app.Acquisition.C2.Out.Result.IndexOfFirstSampleInFrameMsgBox FrameSampleC2
LastEventTime Property
Description
Queries the 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. See description for
FirstEventTime for encoding details.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the time of the last event.EventLast = app.Acquisition.C1.Out.Result.LastEventTimeMsgBox EventLast
901783 ISSUED: July 2003 2-29
P ART T WO: REFERENCE
NumFrameDimensions Property
DescriptionReads the dimensionality of the trace Cx : 2 for a Y-T plot, 3 for an X-Y plot.Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the dimensionality of trace C3.DimC3 = app.Acquisition.C3.Out.Result.NumFrameDimensionsMsgBox DimC3
NumSamplesInFrame Property
Description
Reads the nominal number of samples in the displayed frame. In the case of sequence mode, the
frame refers to one segment, not the whole graticule.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the number of samples in the frame for trace C1FrameSamplesC1 = app.Acquisition.C1.Out.Result.NumSamplesInFrameMsgBox FrameSamplesC1
Samples Property
Description
Reads the number of samples in a record, as read out. It will usually be two more than
NumSampleInFrame (but may be much larger) to allow for the two samples that are just to the left and
right of the displayed graticule. For a trace acquired in sequence mode, "frame" refers to one segment,
not the whole graticule.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the number of samples in trace C1.C1Samples = app.Acquisition.C1.Out.Result.SamplesMsgBox C1Samples
2-30ISSUED: June 2003901783
C HAPTER T WOControl Reference
Status Property
Description
Queries the status of the waveform result. Status is a 64-bit bitfield, encoded in a VARIANT of VT_CY
(currency) type, with the meaning associated with each bit described earlier in Chapter 1. Status should
be read twice, once before reading the result, and once again after reading the result. This is due to the
streaming nature of processing in the X-stream DSO software.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
stat = app.Acquisition.C1.Out.Result.StatusMsgBox stat
StatusDescription Property
DescriptionReturns a textual equivalent of the status returned in the “Status” bitfield.
Sweeps Property
Description
Reads the number of trigger events (sweeps) that contributed to a cumulative result. Useful only for
sequence acquisitions . Cumulative processing, such as Averaging. Accumulation , can be reset using
the ClearSweeps method.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the number of accumulated sweeps for trace C1' and display in a popupnumSweeps = app.Acquisition.C1.Out.Result.SweepsMsgBox numSweeps
VerticalFrameStart Property
DescriptionReads the amplitude that corresponds to the bottom of the displayed frame.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the vertical frame start for trace C1.VerStart = app.Acquisition.C1.Out.Result.VerticalFrameStartMsgBox VerStart
901783 ISSUED: July 2003 2-31
P ART T WO: REFERENCE
VerticalFrameStop Property
DescriptionReads the amplitude that corresponds to the top of the displayed frame.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the vertical frame stop for trace C1.VerStop = app.Acquisition.C1.Out.Result.VerticalFrameStopMsgBox VerStop
VerticalMaxPossible Property
DescriptionReads the highest value that an actual array element can have. It will be a little less than
VerticalFrameStop.Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the vertical maximum possible value for trace C1.VerMax = app.Acquisition.C1.Out.Result.VerticalMaxPossibleMsgBox VerMax
VerticalMinPossible Property
DescriptionReads the lowest value that an actual array element can have. It will be a little greater than
VerticalFrameStart.Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the vertical minimum possible value for trace C1.VerMin = app.Acquisition.C1.Out.Result.VerticalMinPossibleMsgBox VerMin
VerticalOffset Property
Description
Reads the difference in potential between ground and the center of the screen. With an offset of
+50 mV, the center of the screen represents –50 mV; with an offset of –21 mV, the center represents
+21 mV.
2-32ISSUED: June 2003901783
C HAPTER T WOControl Reference
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the vertical offset for trace C1VerOffset = app.Acquisition.C1.Out.Result.VerticalOffsetMsgBox VerOffset
VerticalPerStep Property
Description
Reads the smallest step in the numerical values that can be read out, whether or not the step has
physical meaning. For the basic 8-bit ADC, with values returned as 16-bit short values, the step is
1/65536 of the vertical range.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the vertical step size for trace C3.VerStep = app.Acquisition.C3.Out.Result.VerticalPerStepMsgBox VerStep
VerticalResolution Property
Description
Reads the vertical resolution, which is the actual smallest difference that can be practically resolved.
For an 8-bit ADC it is 1/256 of the height of the vertical range VR. But if 16 averages are set, the
resolution is improved by a factor of 4, and it becomes 1/1024 of VR, and for 100 sweeps it becomes
1/2560.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Read the readout resolution of the vertical axis of trace C1VRes = app.Acquisition.C1.Out.Result.VerticalResolutionMsgBox VRes
VerticalUnits Property
DescriptionReads the unit in which the vertical displacements are specified.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
901783 ISSUED: July 2003 2-33
P ART T WO: REFERENCE
' Read the units of the vertical axis of trace C1VertUnits = app.Acquisition.C1.Out.Result.VerticalUnitsMsgBox VertUnits
2-34ISSUED: June 2003901783
C HAPTER T WOControl Reference
HORIZONTAL app.Acquisition.Horizontal
This group of variables controls the timebase, the sampling, and the trigger delay.
Range: From 1e-012 to 1e+012, step 1e-015Description
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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the duration of the last completed acquisition.AcqDuration = app.Acquisition.Horizontal.AcquisitionDurationMsgBox AcqDuration
901783 ISSUED: July 2003 2-35
P ART T WO: REFERENCE
ActiveChannels Enum
Description
Sets/Queries the number of active DSO input channels. This is a string value, with allowed values “4”,
“2”, and “Auto”; and 0, 1, and 2. Beware of using 2 as a numerical value for 2 channels: you will get
Auto mode instead.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the instrument to use two channels.app.Acquisition.Horizontal.ActiveChannels = "2"Values
2 Use 2 channels, with increased sample rate
4 Use all channels
Auto Maximize sample rate based upon the # displayed channels
HorOffset Double
Range: From -0.0005 to 5e-007, step 1e -009Description
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&.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal trigger offset to 200 ns.app.Acquisition.Horizontal.HorOffset = 2.0e-7
HorOffsetControl Enum
DescriptionSets the unit for HorOffset to either Time or Div, using "Time" and "Div", or 0 and 1.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal offset control to divisions.app.Acquisition.Horizontal.HorOffsetControl = "Div"
ValuesDiv
Time
2-36ISSUED: June 2003901783
C HAPTER T WOControl Reference
HorOffsetOrigin Double
Range: From 0 to 10, step 1Description
Sets/Queries the origin, in graticule divisions, of the time scale in which Ho rOffset is measured. The
value 0 corresponds to the left edge of the graticule. The value 10 corresponds to the right edge of the
graticule. Requesting a value outside the range will select the nearest allowed value.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the origin of the horizontal trigger offset to 4.0 divisions.
HorScale DoubleLockstep
Range: From 2e-011 to 10, step 5e-010, locked to 1 2 5Description
Sets/Queries the horizontal scale in time per division. Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the horizontal acquisition scale to 200 ns/div.app.Acquisition.Horizontal.HorScale = 2.0e-7
HorUnits String
Range: Any number of charactersDescription
Queries the units in which the horizontal scale is measured. Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the units of the horizontal scale.HorizUnit = app.Acquisition.Horizontal.HorUnits
901783 ISSUED: July 2003 2-37
P ART T WO: REFERENCE
MaxSamples DoubleLockstep
Range: From 500 to 2.4e+007, step 1000, locked to 1 2.5 5Description
Sets/Queries the maximum permissible number of samples to be used in the acquisition memories. At
the faster sample rates, the actual number used can be less than this maximum.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the available memory length per channel to 500app.Acquisition.Horizontal.MaxSamples = 500
NumPoints Integer
Range: From 2 to 100000000, step 1Description
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.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Obtain the number of points being used in the acquisition memory.NumberOfPoints = app.Acquisition.Horizontal.NumPoints
NumSegments Integer
Range: From 2 to 20000, step 1Description
Sets/Queries the number of segments in the sequence mode of acquisition. Only valid when
DescriptionSets/Queries the source of the acquisition reference clock.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the source of the reference clock to External.app.Acquisition.Horizontal.ReferenceClock = "EXT"
Values
EXT External reference (use rear-panel BNC)
INT Internal reference clock
SampleClock Enum
DescriptionSets/Queries the source for the sample clock.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the sample clock to expect an external source.app.Acquisition.Horizontal.SampleClock = "External"
ValuesExternal
Internal
SampleMode Enum
Description
Sets/Queries the mode of acquisition as real-time, sequence, or random interleaved sampling. RIS
mode and sequence mode are not available over the entire range of timebases, and are not available
simultaneously.
Example
' Visual Basic Script
Set app = CreateObject("LeCroy.XStreamDSO")
' Set the mode of acquisition to random interleaved sampling.app.Acquisition.Horizontal.SampleMode = "RIS"
ValuesRealTime
RISSequence
901783 ISSUED: July 2003 2-39
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.