User manual

Table Of Contents
MAUI Oscilloscopes Remote Control and Automation Manual
Control Variables
Traditionally, properties presented to an Automation client are simple “variables with types such as
Integer (int), String (BSTR), Floating Point (single, double), etc. However, on MAUI oscilloscopes, CVARs
are an extension of the traditional Automation pattern, without affecting how they appear to most
Automation clients (see the topic on early/late binding). 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.
Setting Control Variables
All CVARs have the default property of Value. A CVAR such as VerScale (Volts/Div) may be set in VBS as
follows:
app.Acquisition.C1.VerScale = 0.5
Its current value may be queried with:
CurrentValue = app.Acquisition.C1.VerScale
The following methods are also supported (for this CVAR type) :
double GetAdaptedValue
SetRequestedValue(double)
double GetRequestedValue
double GetDefaultValue
double GetGrainValue
double GetMaxValue
double GetMinValue
For example:
app.Acquisition.C1.VerScale.SetRequestedValue(1.0)
minValue = app.Acquisition.C1.VerScale.GetMinValue
maxValue = app.Acquisition.C1.VerScale.GetMaxValue
The sample file D:\Scripts\Automation\ExampleCvarTypes.vbs contains code for querying and displaying
CVAR properties for each type of control variable, including the status flags. Commands such as these are
useful for ascertaining the state of the oscilloscope prior to changing setups or taking other actions.
Note: In the sample file, after instantiating the app object, the programming variable "acq" was set
to take the place of "app.acquisition" in all commands, and other variables are set at the beginning
of each type, depending on the child objects being substituted (e.g., acqHorz replaces
app.Acquisition.Horizontal). This is to simplify coding.
2-24